Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect journal for multi-company setup #1146

Open
blueuc opened this issue Nov 25, 2024 · 2 comments
Open

Incorrect journal for multi-company setup #1146

blueuc opened this issue Nov 25, 2024 · 2 comments
Labels

Comments

@blueuc
Copy link

blueuc commented Nov 25, 2024

Module

subscription_oca/models/sale_subscription_line.py

Describe the bug

When dealing with a multi-company setup with no product-level income accounts assigned, the invoice line creation pivots to the "product category" assigned accounts. However, it does not correctly reference the company field in the subscription template when referencing the category data. This can result in incorrect income accounts being used upon invoice creation.

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Create multi-company instance
  2. Set up product category with different income accounts for each company
  3. Convert subscription to invoice for company B, it will use company A's product category income account.

Expected behavior
The company should be taken into account when referencing the 'product category' account settings.

@blueuc blueuc added the bug label Nov 25, 2024
@blueuc
Copy link
Author

blueuc commented Nov 25, 2024

Proposed solution: utilize company context:
3d54ed7

@pedrobaeza
Copy link
Member

I think it should be with_company. Can you propose a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants