Skip to content

Commit

Permalink
Added with_company context for shared products on multi-company setups
Browse files Browse the repository at this point in the history
  • Loading branch information
blueuc committed Dec 9, 2024
1 parent ec92716 commit c9555e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion subscription_oca/models/sale_subscription_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,13 @@ def _prepare_sale_order_line(self):

def _prepare_account_move_line(self):
self.ensure_one()
#added with_company context for multi-company setups
#without separate product configurations
account = (
self.product_id.property_account_income_id
or self.product_id.categ_id.property_account_income_categ_id
or self.product_id.categ_id.with_company(
self.sale_subscription_id.company_id
).property_account_income_categ_id
)
return {
"product_id": self.product_id.id,
Expand Down

0 comments on commit c9555e2

Please sign in to comment.