Skip to content

Commit e84f27e

Browse files
[IMP] account_payment_partner: Add a security group to display the default payment method in contacts.
1 parent 06ecac5 commit e84f27e

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

account_payment_partner/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"development_status": "Mature",
1616
"depends": ["account_payment_mode"],
1717
"data": [
18+
"security/account_payment_partner_security.xml",
1819
"views/res_partner_view.xml",
1920
"views/account_move_view.xml",
2021
"views/account_move_line.xml",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="group_show_account_payment_method" model="res.groups">
4+
<field name="name">Show the default payment method line in contacts</field>
5+
</record>
6+
</odoo>

account_payment_partner/views/res_partner_view.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
options="{'no_open': True, 'no_create': True}"
2222
/>
2323
</field>
24+
<field name="property_inbound_payment_method_line_id" position="attributes">
25+
<attribute
26+
name="groups"
27+
>account_payment_partner.group_show_account_payment_method</attribute>
28+
</field>
29+
<field
30+
name="property_outbound_payment_method_line_id"
31+
position="attributes"
32+
>
33+
<attribute
34+
name="groups"
35+
>account_payment_partner.group_show_account_payment_method</attribute>
36+
</field>
2437
</field>
2538
</record>
2639
</odoo>

0 commit comments

Comments
 (0)