Vauxoo / odoo

Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
https://www.odoo.com
Other
9 stars 9 forks source link

[IMP] Taking away company_id mandatory field on Analytic Accounts #335

Closed hbto closed 2 years ago

hbto commented 4 years ago

This PR takes away the mandatory field in the company_id for the analytic account https://github.com/odoo/odoo/blob/11.0/addons/analytic/models/analytic_account.py#L55

to make similar to that of the v12 where that restriction no longer exists https://github.com/odoo/odoo/blob/12.0/addons/analytic/models/analytic_account.py#L132

So far this will be used as dirty-patch in patches.txt in deployed projects.

Why?

If this dirty patch is not applied the field company_id is repopulated again when doing -u all -d DB. with the company_id of the user doing the full update, admin's company this is not advisable.

-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr