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

[FIX] fields: check for inconsistent many2many definitions #29319

wants to merge 2 commits into
base: 10.0


None yet
4 participants

rco-odoo commented Dec 6, 2018

Prevent two many2many fields from using the same config (table, column1, column2).

Fixes #24927.

@robodoo robodoo added the CI 🤖 label Dec 6, 2018

@rco-odoo rco-odoo requested a review from xmo-odoo Dec 6, 2018

@C3POdoo C3POdoo added the RD label Dec 6, 2018

@@ -2340,8 +2342,14 @@ def _setup_regular_full(self, model):
comodel = model.env[self.comodel_name]
model._field_inverses.add(self, invf)
comodel._field_inverses.add(invf, self)
elif model._auto:
# add self in m2m, so that its inverse field can find it

This comment has been minimized.


xmo-odoo Dec 6, 2018


Comment is now at the wrong position, and there should probably be a comment explaining the pseudo-assertion.


This comment has been minimized.


rco-odoo commented Dec 7, 2018

After some internal discussion with @odony and @KangOl, it was decided to not merge this on a stable version, as it may log unexpected errors on existing databases, for good or bad reason.

The field is fixed anyway in #29349.

@rco-odoo rco-odoo closed this Dec 7, 2018

@robodoo robodoo added closed 💔 and removed CI 🤖 labels Dec 7, 2018

@rco-odoo rco-odoo deleted the odoo-dev:10.0-inherit-m2m-rco branch Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment