Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2275 Visualizzazioni

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

Anurag 

Avatar
Abbandona

Please explain more specifically.

Autore

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.   

Risposta migliore

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
Abbandona