i try to extend the register payment dialog to show a computed custom field.
but without success.
adding the Field:
<record model="ir.ui.view" id="account_inherit_view_account_payment_invoice_form">
<field name="name">x_account.account.inherit_view_account_payment_invoice_form</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_invoice_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='journal_id']" position="after">
<field name="x_payment_term_to_pay_info" />
</xpath>
</field>
</record>
Model extended by:
class account_payment(models.Model):
_inherit = "account.payment"
x_payment_term_to_pay_info = fields.Char(string="Zahlungsbedingungen", compute='get_x_payment_term_to_pay_info')
@api.one
def get_x_payment_term_to_pay_info(self):
self.x_payment_term_to_pay_info = "TEST"
return x_payment_term_to_pay_info
But the value will not be shown in "Register Payment" wizard that ist called from an invoice.
any ideas?