[FIX] website_sale: display prices using public user pricelist on the shop
When a pricelist was set on the public user that was different from that of the website, the prices were displayed using the public user default currency, but the currency symbol displayed was the website default currency. The issue was that in the template, the currency was accessed as a computed, related field of website while the price was obtained using a function call. In the first case the field was obtained using sudo, and thus the call would not get the public user pricelist. Equivalent to #23519 for odoo 11.0 opw-1819230
This commit is contained in:
committed by
Nicolas Martinelli
parent
b522ab5772
commit
0c5841dccf
@@ -193,7 +193,7 @@ class Website(models.Model):
|
||||
_inherit = 'website'
|
||||
|
||||
pricelist_id = fields.Many2one('product.pricelist', compute='_compute_pricelist_id', string='Default Pricelist')
|
||||
currency_id = fields.Many2one('res.currency', related='pricelist_id.currency_id', string='Default Currency')
|
||||
currency_id = fields.Many2one('res.currency', related='pricelist_id.currency_id', related_sudo=False, string='Default Currency')
|
||||
salesperson_id = fields.Many2one('res.users', string='Salesperson')
|
||||
salesteam_id = fields.Many2one('crm.team', string='Sales Team')
|
||||
pricelist_ids = fields.One2many('product.pricelist', compute="_compute_pricelist_ids",
|
||||
|
||||
Reference in New Issue
Block a user