diff --git a/stock_intercompany_transfer/README.rst b/stock_intercompany_transfer/README.rst new file mode 100644 index 000000000..30debf197 --- /dev/null +++ b/stock_intercompany_transfer/README.rst @@ -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 + +Inter Company Stock Transfer +============================ +Inter Company Stock Transfer +- Create counterpart Receipt/Delivery Orders between companies + +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) + +Credits +------- +* Developer: + (V15) Midilaj V K, + (V16) Pranav T V, + (V17) Jumana Haseen, +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/stock_intercompany_transfer/__init__.py b/stock_intercompany_transfer/__init__.py new file mode 100644 index 000000000..eeac0b49f --- /dev/null +++ b/stock_intercompany_transfer/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies () +# Author: Jumana Haseen () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from . import models +from . import wizard diff --git a/stock_intercompany_transfer/__manifest__.py b/stock_intercompany_transfer/__manifest__.py new file mode 100644 index 000000000..da033d20a --- /dev/null +++ b/stock_intercompany_transfer/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies () +# Author: Jumana Haseen () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +{ + 'name': 'Inter Company Stock Transfer', + 'version': '17.0.1.0.0', + 'category': 'Inventory', + 'summary': """Create counterpart Receipt/Delivery Orders between + companies.""", + 'description': """Automatically Create Receipt/Delivery orders if any + company validates a Deliver Order/Receipt to the selected company, + Inter Company Stock Transfer, Stock Transfer,Create counterpart + Receipt/Delivery Orders between companies""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['stock', 'account'], + 'data': [ + 'views/res_company_views.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/stock_intercompany_transfer/doc/RELEASE_NOTES.md b/stock_intercompany_transfer/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..93f95544c --- /dev/null +++ b/stock_intercompany_transfer/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 18.12.2023 +#### Version 17.0.1.0.0 +##### ADD +- Initial Commit for Inter Company Stock Transfer diff --git a/stock_intercompany_transfer/models/__init__.py b/stock_intercompany_transfer/models/__init__.py new file mode 100644 index 000000000..faa3ed57d --- /dev/null +++ b/stock_intercompany_transfer/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies () +# Author: Jumana Haseen () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from . import res_company +from . import stock_picking diff --git a/stock_intercompany_transfer/models/res_company.py b/stock_intercompany_transfer/models/res_company.py new file mode 100644 index 000000000..f0a45eee7 --- /dev/null +++ b/stock_intercompany_transfer/models/res_company.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies () +# Author: Jumana Haseen () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from odoo import api, fields, models, _ + + +class ResCompany(models.Model): + """Inherits 'res.company' and adds fields""" + _inherit = 'res.company' + + enable_inter_company_transfer = fields.Boolean(string='Inter Company ' + 'Transfer', + copy=False, + help="Enable/disable inter " + "company transfer to" + "select " + "delivery/receipts.") + destination_warehouse_id = fields.Many2one('stock.warehouse', + string='Warehouse', + help="Select the destination" + " warehouse of the" + " company.") + apply_transfer_type = fields.Selection([('all', 'Delivery and ' + 'Receipts'), + ('incoming', 'Receipt'), + ('outgoing', 'Delivery Order')], + string='Apply On', + default='all', + help="Select the Picking type to " + "apply the inter " + "company transfer.") + message = fields.Text(string="Message", compute='compute_message', + help="Message shown on selecting the type " + "of orders.") + + @api.depends('apply_transfer_type', 'destination_warehouse_id') + def compute_message(self): + """Creating the Display message according to the selected type.""" + for rec in self: + if rec.apply_transfer_type == 'incoming': + create_type = "Delivery" + selected_type = "Receipt" + elif rec.apply_transfer_type == 'outgoing': + create_type = "Receipt" + selected_type = "Delivery" + else: + create_type = "Delivery Order/Receipt" + selected_type = "Receipt/Delivery" + + msg = _("Create a %s Order when a company validate a " + "%s Order for %s using %s Warehouse.") % (create_type, + selected_type, + rec.sudo().name, + rec.sudo().destination_warehouse_id.name) + rec.message = msg + + @api.onchange('enable_inter_company_transfer') + def onchange_inter_company_transfer(self): + """Function to execute on changing the boolean field Inter Company + transfer to search for the warehouse""" + company = self._origin + wh = self.env['stock.warehouse'].sudo().search([('company_id', '=', + company.sudo().id)], + limit=1, order='id ASC') + self.destination_warehouse_id = wh diff --git a/stock_intercompany_transfer/models/stock_picking.py b/stock_intercompany_transfer/models/stock_picking.py new file mode 100644 index 000000000..e3a3d64a1 --- /dev/null +++ b/stock_intercompany_transfer/models/stock_picking.py @@ -0,0 +1,143 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies () +# Author: Jumana Haseen () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# + +from odoo import models, fields, _ +from odoo.exceptions import UserError + + +class StockPickingInherit(models.Model): + """This class inherits 'stock.picking' and adds required fields """ + _inherit = 'stock.picking' + + auto_generated = fields.Boolean(string='Auto Generated Transfer', + copy=False, + help="Field helps to check the picking is " + "created from an another picking " + "or not") + is_backorder_button_clicked = fields.Boolean(default=False, + string='Backorder' + ' Button Clicked') + + def button_validate(self): + """Creating the internal transfer if it is not created + from another picking""" + active_move = [] + greater_quantity = [] + for move in self.move_ids: + if move.quantity != 0.0: + if (move.quantity < move.product_uom_qty or + move.quantity > move.product_uom_qty): + active_move.append(move.id) + if move.quantity > move.product_uom_qty: + greater_quantity.append(move.id) + if len(greater_quantity) == self.move_ids.search_count([( + 'picking_id', '=', self.id)]): + if not self.auto_generated: + self.create_intercompany_transfer() + if not self.move_ids.search( + [('picking_id', '=', self.id), ('quantity', '=', 0.0)]): + if not active_move: + if not self.auto_generated: + self.create_intercompany_transfer() + return super(StockPickingInherit, self).button_validate() + + def create_intercompany_transfer(self): + """Creating the transfer if the selected company is enabled the + internal transfer option""" + company_id = self.env['res.company'].sudo().search( + [('partner_id', '=', self.partner_id.id)], limit=1) + operation_type_id = False + location_id = False + location_dest_id = False + + if company_id and company_id.enable_inter_company_transfer: + create_transfer = False + if (self.picking_type_id.code == + company_id.apply_transfer_type or + company_id.apply_transfer_type == 'all'): + create_transfer = True + if create_transfer: + warehouse_ids = company_id.destination_warehouse_id.sudo() + if self.picking_type_id.code == 'incoming': + operation_type_id = self.env[ + 'stock.picking.type'].sudo().search( + [('warehouse_id', 'in', warehouse_ids.ids), + ('code', '=', 'outgoing')], limit=1) + + elif self.picking_type_id.code == 'outgoing': + operation_type_id = self.env[ + 'stock.picking.type'].sudo().search( + [('warehouse_id', 'in', warehouse_ids.ids), + ('code', '=', 'incoming')], limit=1) + else: + raise UserError( + _('Internal transfer between companies are not allowed')) + + if operation_type_id: + if operation_type_id.default_location_src_id: + location_id = operation_type_id.default_location_src_id.id + elif self.company_id.partner_id: + location_id = self.partner_id.property_stock_supplier.id + + if operation_type_id.default_location_dest_id: + location_dest_id = operation_type_id.default_location_dest_id.id + elif company_id.partner_id: + location_dest_id = company_id.partner_id.property_stock_customer.id + if location_id and location_dest_id: + picking_vals = { + 'partner_id': self.company_id.partner_id.id, + 'company_id': company_id.id, + 'picking_type_id': operation_type_id.id, + 'location_id': location_id, + 'location_dest_id': location_dest_id, + 'auto_generated': True, + 'origin': self.name + } + picking_id = self.env['stock.picking'].sudo().create( + picking_vals) + else: + raise UserError( + _('Please configure appropriate locations ' + 'on Operation type/Partner')) + + for move in self.move_ids: + lines = self.move_line_ids.filtered( + lambda x: x.product_id == move.product_id) + done_qty = sum(lines.mapped('quantity')) + if not done_qty: + done_qty = sum(lines.move_id.mapped('product_uom_qty')) + move_vals = { + 'picking_id': picking_id.id, + 'picking_type_id': operation_type_id.id, + 'name': move.name, + 'product_id': move.product_id.id, + 'product_uom': move.product_uom.id, + 'product_uom_qty': done_qty, + 'location_id': location_id, + 'location_dest_id': location_dest_id, + 'company_id': company_id.id, + } + self.env['stock.move'].sudo().create(move_vals) + if picking_id: + picking_id.sudo().action_confirm() + picking_id.sudo().action_assign() diff --git a/stock_intercompany_transfer/static/description/assets/icons/check.png b/stock_intercompany_transfer/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/check.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/chevron.png b/stock_intercompany_transfer/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/chevron.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/cogs.png b/stock_intercompany_transfer/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/cogs.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/consultation.png b/stock_intercompany_transfer/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/consultation.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/ecom-black.png b/stock_intercompany_transfer/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/ecom-black.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/education-black.png b/stock_intercompany_transfer/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/education-black.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/hotel-black.png b/stock_intercompany_transfer/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/hotel-black.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/license.png b/stock_intercompany_transfer/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/license.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/lifebuoy.png b/stock_intercompany_transfer/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/lifebuoy.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/manufacturing-black.png b/stock_intercompany_transfer/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/manufacturing-black.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/pos-black.png b/stock_intercompany_transfer/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/pos-black.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/puzzle.png b/stock_intercompany_transfer/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/puzzle.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/restaurant-black.png b/stock_intercompany_transfer/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/restaurant-black.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/service-black.png b/stock_intercompany_transfer/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/service-black.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/trading-black.png b/stock_intercompany_transfer/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/trading-black.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/training.png b/stock_intercompany_transfer/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/training.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/update.png b/stock_intercompany_transfer/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/update.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/user.png b/stock_intercompany_transfer/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/user.png differ diff --git a/stock_intercompany_transfer/static/description/assets/icons/wrench.png b/stock_intercompany_transfer/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/icons/wrench.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/categories.png b/stock_intercompany_transfer/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/categories.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/check-box.png b/stock_intercompany_transfer/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/check-box.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/compass.png b/stock_intercompany_transfer/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/compass.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/corporate.png b/stock_intercompany_transfer/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/corporate.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/customer-support.png b/stock_intercompany_transfer/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/customer-support.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/cybrosys-logo.png b/stock_intercompany_transfer/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/cybrosys-logo.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/features.png b/stock_intercompany_transfer/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/features.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/logo.png b/stock_intercompany_transfer/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/logo.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/pictures.png b/stock_intercompany_transfer/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/pictures.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/pie-chart.png b/stock_intercompany_transfer/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/pie-chart.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/right-arrow.png b/stock_intercompany_transfer/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/right-arrow.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/star.png b/stock_intercompany_transfer/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/star.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/support.png b/stock_intercompany_transfer/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/support.png differ diff --git a/stock_intercompany_transfer/static/description/assets/misc/whatsapp.png b/stock_intercompany_transfer/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/misc/whatsapp.png differ diff --git a/stock_intercompany_transfer/static/description/assets/modules/1.png b/stock_intercompany_transfer/static/description/assets/modules/1.png new file mode 100644 index 000000000..0c8426308 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/modules/1.png differ diff --git a/stock_intercompany_transfer/static/description/assets/modules/2.png b/stock_intercompany_transfer/static/description/assets/modules/2.png new file mode 100644 index 000000000..86d184d10 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/modules/2.png differ diff --git a/stock_intercompany_transfer/static/description/assets/modules/3.png b/stock_intercompany_transfer/static/description/assets/modules/3.png new file mode 100644 index 000000000..2ab860eda Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/modules/3.png differ diff --git a/stock_intercompany_transfer/static/description/assets/modules/4.png b/stock_intercompany_transfer/static/description/assets/modules/4.png new file mode 100644 index 000000000..46f8fe707 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/modules/4.png differ diff --git a/stock_intercompany_transfer/static/description/assets/modules/5.png b/stock_intercompany_transfer/static/description/assets/modules/5.png new file mode 100644 index 000000000..6121f79ee Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/modules/5.png differ diff --git a/stock_intercompany_transfer/static/description/assets/modules/6.png b/stock_intercompany_transfer/static/description/assets/modules/6.png new file mode 100644 index 000000000..86113644a Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/modules/6.png differ diff --git a/stock_intercompany_transfer/static/description/assets/screenshots/1.png b/stock_intercompany_transfer/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..4e6e697b9 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/screenshots/1.png differ diff --git a/stock_intercompany_transfer/static/description/assets/screenshots/2.png b/stock_intercompany_transfer/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..331d5584a Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/screenshots/2.png differ diff --git a/stock_intercompany_transfer/static/description/assets/screenshots/3.png b/stock_intercompany_transfer/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..d587f4ed1 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/screenshots/3.png differ diff --git a/stock_intercompany_transfer/static/description/assets/screenshots/4.png b/stock_intercompany_transfer/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..b7f965060 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/screenshots/4.png differ diff --git a/stock_intercompany_transfer/static/description/assets/screenshots/hero.gif b/stock_intercompany_transfer/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..9cad28a39 Binary files /dev/null and b/stock_intercompany_transfer/static/description/assets/screenshots/hero.gif differ diff --git a/stock_intercompany_transfer/static/description/banner.png b/stock_intercompany_transfer/static/description/banner.png new file mode 100644 index 000000000..318d5e213 Binary files /dev/null and b/stock_intercompany_transfer/static/description/banner.png differ diff --git a/stock_intercompany_transfer/static/description/icon.png b/stock_intercompany_transfer/static/description/icon.png new file mode 100644 index 000000000..94355d1ce Binary files /dev/null and b/stock_intercompany_transfer/static/description/icon.png differ diff --git a/stock_intercompany_transfer/static/description/index.html b/stock_intercompany_transfer/static/description/index.html new file mode 100644 index 000000000..cf26c7adb --- /dev/null +++ b/stock_intercompany_transfer/static/description/index.html @@ -0,0 +1,748 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Inter Company Stock Transfer

+

+ Automatically create Receipt/Delivery orders if any company + validates a + Delivery order/Receipt to the selected company. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Automatically create Receipt/Delivery orders if + any company validates a + Delivery order/Receipt to the selected + company.

+
+
+
+
+
+
+ +
+
+

+ Option to choose whether it can apply to Receipt + orders, Delivery Orders or both.

+
+
+
+
+
+
+ +
+
+

+ Option to choose the destination Warehouse in + the selected company.

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

+ Configure Transfer Options.

+

+ From Companies > Inter Company Transfer + tab, + configure the transfer options. + From here it can choose whether it can apply + to Receipt orders, + Delivery Orders or both. Also it is possible + to choose the company warehouse. +
+ For the Company 'My Company (San Francisco)' + the transfer will be applied on Receipts. So + if any company creates a Receipt Order for + 'My Company + (San Francisco)' + a Delivery order will automatically create + in this company.

+
+
+
+
+
+
+ +
+
+

+ Configure Transfer Options in My Company(San Francisco).

+

+ Enable both companies for creating transfer

+
+
+
+
+
+
+ +
+
+

+ Create Receipt Order.

+

+ Create a Receipt Order for My Company (San + Francisco)

+
+
+
+
+
+
+ +
+
+

+ Delivery order generated in My Company (San + Francisco)

+

+ By Validating the Receipt a Delivery order + is automatically created in the destination + company.

+

+
+
+
+
+
+
+
    +
  • + Available in + Odoo 17.0 Community and Enterprise +
  • +
  • + Automatically + create Receipt/Delivery orders if any company + validates a + Delivery order/Receipt to the selected company. +
  • +
  • + Inter Company + Stock Transfer +
      +
    • +

      + Inter Company Stock Transfer module + will help to automatically create a + Receipt/Delivery order + if any company validates a Delivery + order/Receipt to the selected + company. +

      +
    • +
    +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:18th December 2023 +
+

+ Initial Commit for Inter Company + Stock Transfer

+
+
+
+
+
+
+
+

+ 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/stock_intercompany_transfer/views/res_company_views.xml b/stock_intercompany_transfer/views/res_company_views.xml new file mode 100644 index 000000000..af28b6909 --- /dev/null +++ b/stock_intercompany_transfer/views/res_company_views.xml @@ -0,0 +1,35 @@ + + + + + res.company.view.form.inherit.stock.inter.company + res.company + + + + + + + + + + + +
+
+
+ +
+
+
+
+
+
+
+
+
+
diff --git a/stock_intercompany_transfer/wizard/__init__.py b/stock_intercompany_transfer/wizard/__init__.py new file mode 100644 index 000000000..c7ada0425 --- /dev/null +++ b/stock_intercompany_transfer/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies () +# Author: Jumana Haseen () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from . import stock_backorder_confirmation diff --git a/stock_intercompany_transfer/wizard/stock_backorder_confirmation.py b/stock_intercompany_transfer/wizard/stock_backorder_confirmation.py new file mode 100644 index 000000000..cf67ebb09 --- /dev/null +++ b/stock_intercompany_transfer/wizard/stock_backorder_confirmation.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies () +# Author: Jumana Haseen () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# +from odoo import fields, models + + +class StockBackorderConfirmation(models.TransientModel): + """This class inherits 'stock.backorder.confirmation' and adds + required fields """ + _inherit = 'stock.backorder.confirmation' + + stock_id = fields.Many2one('stock.picking', setring="Stock", + help="Stock") + + def process(self): + """Initialize variables to store pickings to be done and not to be done + Iterate through backorder_confirmation_line_ids to categorize pickings, + Get pickings to be validated from the context,Retrieve pickings to + validate from the context,If there are pickings_not_to_do, + check quantities and update context, If pickings_to_validate + are not auto-generated, create Inter company transfer""" + pickings_to_do = self.env['stock.picking'] + pickings_not_to_do = self.env['stock.picking'] + for line in self.backorder_confirmation_line_ids: + if line.to_backorder is True: + pickings_to_do |= line.picking_id + else: + pickings_not_to_do |= line.picking_id + pickings_to_validate = self.env.context.get( + 'button_validate_picking_ids') + if pickings_to_validate: + pickings_to_validate = self.env['stock.picking'].browse( + pickings_to_validate).with_context(skip_backorder=True) + if pickings_not_to_do: + self._check_less_quantities_than_expected(pickings_not_to_do) + pickings_to_validate = pickings_to_validate.with_context( + picking_ids_not_to_backorder=pickings_not_to_do.ids) + result_validate = pickings_to_validate.button_validate() + result_transfer = '' + if not pickings_to_validate.auto_generated: + result_transfer = pickings_to_validate.create_intercompany_transfer() + pickings_to_validate.write( + {'is_backorder_button_clicked': True}) + return result_validate, result_transfer + return True + + def process_cancel_backorder(self): + """ Retrieve pickings to be validated from the context,If + pickings_to_validate_ids is specified, validate and cancel backorders""" + pickings_to_validate_ids = self.env.context.get( + 'button_validate_picking_ids') + if pickings_to_validate_ids: + pickings_to_validate = self.env['stock.picking'].browse( + pickings_to_validate_ids) + self._check_less_quantities_than_expected(pickings_to_validate) + result_validate = pickings_to_validate.with_context( + skip_backorder=True, + picking_ids_not_to_backorder=self.pick_ids.ids).button_validate() + result_transfer = '' + if not pickings_to_validate.auto_generated: + result_transfer = pickings_to_validate.create_intercompany_transfer() + return result_validate, result_transfer + return True