diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-07-26 12:07:48 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-07-26 12:07:48 +0700 |
| commit | 4b855ffcaeee0d961bb900f4cc9d4665cee87dd4 (patch) | |
| tree | 6df6eaf5ec06be74fd9f54360a1cadade92a4a38 | |
| parent | 093455f8ad3219670a50898c16d70394d2f1e227 (diff) | |
<iman> add catefories lob
| -rwxr-xr-x | indoteknik_custom/__manifest__.py | 1 | ||||
| -rwxr-xr-x | indoteknik_custom/models/__init__.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/website_categories_lob.py | 15 | ||||
| -rwxr-xr-x | indoteknik_custom/security/ir.model.access.csv | 1 | ||||
| -rw-r--r-- | indoteknik_custom/views/website_categories_lob.xml | 58 |
5 files changed, 76 insertions, 0 deletions
diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py index 724796c0..34ff136a 100755 --- a/indoteknik_custom/__manifest__.py +++ b/indoteknik_custom/__manifest__.py @@ -59,6 +59,7 @@ 'views/website_brand_homepage.xml', 'views/website_categories_homepage.xml', 'views/website_categories_management.xml', + 'views/website_categories_lob.xml', 'views/sales_target.xml', 'views/purchase_outstanding.xml', 'views/sales_outstanding.xml', diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index a6bab518..1c41bbff 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -37,6 +37,7 @@ from . import user_company_request from . import users from . import website_brand_homepage from . import website_categories_homepage +from . import website_categories_lob from . import website_categories_management from . import website_content from . import website_page_content diff --git a/indoteknik_custom/models/website_categories_lob.py b/indoteknik_custom/models/website_categories_lob.py new file mode 100644 index 00000000..5fd7bfef --- /dev/null +++ b/indoteknik_custom/models/website_categories_lob.py @@ -0,0 +1,15 @@ +from odoo import fields, models + + +class WebsiteCategoriesLob(models.Model): + _name = 'website.categories.lob' + _rec_name = 'category_id' + + category_id = fields.Many2one('res.partner.industry', string='Category', help='table ecommerce category') + image = fields.Binary(string='Image') + sequence = fields.Integer(string='Sequence') + status = fields.Selection([ + ('tayang', 'Tayang'), + ('tidak_tayang', 'Tidak Tayang') + ], string='Status') + category_ids = fields.Many2many('product.public.category', string='Category Parent')
\ No newline at end of file diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 597bb762..47f11d40 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -21,6 +21,7 @@ access_website_user_cart,access.website.user.cart,model_website_user_cart,,1,1,1 access_website_user_wishlist,access.website.user.wishlist,model_website_user_wishlist,,1,1,1,1 access_website_brand_homepage,access.website.brand.homepage,model_website_brand_homepage,,1,1,1,1 access_website_categories_homepage,access.website.categories.homepage,model_website_categories_homepage,,1,1,1,1 +access_website_categories_lob,access.website.categories.lob,model_website_categories_lob,,1,1,1,1 access_website_categories_management,access.website.categories.management,model_website_categories_management,,1,1,1,1 access_sales_target,access.sales.target,model_sales_target,,1,1,1,1 access_purchase_outstanding,access.purchase.outstanding,model_purchase_outstanding,,1,1,1,1 diff --git a/indoteknik_custom/views/website_categories_lob.xml b/indoteknik_custom/views/website_categories_lob.xml new file mode 100644 index 00000000..86784d75 --- /dev/null +++ b/indoteknik_custom/views/website_categories_lob.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<odoo> + <data> + <record id="website_categories_lob_action" model="ir.actions.act_window"> + <field name="name">Website Categories LOB</field> + <field name="res_model">website.categories.lob</field> + <field name="view_mode">tree,form</field> + </record> + + <record id="website_categories_lob_tree" model="ir.ui.view"> + <field name="name">Website Categories LOB</field> + <field name="model">website.categories.lob</field> + <field name="arch" type="xml"> + <tree default_order="sequence"> + <field name="sequence"/> + <field name="category_id"/> + <field name="status"/> + </tree> + </field> + </record> + + <record id="website_categories_lob_form" model="ir.ui.view"> + <field name="name">Website Categories LOB</field> + <field name="model">website.categories.lob</field> + <field name="arch" type="xml"> + <form> + <sheet> + <group> + <group> + <field name="sequence"/> + <field name="category_id"/> + <field name="image" widget="image"/> + <field name="status"/> + </group> + </group> + <notebook> + <page string="Category" name="category_ids"> + <field name="category_ids" domain="[('parent_id', '=', False)]"> + <tree> + <field name="display_name" /> + </tree> + </field> + </page> + </notebook> + </sheet> + </form> + </field> + </record> + + <menuitem + id="website_categories_lob" + name="Website Categories LOB" + parent="website_sale.menu_orders" + sequence="1" + action="website_categories_lob_action" + /> + </data> +</odoo>
\ No newline at end of file |
