Skip to content

Commit

Permalink
[FIX] product_cost_usd: replace pricelist in unit test
Browse files Browse the repository at this point in the history
The Default Pricelist might be modified in other modules
by this reason is not convinient use it in unit tests.
  • Loading branch information
suniagajose authored and nhomar committed Oct 20, 2017
1 parent 3e5c129 commit 090cfaf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions product_cost_usd/tests/test_standard_price_usd.py
Expand Up @@ -28,9 +28,10 @@ def setUp(self):
})]
})
self.pricelist_15_mxn = self.pricelist_15_usd.copy({
'name': 'Pricelist 15% USD',
'name': 'Pricelist 15% MXN',
'currency_id': self.mxn.id})
self.pricelist_id = self.ref('product.list0')
self.pricelist = self.env['product.pricelist'].create({
'name': 'Pricelist Demo'})

def set_standard_price_usd(self, price):
self.assertTrue(self.product.seller_ids)
Expand Down Expand Up @@ -117,7 +118,7 @@ def test_sale_margin_normal(self):
'state': 'draft',
'product_id': self.product.id})],
'partner_id': self.partner.id,
'pricelist_id': self.pricelist_id})
'pricelist_id': self.pricelist.id})
# Confirm the sale order.
sale_order.action_confirm()
# Verify that margin field gets bind with the value.
Expand Down

0 comments on commit 090cfaf

Please sign in to comment.