[IMP]membership_invoice_payment_mode: add invoice date in membership invoice wizard

This commit is contained in:
2024-05-24 10:51:28 +02:00
parent 78e84abfa3
commit 06f52380d4
4 changed files with 37 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ class MembershipInvoice(models.TransientModel):
domain=[("payment_type", "=", 'inbound')],
)
date_invoice = fields.Date(string='Invoice Date')
def membership_invoice(self):
res = super(MembershipInvoice, self).membership_invoice()
invoice_ids = None
@@ -18,5 +20,6 @@ class MembershipInvoice(models.TransientModel):
if invoice_ids:
self.env['account.invoice'].browse(invoice_ids).write({
'payment_mode_id':self.payment_mode_id.id,
'date_invoice':self.date_invoice,
})
return res

View File

@@ -8,6 +8,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='member_price']" position="after">
<field name="payment_mode_id" options="{'no_create_edit': True, 'no_open': True}" />
<field name="date_invoice"/>
</xpath>
</field>
</record>