Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2269 Lượt xem

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

Anurag 

Ảnh đại diện
Huỷ bỏ

Please explain more specifically.

Tác giả

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.   

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ