@ -0,0 +1,51 @@ |
|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
Product Management System |
|||
========================== |
|||
|
|||
* This module helps in product management system. |
|||
|
|||
Configuration |
|||
============ |
|||
- No additional configuration required |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (AGPL v3). |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
Credits |
|||
------- |
|||
* Developer: (V17) Swaraj R, Contact: odoo@cybrosys.com |
|||
|
|||
Contacts |
|||
-------- |
|||
* Mail Contact : odoo@cybrosys.com |
|||
* Website : https://cybrosys.com |
|||
|
|||
Bug Tracker |
|||
----------- |
|||
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
|||
|
|||
Maintainer |
|||
========== |
|||
.. image:: https://cybrosys.com/images/logo.png |
|||
:target: https://cybrosys.com |
|||
|
|||
This module is maintained by Cybrosys Technologies. |
|||
|
|||
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import wizard |
@ -0,0 +1,73 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
{ |
|||
'name': 'Product Management System', |
|||
'version': '17.0.1.0.0', |
|||
'category': 'Warehouse , Extra Tools', |
|||
'summary': """This module helps in product management system.""", |
|||
'description': """ Mass actions are operations that might be proceeded for |
|||
a number of product templates in batch. The tool offers multiple default |
|||
actions, among which you can select the required ones.""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['product', 'website_sale', 'purchase', 'stock'], |
|||
'data': [ |
|||
'security/product_management_system_groups.xml', |
|||
'security/ir.model.access.csv', |
|||
'views/product_template_views.xml', |
|||
'views/product_management_system_menus.xml', |
|||
'wizard/product_add_vendor_views.xml', |
|||
'wizard/product_category_change_views.xml', |
|||
'wizard/product_update_price_views.xml', |
|||
'wizard/product_make_purchasable_views.xml', |
|||
'wizard/product_make_salable_views.xml', |
|||
'wizard/product_delete_views.xml', |
|||
'wizard/product_alternative_views.xml', |
|||
'wizard/product_archive_views.xml', |
|||
'wizard/product_accessory_views.xml', |
|||
'wizard/product_optional_views.xml', |
|||
'wizard/product_invoice_views.xml', |
|||
'wizard/product_customer_tax_views.xml', |
|||
'wizard/product_vendor_tax_views.xml', |
|||
'wizard/product_publish_views.xml', |
|||
'wizard/product_category_website_views.xml', |
|||
'wizard/product_add_attribute_views.xml', |
|||
'wizard/product_change_tracking_views.xml', |
|||
'wizard/product_production_location_views.xml', |
|||
'wizard/product_inventory_location_views.xml', |
|||
'wizard/product_customer_lead_time_views.xml', |
|||
], |
|||
'assets': { |
|||
'web.assets_backend': [ |
|||
'product_management_system/static/src/css/**.css', |
|||
'product_management_system/static/src/xml/**.xml', |
|||
'product_management_system/static/src/js/**.js', |
|||
] |
|||
}, |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': True, |
|||
} |
@ -0,0 +1,7 @@ |
|||
## Module <product_management_system> |
|||
|
|||
#### 19.08.2024 |
|||
#### Version 17.0.1.0.0 |
|||
#### ADD |
|||
|
|||
- Initial Commit for Product Management System |
|
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!--New user group created for product management--> |
|||
<data noupdate="1"> |
|||
<record id="user_product_management" model="res.groups"> |
|||
<field name="name">Product Management</field> |
|||
<field name="category_id" ref="base.module_category_usability"/> |
|||
</record> |
|||
</data> |
|||
</odoo> |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 287 KiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 282 KiB |
After Width: | Height: | Size: 281 KiB |
After Width: | Height: | Size: 244 KiB |
After Width: | Height: | Size: 276 KiB |
After Width: | Height: | Size: 280 KiB |
After Width: | Height: | Size: 348 KiB |
After Width: | Height: | Size: 330 KiB |
After Width: | Height: | Size: 280 KiB |
After Width: | Height: | Size: 265 KiB |
After Width: | Height: | Size: 267 KiB |
After Width: | Height: | Size: 298 KiB |
After Width: | Height: | Size: 240 KiB |
After Width: | Height: | Size: 284 KiB |
After Width: | Height: | Size: 432 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,9 @@ |
|||
.o_cp_bottom_right{ |
|||
height: fit-content; |
|||
} |
|||
.toast{ |
|||
width: 100%; |
|||
overflow-x: auto; |
|||
overflow-y: auto; |
|||
height: 20%; |
|||
} |
@ -0,0 +1,365 @@ |
|||
/** @odoo-module **/ |
|||
import { useService } from "@web/core/utils/hooks"; |
|||
import { KanbanController } from "@web/views/kanban/kanban_controller"; |
|||
import { kanbanView } from "@web/views/kanban/kanban_view"; |
|||
import { registry } from "@web/core/registry"; |
|||
import { useState, useEffect } from "@odoo/owl"; |
|||
|
|||
export class KanbanButton extends KanbanController { |
|||
static template = 'button_in_kanban.button'; |
|||
setup() { |
|||
super.setup(); |
|||
this.actionService = useService("action"); |
|||
this.state = useState({ |
|||
products_selected: [], |
|||
}); |
|||
useEffect(() => { |
|||
this.check_selected(); |
|||
const handleClick = (ev) => { |
|||
if (ev.target.classList.contains('product_check_box')) { |
|||
this._onSelectDocs(ev); |
|||
} |
|||
}; |
|||
if (this.rootRef.el) { |
|||
this.rootRef.el.addEventListener('click', handleClick); |
|||
return () => this.rootRef.el.removeEventListener('click', handleClick); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
check_selected() { |
|||
if (this.rootRef.el) { |
|||
const productDivs = this.rootRef.el.querySelectorAll('.oe_kanban_details'); |
|||
productDivs.forEach(div => { |
|||
const productId = parseInt(div.id); |
|||
const checkbox = div.querySelector('.product_check_box'); |
|||
if (checkbox) { |
|||
checkbox.checked = this.state.products_selected.includes(productId); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
|
|||
_onSelectDocs(ev) { |
|||
const checked = ev.target.checked; |
|||
const recordId = parseInt(ev.target.dataset.id); |
|||
this.state.products_selected = checked |
|||
? [...this.state.products_selected, recordId] |
|||
: this.state.products_selected.filter(id => id !== recordId); |
|||
const toast = document.querySelector('.toast'); |
|||
if (this.state.products_selected.length > 0) { |
|||
toast.classList.add('show'); |
|||
toast.style.display = 'inline'; |
|||
} else { |
|||
toast.style.display = ''; |
|||
toast.classList.remove('show'); |
|||
} |
|||
} |
|||
|
|||
_onChangeCategory(){ |
|||
// Function for changing category of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Change Category', |
|||
res_model: 'product.category.change', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onCustLeadTimeProducts (){ |
|||
// Function for changing Customer Lead Time of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Change Customer Lead Time', |
|||
res_model: 'product.customer.lead.time', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onArchiveProducts (ev){ |
|||
// Function for changing Archive Product of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Archive Product', |
|||
res_model: 'product.archive', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onUpdatePrice (){ |
|||
// Function for changing Update Price of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Update Price', |
|||
res_model: 'product.update.price', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onAddVendor (){ |
|||
// Function for changing Add Vendor of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Add Vendor', |
|||
res_model: 'product.add.vendor', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onMakeSalable (){ |
|||
// Function for Make Salable of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Make Products Salable', |
|||
res_model: 'product.make.salable', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onMakePurchasable (){ |
|||
// Function for Make Purchasable of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Make Products Purchasable', |
|||
res_model: 'product.make.purchasable', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onDeleteProducts (){ |
|||
// Function for Deleting the selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Delete Product', |
|||
res_model: 'product.delete', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onPublishProducts (){ |
|||
// Function for Publish On Website of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Publish On Website', |
|||
res_model: 'product.publish', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onAlternativeProducts (){ |
|||
// Function for Adding Alternative Product of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Add Alternative Product', |
|||
res_model: 'product.alternative', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onAccessoryProducts (){ |
|||
// Function for Adding Accessory Product of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Add Accessory Product', |
|||
res_model: 'product.accessory', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onOptionalProducts (){ |
|||
// Function for Adding Optional Product of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Add Optional Product', |
|||
res_model: 'product.optional', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onEditInvoicePolicyProducts (){ |
|||
// Function for Editing Invoice Policy of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Edit Invoice Policy', |
|||
res_model: 'product.invoice', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onAddCustomerTaxProducts (){ |
|||
// Function for Changing Customer Tax of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Change Customer Tax', |
|||
res_model: 'product.customer.tax', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onAddVendorTaxProducts (){ |
|||
// Function for Changing Vendor Tax of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Change Vendor Tax', |
|||
res_model: 'product.vendor.tax', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onWebCategChangeProducts (){ |
|||
// Function for Changing Category On Website of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Change Category On Website', |
|||
res_model: 'product.category.website', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onAddAttributeProducts (){ |
|||
// Function for Adding Product Attributes of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Add Product Attributes', |
|||
res_model: 'product.add.attribute', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onChangeTrackingProducts (){ |
|||
// Function for Changing Product Tracking of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Change Product Tracking', |
|||
res_model: 'product.change.tracking', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onChangeProductionLocation (){ |
|||
// Function for Changing Production Location of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Change Production Location', |
|||
res_model: 'product.production.location', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
|
|||
_onChangeInventoryLocation (){ |
|||
// Function for Changing Inventory Location of selected products
|
|||
this.actionService.doAction({ |
|||
type: 'ir.actions.act_window', |
|||
name: 'Change Inventory Location', |
|||
res_model: 'product.inventory.location', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: { |
|||
'default_product_ids': this.state.products_selected, |
|||
}, |
|||
}); |
|||
} |
|||
} |
|||
|
|||
const ProductKanbanView = { |
|||
...kanbanView, |
|||
Controller: KanbanButton, |
|||
}; |
|||
|
|||
registry.category("views").add("product_management_kanban_view", ProductKanbanView); |
@ -0,0 +1,174 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<templates id="template" xml:space="preserve"> |
|||
<t t-name="button_in_kanban.button" t-inherit="web.KanbanView" |
|||
t-inherit-mode="primary"> |
|||
<xpath expr="//Layout" position="before"> |
|||
<div class="new_container toast"> |
|||
<div style="padding-top:25px; display:flex;"> |
|||
<!-- Change Category Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_change_category" |
|||
t-on-click="_onChangeCategory " |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Change Category</button> |
|||
<!-- Customer Lead Time Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_customer_lead_time_products" |
|||
t-on-click="_onCustLeadTimeProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Customer Lead Time</button> |
|||
<!-- Archive Products Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_archive_products" |
|||
t-on-click="_onArchiveProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Archive Products</button> |
|||
<!-- Update Sales Price Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_update_price" |
|||
t-on-click="_onUpdatePrice" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Update Sales Price</button> |
|||
<!-- Add Vendor Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_add_vendor" |
|||
t-on-click="_onAddVendor" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Add Vendor</button> |
|||
<!-- Make Salable Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_make_salable" |
|||
t-on-click="_onMakeSalable" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Make Salable</button> |
|||
<!-- Make Purchasable Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_make_purchasable" |
|||
t-on-click="_onMakePurchasable" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Make Purchasable</button> |
|||
<!-- Delete Products Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_delete_products" |
|||
t-on-click="_onDeleteProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Delete Products</button> |
|||
<!-- Publish On Website Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_publish_products" |
|||
t-on-click="_onPublishProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Publish On Website</button> |
|||
<!-- Add Alternative Products Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_alternative_products" |
|||
t-on-click="_onAlternativeProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Add Alternative Products</button> |
|||
<!-- Add Accessory Products Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_accessory_products" |
|||
t-on-click="_onAccessoryProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Add Accessory Products</button> |
|||
<!-- Add Optional Products Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_optional_products" |
|||
t-on-click="_onOptionalProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Add Optional Products</button> |
|||
<!-- Edit Invoice Policy Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_edit_invoice_policy_products" |
|||
t-on-click="_onEditInvoicePolicyProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Edit Invoice Policy</button> |
|||
<!-- Add Customer Taxes Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_add_cust_tax_products" |
|||
t-on-click="_onAddCustomerTaxProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Change Customer Taxes</button> |
|||
<!-- Add Vendor Taxes Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_add_vendor_tax_products" |
|||
t-on-click="_onAddVendorTaxProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Change Vendor Taxes</button> |
|||
<!-- Change Website Category Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_change_web_category_products" |
|||
t-on-click="_onWebCategChangeProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Change Website Category</button> |
|||
<!-- Add Attributes & Variants Button --> |
|||
|
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_add_attribute_products" |
|||
t-on-click="_onAddAttributeProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Add Attributes & Variants</button> |
|||
<!-- Change Product Tracking Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm on_change_tracking_products" |
|||
t-on-click="_onChangeTrackingProducts" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Change Product Tracking</button> |
|||
<!-- Change Production Location Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm change_production_location_products" |
|||
t-on-click="_onChangeProductionLocation" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Change Production Location</button> |
|||
<!-- Change Inventory Location Button --> |
|||
<button name="cl" type="object" |
|||
class="btn btn-secondary btn-sm change_inventory_location_products" |
|||
t-on-click="_onChangeInventoryLocation" |
|||
style="width: 90px; padding-top: 10px; padding-left: 9px; |
|||
padding-right: 13px; padding-bottom: 5px; |
|||
border-radius: 11px; background: #714b67; |
|||
color: white; font-size: 11px;">Change Inventory Location</button> |
|||
<!-- Change Category Button --> |
|||
</div> |
|||
</div> |
|||
</xpath> |
|||
</t> |
|||
</templates> |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Root Menu for the module --> |
|||
<menuitem id="product_management_system_menu_root" |
|||
groups="product_management_system.user_product_management" |
|||
web_icon="product_management_system,static/description/icon.png" |
|||
name="Product Management" sequence="190"/> |
|||
<!-- Menus and submenus for the module --> |
|||
<menuitem id="product_template_menu_root" name="Product Management" |
|||
parent="product_management_system.product_management_system_menu_root" |
|||
action="product_management_system.product_template_action" |
|||
sequence="1"/> |
|||
</odoo> |
@ -0,0 +1,174 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Search Panel --> |
|||
<record id="product_template_view_search" model="ir.ui.view"> |
|||
<field name="name">product.template.view.search</field> |
|||
<field name="model">product.template</field> |
|||
<field name="arch" type="xml"> |
|||
<search string="Product Management"> |
|||
<field name="name" string="Product" |
|||
filter_domain="['|', '|', '|', ('default_code', 'ilike', self), ('product_variant_ids.default_code', 'ilike', self),('name', 'ilike', self), ('barcode', 'ilike', self)]"/> |
|||
<field name="categ_id" |
|||
filter_domain="[('categ_id', 'child_of', raw_value)]"/> |
|||
<separator/> |
|||
<filter string="Services" name="services" |
|||
domain="[('type','=','service')]"/> |
|||
<filter string="Products" name="consumable" |
|||
domain="[('type', 'in', ['consu', 'product'])]"/> |
|||
<separator/> |
|||
<filter string="Can be Sold" name="filter_to_sell" |
|||
domain="[('sale_ok','=',True)]"/> |
|||
<filter string="Can be Purchased" name="filter_to_purchase" |
|||
domain="[('purchase_ok', '=', True)]"/> |
|||
<separator/> |
|||
<field string="Attributes" name="attribute_line_ids" |
|||
groups="product.group_product_variant"/> |
|||
<filter invisible="1" string="Late Activities" |
|||
name="activities_overdue" |
|||
domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]" |
|||
help="Show all records which has next action date is before today"/> |
|||
<filter invisible="1" string="Today Activities" |
|||
name="activities_today" |
|||
domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/> |
|||
<filter invisible="1" string="Future Activities" |
|||
name="activities_upcoming_all" |
|||
domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d')) |
|||
]"/> |
|||
<separator/> |
|||
<filter string="Favorites" name="favorites" |
|||
domain="[('priority','=','1')]"/> |
|||
<separator/> |
|||
<filter string="Warnings" name="activities_exception" |
|||
domain="[('activity_exception_decoration', '!=', False)]"/> |
|||
<separator/> |
|||
<filter string="Archived" name="inactive" |
|||
domain="[('active','=',False)]"/> |
|||
<group expand="1" string="Group By"> |
|||
<filter string="Product Type" name="type" |
|||
context="{'group_by':'type'}"/> |
|||
<filter string="Product Category" name="categ_id" |
|||
context="{'group_by':'categ_id'}"/> |
|||
</group> |
|||
<searchpanel> |
|||
<field name="company_id" select="multi" string="Company" |
|||
icon="fa-cutlery" color="#875A7B" |
|||
enable_counters="1"/> |
|||
<field name="type" select="multi" string="Types" |
|||
icon="fa-th-large" color="#875A7B" |
|||
enable_counters="1"/> |
|||
<field name="categ_id" select="multi" string="Categories" |
|||
icon="fa-th-list" color="#875A7B" |
|||
enable_counters="1"/> |
|||
</searchpanel> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
<!-- Kanban View --> |
|||
<record id="product_template_view_kanban" model="ir.ui.view"> |
|||
<field name="name">Product.template.view.kanban</field> |
|||
<field name="model">product.template</field> |
|||
<field name="arch" type="xml"> |
|||
<kanban create="false" sample="1" js_class="product_management_kanban_view"> |
|||
<field name="id"/> |
|||
<field name="product_variant_count"/> |
|||
<field name="currency_id"/> |
|||
<field name="activity_state"/> |
|||
<progressbar field="activity_state" |
|||
colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/> |
|||
<templates> |
|||
<t t-name="kanban-box"> |
|||
<div class="oe_kanban_card oe_kanban_global_click" |
|||
style="width:430px;"> |
|||
<div class="o_kanban_image me-1"> |
|||
<img t-att-src="kanban_image('product.template', 'image_128', record.id.raw_value)" |
|||
alt="Product" class="o_image_64_contain"/> |
|||
</div> |
|||
<div class="oe_kanban_details" t-attf-id="{{record.id.value}}"> |
|||
<div class="o_kanban_record_top mb-0"> |
|||
<div class="o_kanban_record_headings"> |
|||
<strong class="o_kanban_record_title" |
|||
style="font-size:large;"> |
|||
<field name="priority" |
|||
widget="priority"/> |
|||
<field name="name"/> |
|||
</strong> |
|||
<t t-if="record.default_code.value"> |
|||
[<field name="default_code"/>] |
|||
</t> |
|||
</div> |
|||
<input type="checkbox" |
|||
class="product_check_box" |
|||
t-attf-id="{{record.id.value}}" |
|||
t-att-data-id="record.id.value" |
|||
style="height:20px;width:20px;"/> |
|||
</div> |
|||
<br/> |
|||
Category: |
|||
<strong> |
|||
<field name="categ_id"/> |
|||
</strong> |
|||
<div t-if="record.product_variant_count.value > 1" |
|||
groups="product.group_product_variant"> |
|||
<strong> |
|||
<t t-esc="record.product_variant_count.value"/> |
|||
Variants |
|||
</strong> |
|||
</div> |
|||
<div name="product_lst_price" class="mt-1"> |
|||
Price: |
|||
<strong> |
|||
<field name="list_price" |
|||
widget="monetary" |
|||
options="{'currency_field': 'currency_id', 'field_digits': True}"/> |
|||
</strong> |
|||
</div> |
|||
<div> |
|||
Type : |
|||
<strong> |
|||
<field name="type"/> |
|||
</strong> |
|||
<br/> |
|||
Invoice Policy : |
|||
<strong> |
|||
<field name="invoice_policy"/> |
|||
</strong> |
|||
<br/> |
|||
<strong> |
|||
<field name="sale_ok"/> |
|||
</strong> |
|||
Can be sold |
|||
<br/> |
|||
<strong> |
|||
<field name="purchase_ok"/> |
|||
</strong> |
|||
Can be Purchased |
|||
<br/> |
|||
<strong> |
|||
<field name="is_published"/> |
|||
</strong> |
|||
Website Published |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
</templates> |
|||
</kanban> |
|||
</field> |
|||
</record> |
|||
<!-- Kanban View Action --> |
|||
<record id="product_template_action" model="ir.actions.act_window"> |
|||
<field name="name">Product Management</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">product.template</field> |
|||
<field name="view_mode">kanban</field> |
|||
<field name="view_id" |
|||
ref="product_management_system.product_template_view_kanban"/> |
|||
<field name="search_view_id" |
|||
ref="product_management_system.product_template_view_search"/> |
|||
<field name="help" type="html"> |
|||
<p class="o_view_nocontent_smiling_face"> |
|||
Create a new product |
|||
</p> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,41 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from . import product_accessory |
|||
from . import product_add_attribute |
|||
from . import product_add_vendor |
|||
from . import product_alternative |
|||
from . import product_archive |
|||
from . import product_category_change |
|||
from . import product_category_website |
|||
from . import product_change_tracking |
|||
from . import product_customer_lead_time |
|||
from . import product_customer_tax |
|||
from . import product_delete |
|||
from . import product_inventory_location |
|||
from . import product_invoice |
|||
from . import product_make_purchasable |
|||
from . import product_make_salable |
|||
from . import product_optional |
|||
from . import product_production_location |
|||
from . import product_publish |
|||
from . import product_update_price |
|||
from . import product_vendor_tax |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductAccessory(models.TransientModel): |
|||
""" |
|||
Model for adding Accessory Products |
|||
""" |
|||
_name = 'product.accessory' |
|||
_description = 'Product Accessory' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Select products to add accessory ' |
|||
'product to them') |
|||
accessory_ids = fields.Many2many('product.product', |
|||
string="Accessory Products", |
|||
help='Products wanted to added as ' |
|||
'Accessory Products for selected ' |
|||
'product') |
|||
|
|||
def action_add_accessory_products(self): |
|||
""" |
|||
Function for adding Accessory Products for the selected products |
|||
""" |
|||
for products in self.product_ids: |
|||
if self.accessory_ids: |
|||
products.accessory_product_ids = [ |
|||
fields.Command.set(self.accessory_ids.ids)] |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Accessory Form View --> |
|||
<record id="product_accessory_view_form" model="ir.ui.view"> |
|||
<field name="name">product.accessory.view.form</field> |
|||
<field name="model">product.accessory</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Accessory Product"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
<field name="accessory_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<footer> |
|||
<button name="action_add_accessory_products" string="SAVE" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,72 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductAddAttribute(models.TransientModel): |
|||
""" |
|||
Model for adding Attributes and Variants |
|||
""" |
|||
_name = 'product.add.attribute' |
|||
_description = 'Product Add Attribute' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to add ' |
|||
'Attributes for them') |
|||
attribute_line_ids = fields.One2many('product.management.attribute', |
|||
'wizard_id', |
|||
string="Product Attributes", |
|||
help='Attribute Lines') |
|||
|
|||
def action_add_product_attributes(self): |
|||
""" |
|||
Function for adding Attributes and Variants for Selected Products |
|||
""" |
|||
for products in self.product_ids: |
|||
for line in self.attribute_line_ids: |
|||
products.attribute_line_ids = [fields.Command.create({ |
|||
'attribute_id': line.attribute_id.id, |
|||
'value_ids': line.value_ids, |
|||
})] |
|||
|
|||
|
|||
class ProductManagementAttribute(models.TransientModel): |
|||
""" |
|||
Model for attribute_lines for the model product.add.attribute |
|||
""" |
|||
_name = 'product.management.attribute' |
|||
_description = 'Product Attributes' |
|||
|
|||
attribute_id = fields.Many2one('product.attribute', |
|||
string='Attribute', |
|||
help='Attribute to add for the selected ' |
|||
'product') |
|||
value_ids = fields.Many2many('product.attribute.value', |
|||
string='Values', |
|||
help='Attribute Values to add for the ' |
|||
'selected products', |
|||
domain="[('attribute_id','=',attribute_id)]") |
|||
wizard_id = fields.Many2one('product.add.attribute', |
|||
string='Wizard Id', |
|||
help='Wizard ID') |
@ -0,0 +1,31 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Add Attribute Form View--> |
|||
<record id="product_add_attribute_view_form" model="ir.ui.view"> |
|||
<field name="name">product.add.attribute.view.form</field> |
|||
<field name="model">product.add.attribute</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Product Attributes"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<notebook> |
|||
<page string="Attributes"> |
|||
<field name="attribute_line_ids" widget="one2many"> |
|||
<tree editable="bottom"> |
|||
<field name="attribute_id"/> |
|||
<field name="value_ids" widget="many2many_tags"/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</notebook> |
|||
<footer> |
|||
<button name="action_add_product_attributes" string="SAVE" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,69 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductAddVendor(models.TransientModel): |
|||
""" |
|||
Model for adding seller_ids (product vendors) |
|||
""" |
|||
_name = 'product.add.vendor' |
|||
_description = 'Product Add Vendors' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to add ' |
|||
'vendors') |
|||
vendor_ids = fields.One2many('product.vendor', 'wizard_id', |
|||
string="Product Attributes", |
|||
help='Product Vendors') |
|||
|
|||
def action_add_product_vendors(self): |
|||
""" |
|||
Function for adding seller_ids (product vendors) for Selected Products |
|||
""" |
|||
for products in self.product_ids: |
|||
for vendor in self.vendor_ids: |
|||
products.seller_ids = [fields.Command.create({ |
|||
'partner_id': vendor.partner_id.id, |
|||
'price': vendor.price, |
|||
'currency_id': vendor.currency_id.id, |
|||
'delay': vendor.delay, |
|||
})] |
|||
|
|||
|
|||
class ProductVendor(models.TransientModel): |
|||
_name = 'product.vendor' |
|||
_description = 'Product Vendors' |
|||
|
|||
partner_id = fields.Many2one('res.partner', |
|||
string='Vendor', |
|||
help='Partner ID') |
|||
price = fields.Float(string='Price', help='Price', |
|||
required=True) |
|||
delay = fields.Integer(string='Delivery Lead Time', |
|||
help='Delivery Lead Time', required=True) |
|||
currency_id = fields.Many2one('res.currency', string='Currency', |
|||
help='Currency', required=True) |
|||
wizard_id = fields.Many2one('product.add.vendor', string='Wizard Id', |
|||
help='Wizard ID') |
@ -0,0 +1,33 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Add Vendor Form View --> |
|||
<record id="product_add_vendor_view_form" model="ir.ui.view"> |
|||
<field name="name">product.add.vendor.view.form</field> |
|||
<field name="model">product.add.vendor</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Product Add Vendor"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<notebook> |
|||
<page string="Vendors"> |
|||
<field name="vendor_ids" widget="one2many"> |
|||
<tree editable="bottom"> |
|||
<field name="partner_id"/> |
|||
<field name="currency_id"/> |
|||
<field name="price"/> |
|||
<field name="delay"/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
</notebook> |
|||
<footer> |
|||
<button name="action_add_product_vendors" string="SAVE" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,51 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductAlternative(models.TransientModel): |
|||
""" |
|||
Model for adding alternative products |
|||
""" |
|||
_name = 'product.alternative' |
|||
_description = 'Alternative Product' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to add ' |
|||
'new alternative products') |
|||
alternative_ids = fields.Many2many('product.template', |
|||
'product_management_alternative_rel', |
|||
string="Alternative Products", |
|||
help='Alternative Products for the ' |
|||
'selected products', |
|||
domain="[('id', 'not in', product_ids)]") |
|||
|
|||
def action_add_alternative_products(self): |
|||
""" |
|||
Function for adding alternative products for Selected Products |
|||
""" |
|||
for products in self.product_ids: |
|||
if self.alternative_ids: |
|||
products.alternative_product_ids = [ |
|||
fields.Command.set(self.alternative_ids.ids)] |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Alternative Form View--> |
|||
<record id="product_alternative_view_form" model="ir.ui.view"> |
|||
<field name="name">product.alternative.view.form</field> |
|||
<field name="model">product.alternative</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Alternative Product"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
<field name="alternative_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<footer> |
|||
<button name="action_add_alternative_products" string="SAVE" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,44 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductArchive(models.TransientModel): |
|||
""" |
|||
Model for archiving products |
|||
""" |
|||
_name = 'product.archive' |
|||
_description = 'Archive Products' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to archive') |
|||
|
|||
def action_archive_product(self): |
|||
""" |
|||
Function for archiving Selected Products |
|||
""" |
|||
for products in self.product_ids: |
|||
products.write({ |
|||
'active': False |
|||
}) |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Archive Form View --> |
|||
<record id="product_archive_view_form" model="ir.ui.view"> |
|||
<field name="name">product.archive.view.form</field> |
|||
<field name="model">product.archive</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Archive Product"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<h3>Do you want to make these products Archive?</h3> |
|||
<footer> |
|||
<button name="action_archive_product" string="YES" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductCategoryChange(models.TransientModel): |
|||
""" |
|||
Model for changing category |
|||
""" |
|||
_name = 'product.category.change' |
|||
_description = 'Change Product Category' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to ' |
|||
'change the category') |
|||
category_id = fields.Many2one('product.category', |
|||
string='New Category to add for the ' |
|||
'selected product', |
|||
required=True, |
|||
help='Category') |
|||
|
|||
def action_product_category_change_confirm(self): |
|||
""" |
|||
Function for changing category of Selected Products |
|||
""" |
|||
for rec in self.product_ids: |
|||
rec.write({ |
|||
'categ_id': self.category_id |
|||
}) |
@ -0,0 +1,26 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Category Change Form View --> |
|||
<record id="product_category_change_view_form" model="ir.ui.view"> |
|||
<field name="name">product.category.change.view.form</field> |
|||
<field name="model">product.category.change</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Change Category"> |
|||
<group> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<group> |
|||
<field name="category_id"/> |
|||
</group> |
|||
</group> |
|||
<footer> |
|||
<button name="action_product_category_change_confirm" string="Confirm" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,48 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductWebsiteCategory(models.TransientModel): |
|||
""" |
|||
Model for changing public_categ_ids (Website Category) |
|||
""" |
|||
_name = 'product.category.website' |
|||
_description = 'Product Website Category' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to ' |
|||
'change the website category') |
|||
public_categ_ids = fields.Many2many('product.public.category', |
|||
string="Website Product Category", |
|||
|
|||
help='Select the new Website Category ' |
|||
'for selected Products') |
|||
|
|||
def action_change_website_category(self): |
|||
""" |
|||
Function for changing public_categ_ids (Website Category) of Selected Products |
|||
""" |
|||
for products in self.product_ids: |
|||
products.public_categ_ids = [fields.Command.set(self.public_categ_ids.ids)] |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Category Website Form View --> |
|||
<record id="product_category_website_view_form" model="ir.ui.view"> |
|||
<field name="name">product.category.website.view.form</field> |
|||
<field name="model">product.category.website</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Website Category Product"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
<field name="public_categ_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<footer> |
|||
<button name="action_change_website_category" string="SAVE" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductChangeTracking(models.TransientModel): |
|||
""" |
|||
Model for changing tracking method |
|||
""" |
|||
_name = 'product.change.tracking' |
|||
_description = 'Change Product Tracking Method' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products that are selected to change ' |
|||
'the tracking') |
|||
tracking = fields.Selection([ |
|||
('serial', 'By Unique Serial Number'), |
|||
('lot', 'By Lots'), |
|||
('none', 'No Tracking')], |
|||
string='Tracking', |
|||
help='Select a tracking type to update for the selected products', |
|||
default='none', required=True) |
|||
|
|||
def action_change_product_tracking(self): |
|||
""" |
|||
Function for changing tracking method of selected products |
|||
""" |
|||
for products in self.product_ids: |
|||
products.write({'tracking': self.tracking}) |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Change Tracking Form View --> |
|||
<record id="product_change_tracking_view_form" model="ir.ui.view"> |
|||
<field name="name">product.change.tracking.view.form</field> |
|||
<field name="model">product.change.tracking</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Change Product Invoice Policy"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
<field name="tracking"/> |
|||
</group> |
|||
<footer> |
|||
<button name="action_change_product_tracking" string="SAVE" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,47 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductCustomerLeadTime(models.TransientModel): |
|||
""" |
|||
Model for changing sale_delay (Customer Lead Time) |
|||
""" |
|||
_name = 'product.customer.lead.time' |
|||
_description = 'Product Customer Lead Time' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to ' |
|||
'update the Delivery lead time') |
|||
sale_delay = fields.Integer(string='Customer Lead Time', |
|||
required=True, |
|||
help='Delivery lead time in days') |
|||
|
|||
def action_change_customer_lead_time(self): |
|||
""" |
|||
Function for changing sale_delay (Customer Lead Time) of Selected Products |
|||
""" |
|||
if self.sale_delay != 0: |
|||
for products in self.product_ids: |
|||
products.write({'sale_delay': self.sale_delay}) |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Customer Lead Time Form View --> |
|||
<record id="product_customer_lead_time_view_form" model="ir.ui.view"> |
|||
<field name="name">product.customer.lead.time.view.form</field> |
|||
<field name="model">product.customer.lead.time</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Change Customer Lead Time"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
<field name="sale_delay"/> |
|||
</group> |
|||
<footer> |
|||
<button name="action_change_customer_lead_time" string="YES" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,48 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductCustomerTax(models.TransientModel): |
|||
""" |
|||
Model for changing tax_ids (Customer Tax) |
|||
""" |
|||
_name = 'product.customer.tax' |
|||
_description = 'Product Customer Tax' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to ' |
|||
'update Customer Tax') |
|||
tax_ids = fields.Many2many('account.tax', |
|||
domain="[('type_tax_use', '=', 'sale')]", |
|||
string="Customer Tax", |
|||
help='New Customer Tax to update for the ' |
|||
'selected product') |
|||
|
|||
def action_change_customer_tax(self): |
|||
""" |
|||
Function for changing tax_ids (Customer Tax) of selected products |
|||
""" |
|||
for products in self.product_ids: |
|||
products.taxes_id = [fields.Command.set(self.tax_ids.ids)] |
@ -0,0 +1,26 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Category Tax Form View --> |
|||
<record id="product_customer_tax_view_form" model="ir.ui.view"> |
|||
<field name="name">product.customer.tax.view.form</field> |
|||
<field name="model">product.customer.tax</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Change Category"> |
|||
<group> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<group> |
|||
<field name="tax_ids" widget="many2many_tags"/> |
|||
</group> |
|||
</group> |
|||
<footer> |
|||
<button name="action_change_customer_tax" string="Confirm" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,42 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductDelete(models.TransientModel): |
|||
""" |
|||
Model for deleting products |
|||
""" |
|||
_name = 'product.delete' |
|||
_description = 'Product Delete' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to remove') |
|||
|
|||
def action_delete_product(self): |
|||
""" |
|||
Function for deleting selected products |
|||
""" |
|||
for products in self.product_ids: |
|||
products.unlink() |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Delete Form View --> |
|||
<record id="product_delete_view_form" model="ir.ui.view"> |
|||
<field name="name">product.delete.view.form</field> |
|||
<field name="model">product.delete</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Delete Product"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<h3>Do you want to make these products Delete?</h3> |
|||
<footer> |
|||
<button name="action_delete_product" string="YES" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductInventoryLocation(models.TransientModel): |
|||
""" |
|||
Model for changing product inventory location |
|||
""" |
|||
_name = 'product.inventory.location' |
|||
_description = 'Product Inventory Location' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to ' |
|||
'update the Inventory location') |
|||
inventory_location_id = fields.Many2one('stock.location', |
|||
string='Inventory Location', |
|||
required=True, |
|||
help='New Inventory location of ' |
|||
'the products to update', |
|||
domain="[('usage','=','inventory')]") |
|||
|
|||
def action_change_inventory_location(self): |
|||
""" |
|||
Function for changing product inventory location of selected products |
|||
""" |
|||
for products in self.product_ids: |
|||
products.write( |
|||
{'property_stock_inventory': self.inventory_location_id}) |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Inventory Location Form View --> |
|||
<record id="product_inventory_location_view_form" model="ir.ui.view"> |
|||
<field name="name">product.inventory.location.view.form</field> |
|||
<field name="model">product.inventory.location</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Change Product Inventory Location"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
<field name="inventory_location_id"/> |
|||
</group> |
|||
<footer> |
|||
<button name="action_change_inventory_location" string="SAVE" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,48 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductInvoice(models.TransientModel): |
|||
""" |
|||
Model for changing invoice policy |
|||
""" |
|||
_name = 'product.invoice' |
|||
_description = 'Product Invoice' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to ' |
|||
'update the invoice policy') |
|||
invoice_policy = fields.Selection([ |
|||
('order', 'Ordered Quantities'), |
|||
('delivery', 'Delivered Quantities')], |
|||
string='Invoicing Policy', help='New Invoice policy of the selected product', |
|||
default='order', required=True) |
|||
|
|||
def action_change_invoice_policy_products(self): |
|||
""" |
|||
Function for changing invoice policy of selected products |
|||
""" |
|||
for products in self.product_ids: |
|||
products.write({'invoice_policy': self.invoice_policy}) |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Product Invoice Form View --> |
|||
<record id="product_invoice_view_form" model="ir.ui.view"> |
|||
<field name="name">product.invoice.view.form</field> |
|||
<field name="model">product.invoice</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Change Product Invoice Policy"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
<field name="invoice_policy"/> |
|||
</group> |
|||
<footer> |
|||
<button name="action_change_invoice_policy_products" string="SAVE" |
|||
class="btn-primary" type="object"/> |
|||
<button string="Cancel" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,54 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductMakePurchasable(models.TransientModel): |
|||
""" |
|||
Model for making product purchasable |
|||
""" |
|||
_name = 'product.make.purchasable' |
|||
_description = 'Make Product Purchasable' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to make ' |
|||
'purchasable') |
|||
|
|||
def action_product_make_purchasable_confirm(self): |
|||
""" |
|||
Function for making product purchasable |
|||
""" |
|||
for rec in self.product_ids: |
|||
rec.write({ |
|||
'purchase_ok': True |
|||
}) |
|||
|
|||
def action_product_make_purchasable_false(self): |
|||
""" |
|||
Function for making product not purchasable |
|||
""" |
|||
for rec in self.product_ids: |
|||
rec.write({ |
|||
'purchase_ok': False |
|||
}) |
@ -0,0 +1,24 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Make Product Purchasable Form View --> |
|||
<record id="product_make_purchasable_view_form" model="ir.ui.view"> |
|||
<field name="name">product.make.purchasable.view.form</field> |
|||
<field name="model">product.make.purchasable</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Product Purchasable"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<h3>Do you want to make these products purchasable?</h3> |
|||
<footer> |
|||
<button name="action_product_make_purchasable_confirm" string="Yes" |
|||
class="btn-primary" type="object"/> |
|||
<button name="action_product_make_purchasable_false" string="NO" |
|||
class="btn-primary" type="object"/> |
|||
<button string="CLOSE" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,53 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductMakeSaleable(models.TransientModel): |
|||
""" |
|||
Model for making product Salable |
|||
""" |
|||
_name = 'product.make.salable' |
|||
_description = 'Make Product Salable' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to make salable') |
|||
|
|||
def action_product_make_salable_confirm(self): |
|||
""" |
|||
Function for making product Salable |
|||
""" |
|||
for rec in self.product_ids: |
|||
rec.write({ |
|||
'sale_ok': True |
|||
}) |
|||
|
|||
def action_product_make_salable_false(self): |
|||
""" |
|||
Function for making product not Salable |
|||
""" |
|||
for rec in self.product_ids: |
|||
rec.write({ |
|||
'sale_ok': False |
|||
}) |
@ -0,0 +1,24 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Make Product Salable Form View --> |
|||
<record id="product_make_salable_view_form" model="ir.ui.view"> |
|||
<field name="name">product.make.salable.view.form</field> |
|||
<field name="model">product.make.salable</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Product Salable"> |
|||
<group> |
|||
<field name="product_ids" widget="many2many_tags"/> |
|||
</group> |
|||
<h3>Do you want to make these products salable?</h3> |
|||
<footer> |
|||
<button name="action_product_make_salable_confirm" string="Yes" |
|||
class="btn-primary" type="object"/> |
|||
<button name="action_product_make_salable_false" string="NO" |
|||
class="btn-primary" type="object"/> |
|||
<button string="CLOSE" class="btn-secondary" |
|||
special="cancel"/> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,52 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Cybrosys Technologies (<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU AFFERO |
|||
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
|||
# (AGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################ |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ProductOptional(models.TransientModel): |
|||
""" |
|||
Model for adding optional products |
|||
""" |
|||
_name = 'product.optional' |
|||
_description = 'Optional Product' |
|||
|
|||
product_ids = fields.Many2many('product.template', |
|||
string='Selected Products', |
|||
readonly=True, |
|||
help='Products which are selected to ' |
|||
'update optional product') |
|||
optional_ids = fields.Many2many('product.template', |
|||
string="Optional Products", |
|||
required=True, |
|||
help='Optional Products to update for the ' |
|||
'selected product', |
|||
relation="product_management_optional_rel", |
|||
domain="[('id', 'not in', product_ids)]") |
|||
|
|||
def action_add_optional_products(self): |
|||
""" |
|||
Function for adding optional products for selected products |
|||
""" |
|||
for products in self.product_ids: |
|||
for items in self.optional_ids: |
|||
products.optional_product_ids = [ |
|||
fields.Command.link(items.id)] |