[FIX] odex_takaful: automatic update
Auto-generated commit based on local changes.
This commit is contained in:
parent
955d78147f
commit
b650a0a403
|
|
@ -993,14 +993,15 @@ class TakafulSponsorship(models.Model):
|
|||
vendor_bill_vals.append(bill_values)
|
||||
|
||||
bill_id = self.env['account.move'].sudo().create(vendor_bill_vals)
|
||||
for line in bill_id.invoice_line_ids:
|
||||
line.account_id = line._get_computed_account()
|
||||
taxes = line._get_computed_taxes()
|
||||
if taxes and line.move_id.fiscal_position_id:
|
||||
taxes = line.move_id.fiscal_position_id.map_tax(taxes, partner=line.partner_id)
|
||||
line.tax_ids = taxes
|
||||
line.product_uom_id = line._get_computed_uom()
|
||||
bill_id.action_post()
|
||||
for bill in bill_id:
|
||||
for line in bill.invoice_line_ids:
|
||||
line.account_id = line._get_computed_account()
|
||||
taxes = line._get_computed_taxes()
|
||||
if taxes and line.move_id.fiscal_position_id:
|
||||
taxes = line.move_id.fiscal_position_id.map_tax(taxes, partner=line.partner_id)
|
||||
line.tax_ids = taxes
|
||||
line.product_uom_id = line._get_computed_uom()
|
||||
bill.action_post()
|
||||
else:
|
||||
sponsorship.state = 'wait_pay'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue