OCA / multi-company

GNU Affero General Public License v3.0
98 stars 280 forks source link

[14.0][FIX] purchase_sale_inter_company: sync confirmed unlocked purchase updates #559

Closed chienandalu closed 7 months ago

chienandalu commented 7 months ago

When the purchase user updates the PO after the SO is generated and always if both are confirmed and unlocked, we sync the new lines to update the demand.

cc @Tecnativa TT46773

please take a look @pedrobaeza

OCA-git-bot commented 7 months ago

Hi @renda-dev, @aleuffre, some modules you are maintaining are being modified, check this out!

chienandalu commented 7 months ago

I miss a write override for also synchronizing changed quantities/prices.

I added that logic as well. For the moment only to sync quantities

francesco-ooops commented 7 months ago

When the purchase user updates the PO after the SO is generated and always if both are open, we sync the new lines to update the demand.

thanks for the PR @chienandalu , just to understand better functionally: what states are you referring to with "open"?

chienandalu commented 7 months ago

thanks for the PR @chienandalu , just to understand better functionally: what states are you referring to with "open"?

Basically, both the purchase and its sale order are in states purchase/sale

francesco-ooops commented 7 months ago

@chienandalu ok, so they're both "confirmed" :)

Will test and review

chienandalu commented 7 months ago

@chienandalu ok, so they're both "confirmed" :)

Yes, but not done (locked)

chienandalu commented 7 months ago

Chicago purchases from San Francisco, product Acoustic Block Screen qty 10 > confirm Chicago updates POL qty to 5 San Francisco still has qty 10 on SOL and picking OUT

I just tested it on runboat and it works as expected:

pedrobaeza commented 7 months ago

Please rebase, as there's now a conflict.

chienandalu commented 7 months ago
pedrobaeza commented 7 months ago

/ocabot merge minor

pedrobaeza commented 7 months ago

Please fw-port it.

OCA-git-bot commented 7 months ago

What a great day to merge this nice PR. Let's do it! Prepared branch 14.0-ocabot-merge-pr-559-by-pedrobaeza-bump-minor, awaiting test results.

OCA-git-bot commented 7 months ago

Congratulations, your PR was merged at 6552d3bfec2226c0e66e8bdd299774304387de12. Thanks a lot for contributing to OCA. ❤️