diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-01-10 10:30:07 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-01-10 10:30:07 +0700 |
| commit | 1641ce147735a3548ddef2982dfb6873955dfebc (patch) | |
| tree | 8e5aeeaaa71aca212efbf55420d264398b850aaf | |
| parent | e4abbde470d917d04256c9804b80d82194d73b51 (diff) | |
add manufacture in sales > product pricelist item
| -rw-r--r-- | indoteknik_custom/models/product_pricelist.py | 2 | ||||
| -rwxr-xr-x | indoteknik_custom/views/product_pricelist_item.xml | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/indoteknik_custom/models/product_pricelist.py b/indoteknik_custom/models/product_pricelist.py index 7b850d57..190887cf 100644 --- a/indoteknik_custom/models/product_pricelist.py +++ b/indoteknik_custom/models/product_pricelist.py @@ -15,6 +15,8 @@ class ProductPricelist(models.Model): class ProductPricelistItem(models.Model): _inherit = 'product.pricelist.item' + manufacture_id = fields.Many2one('x_manufactures', string='Manufacture') + @api.onchange('fixed_price','price_discount') def update_solr_flag(self): for item in self: diff --git a/indoteknik_custom/views/product_pricelist_item.xml b/indoteknik_custom/views/product_pricelist_item.xml index 94ba9e4f..80cf426b 100755 --- a/indoteknik_custom/views/product_pricelist_item.xml +++ b/indoteknik_custom/views/product_pricelist_item.xml @@ -33,5 +33,17 @@ parent="sale.product_menu_catalog" sequence="2" action="product_pricelist_item_action"/> + + <record id="product_pricelist_item_tree_view_inherit" model="ir.ui.view"> + <field name="name">product.pricelist.item.tree.view.inherit</field> + <field name="model">product.pricelist.item</field> + <field name="inherit_id" ref="product.product_pricelist_item_tree_view"/> + <field name="arch" type="xml"> + <field name="company_id" position="after"> + <field name="manufacture_id" string="Manufactures"/> + </field> + </field> + </record> + </data> </odoo>
\ No newline at end of file |
