[IMP] event_sale: set proper invoicing policy for event product(s)
Right now, the default invoice policy policy for the products is set to 'delivery'. However, in the case of event ticket products, usually you don't really handle the "delivery" of the ticket. It's most likely to be sent by email automatically. With this commit, the invocing policy for the default ticket product is set to 'order' to ease inovicing the SO. Apart from default product, the onchage method for 'event_ok' is adapted for setting the correct invoice policy and product type. Task Id : 2243915 closes odoo/odoo#63725 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
committed by
Dharmraj Jhala
parent
a64946a70c
commit
0546a1297a
@@ -14,6 +14,7 @@
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="name">Event Registration</field>
|
||||
<field name="description_sale" eval="False"/>
|
||||
<field name="invoice_policy">order</field>
|
||||
<field name="categ_id" ref="event_sale.product_category_events"/>
|
||||
<field name="type">service</field>
|
||||
</record>
|
||||
|
||||
@@ -13,6 +13,7 @@ class ProductTemplate(models.Model):
|
||||
def _onchange_event_ok(self):
|
||||
if self.event_ok:
|
||||
self.type = 'service'
|
||||
self.invoice_policy = 'order'
|
||||
|
||||
|
||||
class Product(models.Model):
|
||||
@@ -25,3 +26,4 @@ class Product(models.Model):
|
||||
""" Redirection, inheritance mechanism hides the method on the model """
|
||||
if self.event_ok:
|
||||
self.type = 'service'
|
||||
self.invoice_policy = 'order'
|
||||
|
||||
Reference in New Issue
Block a user