diff options
| author | Indoteknik . <andrifebriyadiputra@gmail.com> | 2025-05-08 17:09:56 +0700 |
|---|---|---|
| committer | Indoteknik . <andrifebriyadiputra@gmail.com> | 2025-05-08 17:09:56 +0700 |
| commit | 35ed7159d12a5eb915f4c689535e2e8654b43e63 (patch) | |
| tree | 0286be06b36ab1a61f3b9568411b018b19b67020 | |
| parent | 75bc2e5226862b8401424942ba464f6e70a03604 (diff) | |
(andri) add inherit mail.thread & mail.activity.mixim untuk log note pada pricelist
| -rw-r--r-- | indoteknik_custom/models/product_pricelist.py | 8 | ||||
| -rw-r--r-- | indoteknik_custom/views/product_pricelist.xml | 6 | ||||
| -rwxr-xr-x | indoteknik_custom/views/product_pricelist_item.xml | 6 |
3 files changed, 17 insertions, 3 deletions
diff --git a/indoteknik_custom/models/product_pricelist.py b/indoteknik_custom/models/product_pricelist.py index ea3ee6cf..46d12f4d 100644 --- a/indoteknik_custom/models/product_pricelist.py +++ b/indoteknik_custom/models/product_pricelist.py @@ -3,8 +3,9 @@ from datetime import datetime, timedelta class ProductPricelist(models.Model): - _inherit = 'product.pricelist' - + _name = 'product.pricelist' + _inherit = ['product.pricelist', 'mail.thread', 'mail.activity.mixin'] + is_flash_sale = fields.Boolean(string='Flash Sale', default=False) is_show_program = fields.Boolean(string='Show Program', default=False) banner = fields.Binary(string='Banner') @@ -56,7 +57,8 @@ class ProductPricelist(models.Model): return tier_name class ProductPricelistItem(models.Model): - _inherit = 'product.pricelist.item' + _name = 'product.pricelist.item' + _inherit = ['product.pricelist.item', 'mail.thread', 'mail.activity.mixin'] manufacture_id = fields.Many2one('x_manufactures', string='Manufacture') computed_price = fields.Float(string='Computed Price')
\ No newline at end of file diff --git a/indoteknik_custom/views/product_pricelist.xml b/indoteknik_custom/views/product_pricelist.xml index 3c2b8b8d..6a1111cf 100644 --- a/indoteknik_custom/views/product_pricelist.xml +++ b/indoteknik_custom/views/product_pricelist.xml @@ -25,6 +25,12 @@ </group> </page> </page> + <xpath expr="//sheet" position="after"> + <div class="oe_chatter"> + <field name="message_follower_ids" widget="mail_followers"/> + <field name="message_ids" widget="mail_thread"/> + </div> + </xpath> </field> </record> diff --git a/indoteknik_custom/views/product_pricelist_item.xml b/indoteknik_custom/views/product_pricelist_item.xml index 973ae181..86ee9389 100755 --- a/indoteknik_custom/views/product_pricelist_item.xml +++ b/indoteknik_custom/views/product_pricelist_item.xml @@ -11,6 +11,12 @@ <field name="model">product.pricelist.item</field> <field name="inherit_id" ref="product.product_pricelist_item_form_view" /> <field name="arch" type="xml"> + <xpath expr="//sheet" position="after"> + <div class="oe_chatter"> + <field name="message_ids" widget="mail_thread"/> + <field name="message_follower_ids" widget="mail_followers"/> + </div> + </xpath> <field name="applied_on" position="before"> <field name="pricelist_id" /> </field> |
