diff --git a/pos_mrp_order/README.rst b/pos_mrp_order/README.rst new file mode 100644 index 000000000..807e8afa3 --- /dev/null +++ b/pos_mrp_order/README.rst @@ -0,0 +1,53 @@ +.. 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 + +Make MRP Orders from POS +======================== +This module enables to create automatic MRP orders after selling through POS. + +Configuration +============= +* No additional configurations needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License, Version 3 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers : (V10) Nikhil Krishnan, + (V12) Akshay Babu, + (V13) Vaishnavi B, + (V14) Sagarika B, + (V15) Sagarika B, + (V16) Athira Premanand, + (V17) Aysha Shalin, + 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/pos_mrp_order/__init__.py b/pos_mrp_order/__init__.py new file mode 100644 index 000000000..5a53ecc1f --- /dev/null +++ b/pos_mrp_order/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Aysha Shalin (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/pos_mrp_order/__manifest__.py b/pos_mrp_order/__manifest__.py new file mode 100644 index 000000000..f74629c74 --- /dev/null +++ b/pos_mrp_order/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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': 'Make MRP Orders from POS', + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': """Generate Automatic MRP orders from POS.""", + 'description': """This module enables to create automatic MRP orders after + selling through POS.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['point_of_sale', 'mrp', 'stock'], + 'data': [ + 'security/ir.model.access.csv', + 'views/product_template_views.xml', + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'pos_mrp_order/static/src/overrides/components/payment_screen/payment_screen.js', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False +} diff --git a/pos_mrp_order/doc/RELEASE_NOTES.md b/pos_mrp_order/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..f7d6a2da6 --- /dev/null +++ b/pos_mrp_order/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 10.01.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial commit for Make MRP Orders from POS diff --git a/pos_mrp_order/models/__init__.py b/pos_mrp_order/models/__init__.py new file mode 100644 index 000000000..ed84c4d32 --- /dev/null +++ b/pos_mrp_order/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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 mrp_production +from . import product_template +from . import product_product diff --git a/pos_mrp_order/models/mrp_production.py b/pos_mrp_order/models/mrp_production.py new file mode 100644 index 000000000..a6c06f7e3 --- /dev/null +++ b/pos_mrp_order/models/mrp_production.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies( +# Author: Aysha Shalin (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 models + + +class MrpProduction(models.Model): + """ Extends MRP Production model for creating manufacturing orders from POS + orders.""" + _inherit = 'mrp.production' + + def create_mrp_from_pos(self, products): + """ Function for creating manufacturing orders.""" + product_ids = [] + if products: + for product in products: + if self.env['product.product'].browse( + int(product['id'])).to_make_mrp: + flag = 1 + if product_ids: + for product_id in product_ids: + if product_id['id'] == product['id']: + product_id['qty'] += product['qty'] + flag = 0 + if flag: + product_ids.append(product) + for prod in product_ids: + if prod['qty'] > 0: + bom_count = self.env['mrp.bom'].search([ + ('product_tmpl_id', '=', prod['product_tmpl_id'])]) + if bom_count: + bom_temp = self.env['mrp.bom'].search([ + ('product_tmpl_id', '=', prod['product_tmpl_id']), + ('product_id', '=', False)]) + bom_prod = self.env['mrp.bom'].search([ + ('product_id', '=', prod['id'])]) + if bom_prod: + bom = bom_prod[0] + elif bom_temp: + bom = bom_temp[0] + else: + bom = [] + if bom: + vals = { + 'origin': 'POS-' + prod['pos_reference'], + 'state': 'confirmed', + 'product_id': prod['id'], + 'product_tmpl_id': prod['product_tmpl_id'], + 'product_uom_id': prod['uom_id'], + 'product_qty': prod['qty'], + 'bom_id': bom.id, + } + mrp_order = self.sudo().create(vals) + list_value = [] + for bom_line in mrp_order.bom_id.bom_line_ids: + list_value.append((0, 0, { + 'raw_material_production_id': mrp_order.id, + 'name': mrp_order.name, + 'product_id': bom_line.product_id.id, + 'product_uom': bom_line.product_uom_id.id, + 'product_uom_qty': (bom_line.product_qty * mrp_order.product_qty)/self.env['mrp.bom'].search([("product_tmpl_id", "=", prod['product_tmpl_id'])]).product_qty, + 'picking_type_id': mrp_order.picking_type_id.id, + 'location_id': mrp_order.location_src_id.id, + 'location_dest_id': bom_line.product_id.with_company(self.company_id.id).property_stock_production.id, + 'company_id': mrp_order.company_id.id, + })) + finished_vals = { + 'product_id': prod['id'], + 'product_uom_qty': prod['qty'], + 'product_uom': prod['uom_id'], + 'name': mrp_order.name, + 'date_deadline': mrp_order.date_deadline, + 'picking_type_id': mrp_order.picking_type_id.id, + 'location_id': mrp_order.location_src_id.id, + 'location_dest_id': mrp_order.location_dest_id.id, + 'company_id': mrp_order.company_id.id, + 'production_id': mrp_order.id, + 'warehouse_id': mrp_order.location_dest_id.warehouse_id.id, + 'origin': mrp_order.name, + 'group_id': mrp_order.procurement_group_id.id, + 'propagate_cancel': mrp_order.propagate_cancel, + } + mrp_order.update({ + 'move_raw_ids': list_value, + 'move_finished_ids': [ + (0, 0, finished_vals)] + }) + return True diff --git a/pos_mrp_order/models/product_product.py b/pos_mrp_order/models/product_product.py new file mode 100644 index 000000000..cfd50248f --- /dev/null +++ b/pos_mrp_order/models/product_product.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Aysha Shalin (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, models, _ + + +class ProductProduct(models.Model): + """ Inheriting 'product.product' for adding custom functionality.""" + _inherit = 'product.product' + + @api.onchange('to_make_mrp') + def onchange_to_make_mrp(self): + """ Raise validation error if bom is not set in 'product.product'.""" + if self.to_make_mrp: + if not self.bom_count: + raise Warning( + _('Please set Bill of Material for this product.')) diff --git a/pos_mrp_order/models/product_template.py b/pos_mrp_order/models/product_template.py new file mode 100644 index 000000000..b521efbc7 --- /dev/null +++ b/pos_mrp_order/models/product_template.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies( +# Author: Aysha Shalin (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, _ +from odoo.exceptions import ValidationError + + +class ProductTemplate(models.Model): + """ Inheriting 'product.template' for adding custom field and functionality. + """ + _inherit = 'product.template' + + to_make_mrp = fields.Boolean( + string='To Create MRP Order', + help="Check if the product should make mrp order") + + @api.onchange('to_make_mrp') + def onchange_to_make_mrp(self): + """ Raise validation error if bom is not set in 'product.template'.""" + if self.to_make_mrp: + if not self.bom_count: + raise ValidationError(_( + 'Please set Bill of Material for this product.')) diff --git a/pos_mrp_order/security/ir.model.access.csv b/pos_mrp_order/security/ir.model.access.csv new file mode 100644 index 000000000..c4fc267f4 --- /dev/null +++ b/pos_mrp_order/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_mrp_production_pos_user,mrp.production.pos.user,mrp.model_mrp_production,point_of_sale.group_pos_user,1,1,1,0 +access_mrp_bom_pos_user,mrp.bom.pos.user,mrp.model_mrp_bom,point_of_sale.group_pos_user,1,0,0,0 diff --git a/pos_mrp_order/static/description/assets/icons/capture (1).png b/pos_mrp_order/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/capture (1).png differ diff --git a/pos_mrp_order/static/description/assets/icons/check.png b/pos_mrp_order/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/check.png differ diff --git a/pos_mrp_order/static/description/assets/icons/chevron.png b/pos_mrp_order/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/chevron.png differ diff --git a/pos_mrp_order/static/description/assets/icons/cogs.png b/pos_mrp_order/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/cogs.png differ diff --git a/pos_mrp_order/static/description/assets/icons/consultation.png b/pos_mrp_order/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/consultation.png differ diff --git a/pos_mrp_order/static/description/assets/icons/ecom-black.png b/pos_mrp_order/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/ecom-black.png differ diff --git a/pos_mrp_order/static/description/assets/icons/education-black.png b/pos_mrp_order/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/education-black.png differ diff --git a/pos_mrp_order/static/description/assets/icons/hotel-black.png b/pos_mrp_order/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/hotel-black.png differ diff --git a/pos_mrp_order/static/description/assets/icons/img.png b/pos_mrp_order/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/img.png differ diff --git a/pos_mrp_order/static/description/assets/icons/license.png b/pos_mrp_order/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/license.png differ diff --git a/pos_mrp_order/static/description/assets/icons/lifebuoy.png b/pos_mrp_order/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_mrp_order/static/description/assets/icons/manufacturing-black.png b/pos_mrp_order/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_mrp_order/static/description/assets/icons/photo-capture.png b/pos_mrp_order/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/photo-capture.png differ diff --git a/pos_mrp_order/static/description/assets/icons/pos-black.png b/pos_mrp_order/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/pos-black.png differ diff --git a/pos_mrp_order/static/description/assets/icons/puzzle.png b/pos_mrp_order/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/puzzle.png differ diff --git a/pos_mrp_order/static/description/assets/icons/restaurant-black.png b/pos_mrp_order/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_mrp_order/static/description/assets/icons/service-black.png b/pos_mrp_order/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/service-black.png differ diff --git a/pos_mrp_order/static/description/assets/icons/trading-black.png b/pos_mrp_order/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/trading-black.png differ diff --git a/pos_mrp_order/static/description/assets/icons/training.png b/pos_mrp_order/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/training.png differ diff --git a/pos_mrp_order/static/description/assets/icons/update.png b/pos_mrp_order/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/update.png differ diff --git a/pos_mrp_order/static/description/assets/icons/user.png b/pos_mrp_order/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/user.png differ diff --git a/pos_mrp_order/static/description/assets/icons/wrench.png b/pos_mrp_order/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_mrp_order/static/description/assets/icons/wrench.png differ diff --git a/pos_mrp_order/static/description/assets/misc/Cybrosys R.png b/pos_mrp_order/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/pos_mrp_order/static/description/assets/misc/Cybrosys R.png differ diff --git a/pos_mrp_order/static/description/assets/misc/email.svg b/pos_mrp_order/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/pos_mrp_order/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_mrp_order/static/description/assets/misc/phone.svg b/pos_mrp_order/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/pos_mrp_order/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/pos_mrp_order/static/description/assets/misc/star (1) 2.svg b/pos_mrp_order/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/pos_mrp_order/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_mrp_order/static/description/assets/misc/support (1) 1.svg b/pos_mrp_order/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/pos_mrp_order/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_mrp_order/static/description/assets/misc/support-email.svg b/pos_mrp_order/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/pos_mrp_order/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pos_mrp_order/static/description/assets/misc/tick-mark.svg b/pos_mrp_order/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/pos_mrp_order/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/pos_mrp_order/static/description/assets/misc/whatsapp 1.svg b/pos_mrp_order/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/pos_mrp_order/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_mrp_order/static/description/assets/misc/whatsapp.svg b/pos_mrp_order/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/pos_mrp_order/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_mrp_order/static/description/assets/modules/dashboard_pos.jpg b/pos_mrp_order/static/description/assets/modules/dashboard_pos.jpg new file mode 100644 index 000000000..2c258bc8d Binary files /dev/null and b/pos_mrp_order/static/description/assets/modules/dashboard_pos.jpg differ diff --git a/pos_mrp_order/static/description/assets/modules/dynamic_accounts_report.jpg b/pos_mrp_order/static/description/assets/modules/dynamic_accounts_report.jpg new file mode 100644 index 000000000..b967912c5 Binary files /dev/null and b/pos_mrp_order/static/description/assets/modules/dynamic_accounts_report.jpg differ diff --git a/pos_mrp_order/static/description/assets/modules/hr_payroll_community.jpg b/pos_mrp_order/static/description/assets/modules/hr_payroll_community.jpg new file mode 100644 index 000000000..2c2b887f1 Binary files /dev/null and b/pos_mrp_order/static/description/assets/modules/hr_payroll_community.jpg differ diff --git a/pos_mrp_order/static/description/assets/modules/invoice_format_editor.jpg b/pos_mrp_order/static/description/assets/modules/invoice_format_editor.jpg new file mode 100644 index 000000000..606ce2051 Binary files /dev/null and b/pos_mrp_order/static/description/assets/modules/invoice_format_editor.jpg differ diff --git a/pos_mrp_order/static/description/assets/modules/pos_greetings.jpg b/pos_mrp_order/static/description/assets/modules/pos_greetings.jpg new file mode 100644 index 000000000..d9dd6d429 Binary files /dev/null and b/pos_mrp_order/static/description/assets/modules/pos_greetings.jpg differ diff --git a/pos_mrp_order/static/description/assets/modules/pos_order_line_image.jpg b/pos_mrp_order/static/description/assets/modules/pos_order_line_image.jpg new file mode 100644 index 000000000..4d3d30f4d Binary files /dev/null and b/pos_mrp_order/static/description/assets/modules/pos_order_line_image.jpg differ diff --git a/pos_mrp_order/static/description/assets/screenshots/1.png b/pos_mrp_order/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..83a8b532b Binary files /dev/null and b/pos_mrp_order/static/description/assets/screenshots/1.png differ diff --git a/pos_mrp_order/static/description/assets/screenshots/2.png b/pos_mrp_order/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..de7128f8e Binary files /dev/null and b/pos_mrp_order/static/description/assets/screenshots/2.png differ diff --git a/pos_mrp_order/static/description/assets/screenshots/3.png b/pos_mrp_order/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..f6831a9b1 Binary files /dev/null and b/pos_mrp_order/static/description/assets/screenshots/3.png differ diff --git a/pos_mrp_order/static/description/assets/screenshots/4.png b/pos_mrp_order/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..486a5dfe1 Binary files /dev/null and b/pos_mrp_order/static/description/assets/screenshots/4.png differ diff --git a/pos_mrp_order/static/description/assets/screenshots/5.png b/pos_mrp_order/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..bec79e598 Binary files /dev/null and b/pos_mrp_order/static/description/assets/screenshots/5.png differ diff --git a/pos_mrp_order/static/description/assets/screenshots/hero.gif b/pos_mrp_order/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6e8b3b07f Binary files /dev/null and b/pos_mrp_order/static/description/assets/screenshots/hero.gif differ diff --git a/pos_mrp_order/static/description/banner.png b/pos_mrp_order/static/description/banner.png new file mode 100644 index 000000000..237d5d976 Binary files /dev/null and b/pos_mrp_order/static/description/banner.png differ diff --git a/pos_mrp_order/static/description/icon.png b/pos_mrp_order/static/description/icon.png new file mode 100644 index 000000000..7c7fa79ee Binary files /dev/null and b/pos_mrp_order/static/description/icon.png differ diff --git a/pos_mrp_order/static/description/index.html b/pos_mrp_order/static/description/index.html new file mode 100644 index 000000000..230db8d51 --- /dev/null +++ b/pos_mrp_order/static/description/index.html @@ -0,0 +1,600 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Make MRP Orders from POS

+

+ Generate Automatic MRP Orders from POS. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Automatic MRP Orders from POS.

+

Generate MRP Orders from POS. +

+
+
+
+
+
+
+ +
+
+

Select the Products for which MRP Orders Need to be Generated.

+

Determine the Products that Require the Automatic Generation of MRP Order. +

+
+
+
+
+
+
+ +
+
+

Easily Identify MRP Orders Generated from the POS.

+

Identify MRP Orders Generated from POS Easily by their Source from Manufacturing Orders. +

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ Enable 'To Create MRP Order' from the Product Form.

+
+
+
+
+
+
+ +
+
+

+ A Warning is Displayed when the Product Lacks a Bill of Material.

+

Ensure that the Product has a Bill of Material (BoM) to Prevent the System from Issuing a Warning. + Failure to Set the BoM will Result in the MRP Order not Being Generated.

+
+
+
+
+
+
+ +
+
+

+ Set Bill of Material for the Product.

+

Setting a BoM for a Product Template Allows you to Use that BoM for All Variants of that Product. + If You Set a BoM for a Specific Product Variant, it Only Applies to that Variant, + and Other Variants will not Consider that BoM. An MRP Order is Generated Only When a Relevant BoM is Available.

+
+
+
+
+
+
+ +
+
+

+ Point Of Sale.

+

+ Select the Product, make Payment and Validate the Order. Check Manufacturing Orders. +

+
+
+
+
+
+
+ +
+
+

+ Find Out the MRP Order that is Created by POS.

+

+ You Can Easily Identify the MRP Orders Generated by the POS from the 'Source'. +

+
+
+
+
+
+
+
    +
  • + Generate MRP Orders from POS Orders. +
  • +
  • + Select the Products for which MRP Orders Need to be Generated. +
  • +
  • + Easily Identify MRP Orders Generated from the POS by the 'Source'. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:30th December 2023 +
+

+ Initial Commit for Make MRP Orders from POS.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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

+
+
+
+
+
+
+

Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to us on WhatsApp!

+
+91 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/pos_mrp_order/static/src/overrides/components/payment_screen/payment_screen.js b/pos_mrp_order/static/src/overrides/components/payment_screen/payment_screen.js new file mode 100644 index 000000000..b66137ced --- /dev/null +++ b/pos_mrp_order/static/src/overrides/components/payment_screen/payment_screen.js @@ -0,0 +1,50 @@ +/** @odoo-module **/ +import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen"; +import { patch } from "@web/core/utils/patch"; +// Patch the PaymentScreen to create manufacturing orders when the order is validated +patch(PaymentScreen.prototype, { + // Creating manufacturing orders + createMRP() { + const order = this.currentOrder; + var order_line = order.get_orderlines() + var due = order.get_due(); + for (var i in order_line){ + var list_product = [] + if (order_line[i].product){ + if (order_line[i].quantity>0){ + var product_dict = { + 'id': order_line[i].product.id, + 'qty': order_line[i].quantity, + 'product_tmpl_id': order_line[i].product.product_tmpl_id, + 'pos_reference': order.name, + 'uom_id': order_line[i].product.uom_id[0], + }; + list_product.push(product_dict); + } + } + if (list_product.length){ + this.orm.call('mrp.production', 'create_mrp_from_pos', [1,list_product]) + } + } + }, + // Override the function validateOrder + async validateOrder(isForceValidate) { + if(this.pos.config.cash_rounding) { + if(!this.pos.get_order().check_paymentlines_rounding()) { + this.showPopup('ErrorPopup', { + title: _t('Rounding error in payment lines'), + body: _t("The amount of your payment lines must be rounded to validate the transaction."), + }); + return; + } + } + if (await this._isOrderValid(isForceValidate)) { + // Remove pending payments before finalizing the validation + for (let line of this.paymentLines) { + if (!line.is_done()) this.currentOrder.remove_paymentline(line); + } + await this._finalizeValidation(); + } + this.createMRP(); + } +}); diff --git a/pos_mrp_order/views/product_template_views.xml b/pos_mrp_order/views/product_template_views.xml new file mode 100644 index 000000000..8085f72d6 --- /dev/null +++ b/pos_mrp_order/views/product_template_views.xml @@ -0,0 +1,14 @@ + + + + + product.template.view.form.inherit.pos.mrp.order + product.template + + + + + + + +