This Odoo technical development blog is my way to contribute back to the Odoo Community, for all the selfless and great sharing by the community members.
The following are 2 enhancements that i feel can make the life of the Odoo user a little easy.
1. User to select the parent company of a company. Currently, Odoo only allow the individual to select the parent company. This can be achieved by showing the parent_id on the view_partner_form by removing the standard invisible attributes.
2. Allow user only see full information of the contact and addresses, in the partner form (res.partner), without navigate to other pages to search for it. This can be achieved to show the full details of the contact.
Click "Like" at the bottom of this blog, to motivate us to continue sharing more Odoo tips.
<record model="ir.ui.view" id="res_partner_xxxx_view">
<field name="name">Partner</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="priority" eval="10"/>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<!-- unhide the parent_id -->
<xpath expr="//field[@name='parent_id']" position="attributes">
<attribute name="attrs">{}</attribute>
</xpath>
<!-- show the contact full details -->
<xpath expr="//sheet/notebook/page/field/form[1]" position="replace"/>
</field>
</record>
During the creation of the new company, user can select the parent company (parent_id field).
In the company or individual, under the contact and address page, user can select to view the full details of the contact and address (invoice, shipping, etc).
Kommentare