Skip to content

Commit

Permalink
[IMP] add a button on kanban to open child partner
Browse files Browse the repository at this point in the history
  • Loading branch information
clementmbr committed Jun 1, 2021
1 parent de2e5f2 commit 2bfde2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base_usability/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'summary': 'Better usability in base module',
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['base'],
'depends': ['base', 'contacts'],
'data': [
'security/group.xml',
'security/ir.model.access.csv',
Expand Down
9 changes: 9 additions & 0 deletions base_usability/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
<div attrs="{'invisible': [('same_vat_partner_id', '=', False)]}" position="attributes">
<attribute name="class">alert alert-warning</attribute>
</div>
<!-- Add a kanban button to open child partner -->
<xpath expr="//field[@name='child_ids']//kanban/templates/t/div" position="inside">
<div class="o_dropdown_kanban">
<a class="btn" role="button" title="Open"
t-att-href="'/web#id=' + record.id.raw_value + '&amp;action=%(contacts.action_contacts)d' + '&amp;menu_id=%(contacts.menu_contacts)d' + '&amp;view_type=form&amp;cids=1&amp;model=res.partner'">
<span class="fa fa-external-link" />
</a>
</div>
</xpath>
</field>
</record>

Expand Down

0 comments on commit 2bfde2e

Please sign in to comment.