Hi all, I'm trying to understand how domain works in tree view for a many2many relationship in OpenERP 7.0. This is a dummy class Places:
class place_type(Model):
    _name = "place.type"
    _description = "Place Type"
    _columns = {
        'name': fields.char('Name', size=16, required=True),
    }
    _order = 'name asc'
place_type()
class place(Model):
    _name = "place"
    _description = "Place"
    _columns = {
        'name': fields.char('Name', size=64, required=True),
        'type': fields.many2one('place.type', string='Type'),
    }
    _order = 'name asc'
place_type()
class res_partner(Model):
    _inherit = 'res.partner'
    _columns = {
        'place_ids': fields.many2many('place', string="Dummy Places"),
    }
res_partner()
I'm just adding to partners some places defined by a name and a type, this is my view:
<!-- places page addition to partner form -->
<record model="ir.ui.view" id="view_partner_form_with_dummy_places">
        <field name="name">res.partner.form</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form"/>
        <field name="arch" type="xml">
            <xpath expr="(sheet/notebook/page)[last()]" position="after">
                <page string="Dummy Places">
                    <field name="place_ids" domain="('type', '=', 4)"/>
                </page>
            </xpath>
        </field>
</record>
I've tried in many ways to make domain working, in this case "4" is a real type id.
I also tried to insert obviously wrong domain statements, without getting any feedback error neither  in server log nor in javascript console.
Is it completly ignored?
Latter, what I want to achieve is dynamically filtering partner places by a select field , is it possible?
I really appreciate any help!
 
                        
I want to use partner's name from 'partner_ids' field which is a 'many2many' field in the 'partner.ledger.webkit' model, in the attachment prefix for the report 'Partner Ledger Report' example 'object.company_id.name.pdf'. Please help!