c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #06671
[Bug 681497] Re: Search view fails on m2o with domain
Yes, I tested by creating my record for demo and searches by various ways,but did not meet to this error.
Thanks.
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/681497
Title:
Search view fails on m2o with domain
Status in OpenObject Server:
Invalid
Bug description:
I have a model, grove, with a many2one to res.partner like so:
'grower': fields.many2one('res.partner', 'Grower', domain="[('category_id','=','Grower')]", required=True, select=True),
This is all good. However, the following search view field on the many2one fails with this error:
db.cursor:Programming error: column citrus_grove.category_id does not exist
Indeed it doesn't since category_id is in res.partner.
<record id="view_citrus_grove_filter" model="ir.ui.view">
<field name="name">citrus.grove.select</field>
<field name="model">citrus.grove</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Groves">
<group col='10' colspan='4'>
<field name="grove_name" select="1"/>
<field name="grower" select="1"/>
</group>
</search>
</field>
</record>
Searching on the grove_name works fine.
I attach a small module (not the one above) which demonstrates the problem, although the error message is different(?)
References