Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2273 มุมมอง

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

Anurag 

อวตาร
ละทิ้ง

Please explain more specifically.

ผู้เขียน

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.   

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง