Browse Source

[IMP] contract: Don't depend on external data

The test as it was, leaves to the demo pricelist the control on the price of
the product, so other modules that modifies this pricelist will make the
test to fail.

This is the minimum change needed for avoiding the problem.
pull/190/head
Pedro M. Baeza 6 years ago
parent
commit
2c4e47ad33
  1. 7
      contract/tests/test_contract.py

7
contract/tests/test_contract.py

@ -24,6 +24,13 @@ class TestContractBase(common.SavepointCase):
cls.template = cls.env['account.analytic.contract'].create( cls.template = cls.env['account.analytic.contract'].create(
cls.template_vals, cls.template_vals,
) )
# For being sure of the applied price
cls.env['product.pricelist.item'].create({
'pricelist_id': cls.partner.property_product_pricelist.id,
'product_id': cls.product.id,
'compute_price': 'formula',
'base': 'list_price',
})
cls.contract = cls.env['account.analytic.account'].create({ cls.contract = cls.env['account.analytic.account'].create({
'name': 'Test Contract', 'name': 'Test Contract',
'partner_id': cls.partner.id, 'partner_id': cls.partner.id,

Loading…
Cancel
Save