Commit d82fa065 by Maria Agustina

1768 terminada

1 parent 542549e4
...@@ -3,6 +3,7 @@ from datetime import datetime ...@@ -3,6 +3,7 @@ from datetime import datetime
class hgt_liquidacion_comprobante(models.TransientModel): class hgt_liquidacion_comprobante(models.TransientModel):
_name = "hgt.liquidacion_comprobante" _name = "hgt.liquidacion_comprobante"
_inherit = ['asw.generador_comprobante','asw.generador_comprobante_linea']
proovedor = fields.Many2one( proovedor = fields.Many2one(
string='Proovedor', string='Proovedor',
...@@ -37,7 +38,25 @@ class hgt_liquidacion_comprobante(models.TransientModel): ...@@ -37,7 +38,25 @@ class hgt_liquidacion_comprobante(models.TransientModel):
return result return result
def generar_comprobante_compra(self): def generar_comprobante_compra(self):
#fx para generar c de c cliente = self.proovedor
total = self.total_liquidacion
referencia = str(self.liquidacion.nombre)
talonario = self.env['asw.talonario'].search([('tal_menu', '=', 'fac'),('tal_tipo','=', 'r')], limit=1)
comprob = self.generar_comprobante(talonario, cliente, total, referencia)
referencia2 = 'PRODUCTO/SERVICIO'
linea = self.generar_linea_comprobante(referencia2, comprob, total)
return {
'type': 'ir.actions.act_window',
'res_model': 'asw.comprobante',
'view_mode': 'form',
'view_type': 'form',
'res_id': comprob.id,
'views': [(False, 'form')],
'target': 'new',
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!