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

I've created a field ('Serviced Organization') and added it to Sales, in both Quotations and Sales Orders. Now, I'd like to make this same field visible in Accounting/Invoices. When I search the existing fields in Invoices, though, it doesn't show. How can I include/link a field like this from another table in the database?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

For this you have to create a new field in account.move model for your new field serviced organization. After that you can pass the value from sale order to invoice using _prepare_invoice function

try as below :

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

def _prepare_invoice
(self):
result = super(Sale, self)._prepare_invoice()
result.update({
'field_in_invoice': ​self.service_organization,
})

return result

Refer this video for more details: How To Pass New Field Value From Sale Order To Invoice In Odoo

Hope this will help you

Thanks  

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
Sales quotation Đã xử lý
2
thg 3 24
2898
1
thg 3 15
4139
1
thg 3 15
5034
0
thg 8 25
3908
1
thg 11 23
2369