Skip to content
Snippets Groups Projects
Commit baca220b authored by Josse Colpaert's avatar Josse Colpaert
Browse files

[FIX] invoice onchange: onchange_invoice_line_ids continued

parent 5aee318f
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@
if tax_id:
line_vals['invoice_line_tax_ids'] = [(6, 0, [tax_id[0]])]
self._update(cr, uid, 'account.invoice.line', 'account', line_vals, 'sale_of_land_line')
self.pool.get('account.invoice')._onchange_invoice_line_ids(cr, uid, [ref('demo_invoice_invest_sale')])
self.pool.get('account.invoice').browse(cr, uid, ref('demo_invoice_invest_sale'))._onchange_invoice_line_ids()
self.pool.get('account.invoice').signal_workflow(cr, uid, [ref('demo_invoice_invest_sale')], 'invoice_open')
-
Set the context for supplier bills because the 'type' field is readonly in invoice form views, so it value won't be considered by the yaml import
......@@ -150,9 +150,8 @@
if tax_id:
line_vals['invoice_line_tax_ids'] = [(6, 0, [tax_id[0]])]
self._update(cr, uid, 'account.invoice.line', 'account', line_vals, 'coffee_machine_line')
inv = self.env['account.invoice'].browse([ref('demo_invoice_equipment_purchase')])
inv._onchange_invoice_line_ids()
inv.signal_workflow('invoice_open')
self.pool.get('account.invoice').browse(cr, uid, ref('demo_invoice_equipment_purchase'))._onchange_invoice_line_ids()
self.pool.get('account.invoice').signal_workflow(cr, uid, [ref('demo_invoice_equipment_purchase')], 'invoice_open')
-
!python {model: account.bank.statement.line} : |
account_ids = self.pool.get('account.account').search(cr, uid, [('user_type', '=', ref('account.data_account_type_revenue')), ('tag_ids', 'in', [ref('account.account_tag_financing')])])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment