[FIX] point_of_sale: allow classic users to load demo products
While click on add demo data wizard button it will generate trackback. Steps to Produce:- - Create database without demo data. - Login as Admin. - Install 'point of sale' module. - Delete all product - Create New User and give user access to 'point of sale'. - Login with new created user. - Go to 'Point of Sale' module. - Open new session - Click on Generate Demo Data >> Error occur Error: A traceback appears: AccessError: You are not allowed to create 'Point of Sale Category' (pos.category) records. This commit solves the above issue by allowing the creation of demo data on POS for users, which has User rights. sentry-4245391993 closes odoo/odoo#127263 X-original-commit: a8f5343f5b83f6eb069f9d1e542fc1e14fbedfcb Signed-off-by: David Monnom (moda) <moda@odoo.com>
This commit is contained in:
committed by
Mahamadasif Ansari
parent
427d31766d
commit
3083402d32
@@ -2108,7 +2108,7 @@ class PosSession(models.Model):
|
||||
def load_product_frontend(self):
|
||||
allowed = not self._pos_has_valid_product()
|
||||
if allowed:
|
||||
self._load_onboarding_data()
|
||||
self.sudo()._load_onboarding_data()
|
||||
|
||||
return {
|
||||
'models_data': self.get_onboarding_data(),
|
||||
|
||||
Reference in New Issue
Block a user