Skip to Content
Menu
This question has been flagged
3 Replies
1664 Views

Hi all, I have install module contacts and I want to get all contacts that I(admin) create. So what should I do?

Avatar
Discard
Author Best Answer

Thank u bro @Subbarao

=> my code :

attendees = self.env['res.partner'].search([('create_uid.partner_id.id', '=', self.env.user.partner_id.id)])

@Jackson do you have field session_id in model yet?

Avatar
Discard
Best Answer


partners = self.env['res.partner'].search([('create_uid','=',admin_id/your_id])

Avatar
Discard
Best Answer
ParseError: "Error while validating constraint

Field `session_ids` does not exist

Error context:
View `partner.instructor`
[view_id: 558, xml_id: n/a, model: res.partner, parent_id: 124]
None" while parsing /opt/odoo/odoo-10.0/addons/Open Academy folder/views/partner.xml:5, near
<record model="ir.ui.view" id="partner_instructor_form_view">
            <field name="name">partner.instructor</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="arch" type="xml">
                <notebook position="inside">
                    <page string="Sessions">
                        <group>
                            <field name="instructor"/>
                            <field name="session_ids"/>
                        </group>
                    </page>
                </notebook>
            </field>
        </record>
Avatar
Discard