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

[14.0][FIX] product_supplierinfo_intercompany: Add company to synchronise r… #714

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from

Conversation

Christian-RB
Copy link
Contributor

…ecord context

Due to the following lines:

def write(self, vals):
res = super(ProductTemplate, self).write(vals)
for rec in self:
rec.update_intercompany_prices()
return res

All intercompany supplierinfo records are updated whenever any change is made to the product. This creates an issue in the following scenario:

  1. Create Product A with no company_id (shared across companies).
  2. Create a pricelist for the Chicago company with the intercompany option enabled and an item based on a formula using cost.
  3. Modify the product cost from the Chicago company supplierinfo is computed correctly.
  4. However, if you modify the product cost from the San Francisco company, it also updates supplierinfo, but now using San Francisco's cost.

Adding the company from the pricelist helps avoid this issue.

@OCA-git-bot
Copy link
Contributor

Hi @PierrickBrun, @sebastienbeau, @kevinkhao,
some modules you are maintaining are being modified, check this out!

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

Successfully merging this pull request may close these issues.

2 participants