How do I show the product default code in the "Product" column and product name in the "Description" column?
http://i.imgur.com/pnoKtxI.png
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How do I show the product default code in the "Product" column and product name in the "Description" column?
http://i.imgur.com/pnoKtxI.png
Hello Odoo_fa,
You need to do the following:
1. Override the name_get() of product.product model. (So Product column will display code!)
2. Override the onchange trigger of product_id of the purchase.order.line model. (So Description column will display name!)
Hope this helps.
Thanks.
class puchase_order_line(models.Model):
_inherit='puchase.order.line'
default_code = fields.Char('Internal Reference',related='product_id.product_tmpl_id.default_code')
you add a related field in order line and so you can print or add in a tree view ...
Hi Serpant,
could you please expalin more I want to show the default_code in account_invoice instead of Product
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Mei 22
|
2726 | ||
|
0
Jul 24
|
2035 | ||
|
1
Nov 20
|
4417 | ||
Configuring Purchase Order Form and Report
Diselesaikan
|
|
1
Okt 20
|
5009 | |
|
1
Feb 17
|
4141 |