diff --git a/cw_purchase/README.rst b/cw_purchase/README.rst new file mode 100644 index 000000000..91948431d --- /dev/null +++ b/cw_purchase/README.rst @@ -0,0 +1,50 @@ +.. 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 + +Catch Weight Management: Purchase +================================= +* Helps to maintain Catch Weight in Purchase module + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer:(V15) Unnimaya C O, 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 `__ + +Further information +=================== +HTML Description: ``__ diff --git a/cw_purchase/__init__.py b/cw_purchase/__init__.py new file mode 100644 index 000000000..b2744bb0c --- /dev/null +++ b/cw_purchase/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (odoo@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 . +# +################################################################################ +from . import models diff --git a/cw_purchase/__manifest__.py b/cw_purchase/__manifest__.py new file mode 100644 index 000000000..64c9fcfb5 --- /dev/null +++ b/cw_purchase/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (odoo@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 . +# +################################################################################ +{ + 'name': "Catch Weight Management: Purchase", + 'version': '15.0.1.0.0', + 'category': 'Purchases', + 'summary': """This module helps to manage catch weight in Purchase + module""", + 'description': """Catch Weight is simply a parallel unit of measure used to + manage variable-weight products. This module brings the catch weight + system in the Purchase module.We can purchase products and create bills + for them based on catch weight.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['purchase', 'cw_account'], + 'data': [ + 'views/purchase_order_views.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False +} diff --git a/cw_purchase/doc/RELEASE_NOTES.md b/cw_purchase/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..8e6cafc1d --- /dev/null +++ b/cw_purchase/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 29.09.2023 +#### Version 15.0.1.0.0 +#### ADD + +- Initial commit for Catch Weight Management: Purchase diff --git a/cw_purchase/models/__init__.py b/cw_purchase/models/__init__.py new file mode 100644 index 000000000..09df98bbe --- /dev/null +++ b/cw_purchase/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (odoo@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 . +# +################################################################################ +from . import purchase_order_line diff --git a/cw_purchase/models/purchase_order_line.py b/cw_purchase/models/purchase_order_line.py new file mode 100644 index 000000000..cc6c0a523 --- /dev/null +++ b/cw_purchase/models/purchase_order_line.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Unnimaya C O (odoo@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 . +# +################################################################################ +from odoo import api, fields, models + + +class PurchaseOrderLine(models.Model): + """Inherits Purchase Order line for adding catch weight fields and + functions""" + _inherit = 'purchase.order.line' + + cw_qty = fields.Float(string='CW Quantity', digits=(16, 4), + help="Catch weight quantity") + category_id = fields.Many2one('uom.category', string="Category", + help="Category of the Product", + default=lambda self: self.env.ref( + 'uom.product_uom_categ_kgm')) + cw_uom_id = fields.Many2one('uom.uom', string='CW-Uom', + related='product_id.cw_uom_id', + help="Catch weight unit of measure", + domain="[('category_id', '=', category_id)]") + cw_invoiced = fields.Float(string='CW-Invoiced', readonly=True, + compute='_compute_cw_invoiced', + help="True for catch weight products", + digits=(16, 4)) + cw_received = fields.Float(string='CW-Received', readonly=True, + compute='_compute_cw_invoiced', + digits=(16, 4), help='Catch weight received') + toggle_cw = fields.Boolean( + related='product_id.product_tmpl_id.catch_weight_ok', + string='is_cw_product', + help="True for catch weight products") + + def _compute_cw_invoiced(self): + """Method for calculating cw_received, cw_invoiced, price_unit and + cw_uom_id""" + for rec in self: + rec.update({ + 'cw_received': rec.qty_received * rec.product_id.average_cw_qty, + 'price_unit': rec.product_id.list_price, + 'cw_uom_id': rec.product_id.cw_uom_id, + 'cw_invoiced': rec.qty_invoiced * rec.product_id.average_cw_qty + }) + + @api.onchange('product_id', 'product_qty') + def _onchange_product_id(self): + """Method for calculating the cw unit of measure and cw quantity""" + for rec in self: + if rec.product_id.catch_weight_ok: + if rec.cw_uom_id == rec.product_uom: + rec.product_qty = rec.cw_qty + else: + rec.cw_qty = rec.product_qty * rec.product_id.average_cw_qty + + @api.onchange('cw_qty') + def _onchange_cw_qty(self): + """Method for calculating the product quantity""" + for rec in self: + if rec.product_id.catch_weight_ok and \ + rec.product_id.average_cw_qty != 0: + if rec.cw_uom_id == rec.product_uom: + rec.product_qty = rec.cw_qty + else: + rec.product_qty = rec.cw_qty / rec.product_id.average_cw_qty diff --git a/cw_purchase/static/description/assets/icons/check.png b/cw_purchase/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/cw_purchase/static/description/assets/icons/check.png differ diff --git a/cw_purchase/static/description/assets/icons/chevron.png b/cw_purchase/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/cw_purchase/static/description/assets/icons/chevron.png differ diff --git a/cw_purchase/static/description/assets/icons/cogs.png b/cw_purchase/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/cw_purchase/static/description/assets/icons/cogs.png differ diff --git a/cw_purchase/static/description/assets/icons/consultation.png b/cw_purchase/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/cw_purchase/static/description/assets/icons/consultation.png differ diff --git a/cw_purchase/static/description/assets/icons/ecom-black.png b/cw_purchase/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/cw_purchase/static/description/assets/icons/ecom-black.png differ diff --git a/cw_purchase/static/description/assets/icons/education-black.png b/cw_purchase/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/cw_purchase/static/description/assets/icons/education-black.png differ diff --git a/cw_purchase/static/description/assets/icons/hotel-black.png b/cw_purchase/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/cw_purchase/static/description/assets/icons/hotel-black.png differ diff --git a/cw_purchase/static/description/assets/icons/license.png b/cw_purchase/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/cw_purchase/static/description/assets/icons/license.png differ diff --git a/cw_purchase/static/description/assets/icons/lifebuoy.png b/cw_purchase/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/cw_purchase/static/description/assets/icons/lifebuoy.png differ diff --git a/cw_purchase/static/description/assets/icons/logo.png b/cw_purchase/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/cw_purchase/static/description/assets/icons/logo.png differ diff --git a/cw_purchase/static/description/assets/icons/manufacturing-black.png b/cw_purchase/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/cw_purchase/static/description/assets/icons/manufacturing-black.png differ diff --git a/cw_purchase/static/description/assets/icons/pos-black.png b/cw_purchase/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/cw_purchase/static/description/assets/icons/pos-black.png differ diff --git a/cw_purchase/static/description/assets/icons/puzzle.png b/cw_purchase/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/cw_purchase/static/description/assets/icons/puzzle.png differ diff --git a/cw_purchase/static/description/assets/icons/restaurant-black.png b/cw_purchase/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/cw_purchase/static/description/assets/icons/restaurant-black.png differ diff --git a/cw_purchase/static/description/assets/icons/service-black.png b/cw_purchase/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/cw_purchase/static/description/assets/icons/service-black.png differ diff --git a/cw_purchase/static/description/assets/icons/trading-black.png b/cw_purchase/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/cw_purchase/static/description/assets/icons/trading-black.png differ diff --git a/cw_purchase/static/description/assets/icons/training.png b/cw_purchase/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/cw_purchase/static/description/assets/icons/training.png differ diff --git a/cw_purchase/static/description/assets/icons/update.png b/cw_purchase/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/cw_purchase/static/description/assets/icons/update.png differ diff --git a/cw_purchase/static/description/assets/icons/user.png b/cw_purchase/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/cw_purchase/static/description/assets/icons/user.png differ diff --git a/cw_purchase/static/description/assets/icons/wrench.png b/cw_purchase/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/cw_purchase/static/description/assets/icons/wrench.png differ diff --git a/cw_purchase/static/description/assets/modules/brand.png b/cw_purchase/static/description/assets/modules/brand.png new file mode 100644 index 000000000..9088a693a Binary files /dev/null and b/cw_purchase/static/description/assets/modules/brand.png differ diff --git a/cw_purchase/static/description/assets/modules/po.png b/cw_purchase/static/description/assets/modules/po.png new file mode 100644 index 000000000..b32521ea9 Binary files /dev/null and b/cw_purchase/static/description/assets/modules/po.png differ diff --git a/cw_purchase/static/description/assets/modules/recurring.png b/cw_purchase/static/description/assets/modules/recurring.png new file mode 100644 index 000000000..a6a247492 Binary files /dev/null and b/cw_purchase/static/description/assets/modules/recurring.png differ diff --git a/cw_purchase/static/description/assets/modules/sub_total.png b/cw_purchase/static/description/assets/modules/sub_total.png new file mode 100644 index 000000000..d54f0d45c Binary files /dev/null and b/cw_purchase/static/description/assets/modules/sub_total.png differ diff --git a/cw_purchase/static/description/assets/modules/subscription.png b/cw_purchase/static/description/assets/modules/subscription.png new file mode 100644 index 000000000..37d28b7e5 Binary files /dev/null and b/cw_purchase/static/description/assets/modules/subscription.png differ diff --git a/cw_purchase/static/description/assets/modules/woocomp_connector.png b/cw_purchase/static/description/assets/modules/woocomp_connector.png new file mode 100644 index 000000000..e7699fbef Binary files /dev/null and b/cw_purchase/static/description/assets/modules/woocomp_connector.png differ diff --git a/cw_purchase/static/description/assets/screenshots/hero.gif b/cw_purchase/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6a70c500c Binary files /dev/null and b/cw_purchase/static/description/assets/screenshots/hero.gif differ diff --git a/cw_purchase/static/description/assets/screenshots/screenshot-1.png b/cw_purchase/static/description/assets/screenshots/screenshot-1.png new file mode 100644 index 000000000..8782bf9ca Binary files /dev/null and b/cw_purchase/static/description/assets/screenshots/screenshot-1.png differ diff --git a/cw_purchase/static/description/assets/screenshots/screenshot-2.png b/cw_purchase/static/description/assets/screenshots/screenshot-2.png new file mode 100644 index 000000000..c9a8e4156 Binary files /dev/null and b/cw_purchase/static/description/assets/screenshots/screenshot-2.png differ diff --git a/cw_purchase/static/description/assets/screenshots/screenshot-3.png b/cw_purchase/static/description/assets/screenshots/screenshot-3.png new file mode 100644 index 000000000..73baa390b Binary files /dev/null and b/cw_purchase/static/description/assets/screenshots/screenshot-3.png differ diff --git a/cw_purchase/static/description/assets/screenshots/screenshot-4.png b/cw_purchase/static/description/assets/screenshots/screenshot-4.png new file mode 100644 index 000000000..6ba4a0676 Binary files /dev/null and b/cw_purchase/static/description/assets/screenshots/screenshot-4.png differ diff --git a/cw_purchase/static/description/banner.jpg b/cw_purchase/static/description/banner.jpg new file mode 100644 index 000000000..2b22c4f27 Binary files /dev/null and b/cw_purchase/static/description/banner.jpg differ diff --git a/cw_purchase/static/description/icon.png b/cw_purchase/static/description/icon.png new file mode 100644 index 000000000..ec3d478a7 Binary files /dev/null and b/cw_purchase/static/description/icon.png differ diff --git a/cw_purchase/static/description/index.html b/cw_purchase/static/description/index.html new file mode 100644 index 000000000..4d889d567 --- /dev/null +++ b/cw_purchase/static/description/index.html @@ -0,0 +1,597 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+
+
+

+ Catch Weight Management: Purchase

+

+ This Module Helps to Manage Catch Weight in Purchase Module. +

+ +
+
+ +
+
+

+ Overview +

+
+
+

+ Catch weight is simply a parallel unit of measure used to + manage variable-weight products. This module brings the catch + weight system in the Purchase module.We can purchase products + and create bills for them based on catch weight." +

+
+
+
+
+

+ Features +

+
+
+
+ +
+
+

+ Catch Weight in Purchase Order.

+
+
+
+
+ +
+
+

+ Catch Weight in Stock Picking.

+
+
+
+
+ +
+
+

+ Catch Weights in Purchase Bills

+
+
+
+
+
+
+

+ Screenshots +

+
+
+

+ Enable Catch Weight Product.

+

+ We can click on the checkbox "Catch Weight Product" to enable the + Catch Weight of the product. Also + add CW-Uom and the Catch Weight.

+ +
+
+

+ Catch Weight in purchase Order.

+

+ While we select the product, if the product has Catch + Weight, then CW-Qty and + CW-Uom will be displayed there.

+ +
+
+

+ Catch Weight in Stock Picking.

+

+

+ +
+
+

+ Products can be invoiced based on their Catch Weight.

+ +
+
+ +
+
+

Suggested Products

+
+ + +
+
+ + +
+
+
+

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+
+
+ +
+
+ Hire + Odoo + Developer
+
+
+
+ +
+
+ Odoo + Integration
+
+
+
+ +
+
+ Odoo + Migration
+
+
+
+ +
+
+ Odoo + Consultancy
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + +
+
+
+

Need Help?

+
+
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + + diff --git a/cw_purchase/views/purchase_order_views.xml b/cw_purchase/views/purchase_order_views.xml new file mode 100644 index 000000000..e9d360c2f --- /dev/null +++ b/cw_purchase/views/purchase_order_views.xml @@ -0,0 +1,24 @@ + + + + + purchase.order.view.form.inherit.cw.purchase + purchase.order + + + + + + + + + + + + +