Files
bank-payment/account_payment_order/views/account_invoice_view.xml
Valentin Vinagre Urteaga 0c571a2028 [FIX] account_payment_order: set partner_bank_id + order generation from invoice tree + attachment file name
- fix set partner_bank_id in account move lines
  Case: The bank account isn't set properly in the payment order lines, because the bank account is only got from account.move.line or the first bank account in the partner_id, but never from the invoice (account.move).
  Solution: With this fix, the bank account will be get from account.move when matching the criteria.
-  fix payment orders from invoice tree view
  Case: User can't add invoices to payment/debit orders from the tree view but it's still possible to add them one by one from the form view.
  Solution: Remove binding_views="form": by default are "tree & form". With this fix, users can add payment/debit orders from the invoice tree view
- fix the attachment file name & dowload.
  Case: After the configuration of a debit order and generating the .xml file, user can't download it from the next step screen using the download link.
  Solution: This fix makes the .xml file downloadable from the .xml file name as it was in older versions
2023-03-04 19:41:03 +01:00

65 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!--
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_move_form" model="ir.ui.view">
<field name="name">account_payment_order.view_move_form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account_payment_partner.view_move_form" />
<field name="arch" type="xml">
<button id="account_invoice_payment_btn" position="after">
<!-- For customer refunds:
'Add to Direct Debit Order' will deduct the refund from a customer invoice
We could also need a button 'Add to Payment Order' to reimburse
a customer via wire transfer... but I prefer to keep things
simple ; to do that, the user should manually create a payment order
and select the move lines -->
<button
name="create_account_payment_line"
type="object"
string="Add to Debit Order"
groups="account_payment_order.group_account_payment"
attrs="{'invisible': ['|', '|',
('payment_order_ok', '=', False),
('state', '!=', 'open'),
('type', 'not in', ('out_invoice', 'out_refund'))
]}"
/>
<button
name="create_account_payment_line"
type="object"
string="Add to Payment Order"
groups="account_payment_order.group_account_payment"
attrs="{'invisible': ['|', '|',
('payment_order_ok', '=', False),
('state', '!=', 'open'),
('type', 'not in', ('in_invoice', 'in_refund'))
]}"
/>
</button>
<field name="payment_mode_id" position="after">
<field name="payment_order_ok" invisible="1" />
</field>
<field name="ref" position="before">
<field
name="reference_type"
required="1"
nolabel="1"
attrs="{'readonly':[('state','!=','draft')],
'invisible': [('type', 'not in', ('out_invoice', 'out_refund'))]}"
/>
</field>
</field>
</record>
<act_window
name="Add to Payment/Debit Order"
res_model="account.invoice.payment.line.multi"
binding_model="account.move"
view_mode="form"
target="new"
id="account_invoice_create_account_payment_line_action"
/>
</odoo>