[FIX] contract_sale_mandate: use property_contract_template_id

This commit is contained in:
Ernesto Tejeda
2020-02-25 23:25:27 -05:00
committed by Pedro M. Baeza
parent 90f2f3b3f6
commit 476c5ddafb
3 changed files with 9 additions and 4 deletions

View File

@@ -21,16 +21,17 @@ class TestContractSaleMandate(TestContractBase):
cls.contract_template1 = cls.env['contract.template'].create(
{'name': 'Template 1'}
)
cls.product1.write(
cls.sale = cls.env.ref('sale.sale_order_2')
cls.product1.with_context(
force_company=cls.sale.company_id.id).write(
{
'is_contract': True,
'default_qty': 12,
'recurring_rule_type': "monthlylastday",
'recurring_invoicing_type': "post-paid",
'contract_template_id': cls.contract_template1.id,
'property_contract_template_id': cls.contract_template1.id,
}
)
cls.sale = cls.env.ref('sale.sale_order_2')
cls.sale.mandate_id = cls.mandate
cls.order_line1 = cls.sale.order_line.filtered(
lambda l: l.product_id == cls.product1

View File

@@ -4,7 +4,7 @@
{
'name': 'Recurring - Product Contract',
'version': '12.0.3.1.2',
'version': '12.0.4.0.0',
'category': 'Contract Management',
'license': 'AGPL-3',
'author': "LasLabs, "

View File

@@ -1,2 +1,6 @@
* Ted Salmon <tsalmon@laslabs.com>
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
* `Tecnativa <https://www.tecnativa.com>`__:
* Ernesto Tejeda
* Pedro M. Baeza