mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] - Contract product are ignored on invoicing process
- Sale order line for contract product pass to nothing to invoice on order confirmation - Contract Invoices are linked to sale order line
This commit is contained in:
@@ -24,9 +24,11 @@ class SaleOrder(models.Model):
|
||||
contract_env = self.env['account.analytic.account']
|
||||
for rec in self.filtered('is_contract'):
|
||||
line_to_create_contract = rec.order_line.filtered(
|
||||
lambda r: not r.contract_id
|
||||
lambda r: not r.contract_id and r.product_id.is_contract
|
||||
)
|
||||
line_to_update_contract = rec.order_line.filtered(
|
||||
lambda r: r.contract_id and r.product_id.is_contract
|
||||
)
|
||||
line_to_update_contract = rec.order_line.filtered('contract_id')
|
||||
for contract_template in line_to_create_contract.mapped(
|
||||
'product_id.contract_template_id'
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user