Skip to Content
Menu
This question has been flagged
1 Odpoveď
2262 Zobrazenia

How can I hide/remove any notes added to quotations when creating Invoice?

Anurag 

Avatar
Zrušiť

Please explain more specifically.

Autor

Let me explain more. 

When someone creates a sales Quotation and add a note in a quotation as "products will be delivered in 15 days" (just an example). 

When you are creating Invoice for this quotation, the note from Quottaion is automatically copied fromquotation/sales order to Invoice. And you can see the note is only relevant to quotation and has no relevance to Invoice.   

Best Answer

Hi,

You can inherit the_prepare_invoice function in the sale.order model and set the notes field as empty, narration is the technical name of the field.


Code:

class SaleOrder(models.Model):
_inherit = 'sale.order'

def _prepare_invoice(self):
res = super(SaleOrder, self)._prepare_invoice()
res['narration'] = ''
return res

Thanks

Avatar
Zrušiť