cannot add a record if using _inherits field in form view

Bug #590410 reported by Adrien Guichard on 2010-06-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I use _inherits on product.product in my custom object. If I add the inherited field in the form view, I cannot save it anymore.

I attach a test-case to this bug report.

How to reproduce:
0 - install the attached module,
1 - go to Testcase Aliasing/My Base Product,
2 - press CTRL + L,
3 - Choose a "Base Product",
4 - Click on save!

Thanks for your support,

affects: openobject-client-web → openobject-server
Anup(SerpentCS) (anup-serpent) wrote :

Hello Andrien,

When you are using _inherits, you cannot have the field in the view by which you have inherited. As its a link to the inherited class and which is by default saved. Its giving such error as its getting two values for the same field. you can have any other field in the view except it. It is not a bug at all.

i.e. in your case
'_inherits = {
        'product.product': 'product_inherited_id'
You can not keep "'product_inherited_id'" in the view.
And "product_id" field is not found either in your given module or in the product module so we can not keep a field which is not found in any of the module.


Changed in openobject-server:
status: New → Invalid
Changed in openobject-server:
milestone: none → 5.0.12

Thanks, I cannot wait for 5.0.12.

In my opinion this ensure better Db schemas. Without this feature, we cannot save a derivated product that inherits from a base product, using an existing base product.

While we are at it, if I display "my_inherited_product" in tree view, but not in form view, I cannot create a new derivated product...

Thanks for your support, I will subscribe to a training!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments