[FIX] product: default pricelist should take precedence over new ones
The default pricelist automatically created for companies if the pricelists are enabled should (like it was before with the Public Pricelist record in the data) take precedence over newly created pricelists record. This can be enforced by creating the default pricelist with a higher priority (lower sequence). closes odoo/odoo#130232 X-original-commit: ea1e83514bd6190a516f2cf92f800625876b789e Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -46,6 +46,7 @@ class ResCompany(models.Model):
|
||||
'name': _("Default %s pricelist", self.currency_id.name),
|
||||
'currency_id': self.currency_id.id,
|
||||
'company_id': self.id,
|
||||
'sequence': 10,
|
||||
})
|
||||
return values
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ class TestWebsiteSaleProductPricelist(AccountTestInvoicingCommon, TestSaleProduc
|
||||
# We will test that the mapping of an 10% included tax by a 6% by a fiscal position is taken into account when updating the cart
|
||||
self.env.user.partner_id.country_id = False
|
||||
current_website = self.env['website'].get_current_website()
|
||||
self.env['product.pricelist'].search([]).action_archive()
|
||||
pricelist = self.env['product.pricelist'].create({
|
||||
'name': 'Base Pricelist',
|
||||
'sequence': 4,
|
||||
|
||||
Reference in New Issue
Block a user