[FIX] save wizard before run

we must save 'account.invoice.line.update' to be able match them to real invoice lines,
This commit is contained in:
Iryna Vyshnevska
2019-08-13 12:40:28 +03:00
parent 5b620a6c5f
commit beb0a27ad6
7 changed files with 37 additions and 24 deletions

View File

@@ -60,15 +60,6 @@ class AccountInvoiceUpdate(models.TransientModel):
}])
return res
@api.model
def default_get(self, fields_list):
res = super(AccountInvoiceUpdate, self).default_get(fields_list)
assert self._context.get('active_model') == 'account.invoice',\
'active_model should be account.invoice'
inv = self.env['account.invoice'].browse(self._context['active_id'])
res = self._prepare_default_get(inv)
return res
@api.onchange('type')
def type_on_change(self):
res = {'domain': {}}