summaryrefslogtreecommitdiff
path: root/indoteknik_custom
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-01-12 11:02:57 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-01-12 11:02:57 +0700
commit8b3d929a7cae089ac12d9752d3f97793dbe084d5 (patch)
tree236f442c309560222940f15b7b6a42e05f6d2b80 /indoteknik_custom
parent19bbd3203d41d9f52206d7ceaa96480a19566197 (diff)
add new product rest api
Diffstat (limited to 'indoteknik_custom')
-rwxr-xr-xindoteknik_custom/models/x_manufactures.py2
-rwxr-xr-xindoteknik_custom/views/x_manufactures.xml16
2 files changed, 16 insertions, 2 deletions
diff --git a/indoteknik_custom/models/x_manufactures.py b/indoteknik_custom/models/x_manufactures.py
index 1d215cf8..e6842797 100755
--- a/indoteknik_custom/models/x_manufactures.py
+++ b/indoteknik_custom/models/x_manufactures.py
@@ -42,6 +42,8 @@ class XManufactures(models.Model):
('reset', 'Reset'),
('done', 'Done')
], string="Cache Reset")
+ sequence = fields.Integer(string='Sequence', help='Urutan tampil di homepage jika show as new product')
+ show_as_new_product = fields.Boolean(string='Show as New Product', help='Centang jika ingin ditammpilkan di website sebagai segment Produk Baru')
def cache_reset(self):
manufactures = self.env['x_manufactures'].search([
diff --git a/indoteknik_custom/views/x_manufactures.xml b/indoteknik_custom/views/x_manufactures.xml
index d122c6c1..c7cedd9c 100755
--- a/indoteknik_custom/views/x_manufactures.xml
+++ b/indoteknik_custom/views/x_manufactures.xml
@@ -16,13 +16,14 @@
<field name="model">x_manufactures</field>
<field name="arch" type="xml">
<tree>
- <field name="id"/>
<field name="x_name"/>
<field name="x_negara_asal"/>
<field name="x_short_desc"/>
<field name="x_manufacture_level"/>
<field name="x_manufacture_service_center"/>
<field name="cache_reset_status"/>
+ <field name="show_as_new_product"/>
+ <field name="sequence"/>
</tree>
</field>
</record>
@@ -42,6 +43,8 @@
<field name="x_manufacture_level"/>
<field name="x_produk_aksesoris_sparepart"/>
<field name="cache_reset_status"/>
+ <field name="show_as_new_product"/>
+ <field name="sequence"/>
</group>
<group>
<field name="x_logo_manufacture" widget="image"/>
@@ -54,7 +57,16 @@
<field name="x_description"/>
</page>
<page string="Relasi Produk">
- <field name="x_manufacture_product"/>
+ <field name="x_manufacture_product" widget="section_and_note_one2many" mode="tree,kanban">
+ <tree string="Products" editable="bottom">
+ <field name="default_code"/>
+ <field name="name"/>
+ <field name="create_date"/>
+ <field name="solr_flag"/>
+ <field name="product_rating"/>
+ <field name="is_new_product"/>
+ </tree>
+ </field>
</page>
<page string="Relasi Banner">
<field name="x_manufactures_banners"/>