[FIX] account_asset: Access error with shared product with deferred revenue
Steps to reproduce the bug: -Let's consider a multicompany environment with company A and B -Let's consider a shared product P for A and B -P has a deferred revenue type D set on it -D is defined in A -Let's consider a user U in company B -U creates a SO with P and try to generate the invoice Bug: A access error was raised because U is not allowed to see D and D is needed to genrate the invoice. opw:1825944
This commit is contained in:
@@ -116,6 +116,7 @@ class ProductTemplate(models.Model):
|
||||
def onchange_deferred_revenue(self):
|
||||
if self.deferred_revenue_category_id:
|
||||
self.property_account_income_id = self.deferred_revenue_category_id.account_asset_id
|
||||
self.company_id = self.deferred_revenue_category_id.company_id
|
||||
|
||||
@api.onchange('asset_category_id')
|
||||
def onchange_asset(self):
|
||||
|
||||
Reference in New Issue
Block a user