← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 681497] Re: Search view fails on m2o with domain

 

Martin,

With the module attached, I did not see any bug.
Can you make sure that this is the module that causes the bug?

There is no domain on M2O's relational field and there is no search view
that can show the use of domain.

Thanks.

** Changed in: openobject-server
       Status: New => Invalid

-- 
Search view fails on m2o with domain
https://bugs.launchpad.net/bugs/681497
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

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