Skip to content

Commit

Permalink
[IMP] payment_group: use payment_method_description also on transfers
Browse files Browse the repository at this point in the history
closes #382

Related: ingadhoc/odoo-argentina#714
Signed-off-by: Juan José Scarafía <jjs@adhoc.com.ar>
  • Loading branch information
jjscarafia committed Jul 14, 2023
1 parent 5e0fbb7 commit 507f9a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion account_payment_group/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Payment with Multiple methods",
"version": "16.0.1.3.0",
"version": "16.0.1.4.0",
"category": "Accounting",
"website": "www.adhoc.com.ar",
"author": "ADHOC SA, AITIC S.A.S",
Expand Down
21 changes: 15 additions & 6 deletions account_payment_group/views/account_payment_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,31 @@
</record>

<!-- view for payments from payment group, we need edit = true and create = true, we also clean some fields, we could also make and inherited view -->
<record id="view_account_payment_from_group_tree" model="ir.ui.view">
<record id="view_account_payment_tree" model="ir.ui.view">
<field name="name">account.payment.tree</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_tree"/>
<field name="priority">90</field>
<field name="mode">primary</field>
<field name="arch" type="xml">
<field name="payment_method_line_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="journal_id" position="after">
<field name="payment_method_description" string="Payment Method" optional="show"/>
</field>
</field>
</record>

<!-- view for payments from payment group, we need edit = true and create = true, we also clean some fields, we could also make and inherited view -->
<record id="view_account_payment_from_group_tree" model="ir.ui.view">
<field name="name">account.payment.tree</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_tree"/>
<field name="priority">90</field>
<field name="mode">primary</field>
<field name="arch" type="xml">
<field name="name" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="journal_id" position="after">
<field name="payment_method_description" string="Payment Method"/>
</field>
<field name="amount_company_currency_signed" position="after">
<field name="l10n_ar_amount_company_currency_signed" widget="monetary" string="Amount" sum="Total"/>
</field>
Expand Down

0 comments on commit 507f9a6

Please sign in to comment.