OCA / purchase-workflow

Odoo Purchases, Workflow and Organization
GNU Affero General Public License v3.0
199 stars 765 forks source link

[16.0]purchase_last_price_info:Multicompany Permission Error, what type of migration is this #2318

Open linuxivan opened 2 months ago

linuxivan commented 2 months ago

Module

purchase_last_price_info

Describe the bug

If you have not multicompany, when you add a new line at a new purchase quotation, gives an permission error about multi-company rule, literaly you cannot make a purchase, this is migrated without review or what?

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. New DB with only 1 company
  2. Create a new purchase
  3. Add a line
  4. Change the purchase price
  5. Try to save

Additional context Tried on runboat

image

patrickt-oforce commented 1 month ago

The error happen because Odoo has changed the multi-company rule in this commit https://github.com/odoo/odoo/commit/a04df5cb1411a14752ba7a4d6b3c4b7b4f1d6d44#diff-268cc255bd6ec91b9684239e0ea25bf0026c67fbfe88afef6bc1fa4b8a63598cR52 a possible way is to restore that rule on module install and in case of migration, restore during migration