Skip to content

Commit

Permalink
Actualización - arreglo bug función button_generate_wh_doc
Browse files Browse the repository at this point in the history
Éste método dá error, en compilaciones Odoo v8 2016, conflictos con frozendict, era imposible generar la retención desde la factura.
  • Loading branch information
kkoci authored Nov 14, 2016
1 parent e68f512 commit eb7aa4c
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions l10n_ve_withholding_iva/model/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,27 +418,27 @@ def button_generate_wh_doc(self):
for inv in self:
view_id = self.env['ir.ui.view'].search([
('name', '=', 'account.invoice.wh.iva.customer')])
context = self.env.context.copy()
context.update({
'invoice_id': inv.id,
'type': inv.type,
'default_partner_id': partner._find_accounting_partner(
inv.partner_id).id,
'default_name': inv.name or inv.number,
'view_id': view_id,
'domain':[
('invoice_id','=',inv.id),
('type','=',inv.type),
('default_partner_id','=', partner._find_accounting_partner(inv.partner_id).id),
('default_name' ,'=', inv.name or inv.number),
('view_id' ,'=', view_id[0].id)
]
})
res = {
'name': _('Withholding vat customer'),
'type': 'ir.actions.act_window',
'res_model': 'account.wh.iva',
'view_type': 'form',
'view_id': False,
'view_mode': 'form',
'nodestroy': True,
'target': 'current',
'domain': "[('type', '=', '" + inv.type + "')]",
'context': context
}
return res
return {
'name': _('Withholding vat customer'),
'type': 'ir.actions.act_window',
'res_model': 'account.wh.iva',
'view_type': 'form',
'view_id': False,
'view_mode': 'form',
'target': 'current',
'domain': [('type', '=', inv.type )],
'context': context,
}

@api.multi
def action_cancel(self):
Expand Down

0 comments on commit eb7aa4c

Please sign in to comment.