diff --git a/freight_management_system/README.rst b/freight_management_system/README.rst new file mode 100644 index 000000000..a45f4ae5a --- /dev/null +++ b/freight_management_system/README.rst @@ -0,0 +1,46 @@ +.. 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 + +Freight Management +================== +* Module for Managing All Freight Operations + +Configuration +============= +* No additional configurations needed + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V18) Abbas P, 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/freight_management_system/__init__.py b/freight_management_system/__init__.py new file mode 100644 index 000000000..de7d3e271 --- /dev/null +++ b/freight_management_system/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 model +from . import wizard diff --git a/freight_management_system/__manifest__.py b/freight_management_system/__manifest__.py new file mode 100644 index 000000000..58003b618 --- /dev/null +++ b/freight_management_system/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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': 'Freight Management', + 'version': '18.0.1.0.0', + 'category': 'Industries', + 'summary': 'Module for Managing All Freight Operations', + 'description': 'From efficient order creation and dynamic shipment planning' + 'to real-time tracking and meticulous documentation' + 'management', + 'author': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'depends': ['base', 'product', 'account'], + 'data': [ + 'security/freight_security.xml', + 'security/ir.model.access.csv', + 'data/ir_sequence_data.xml', + 'data/freight_routes_data.xml', + 'views/freight_order_views.xml', + 'views/freight_port_views.xml', + 'views/freight_container_views.xml', + 'views/custom_clearance_views.xml', + 'views/freight_service_views.xml', + 'views/order_track_views.xml', + 'report/freight_report_templates.xml', + 'report/tracking_report_templates.xml', + 'wizard/custom_clearance_revision_views.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/freight_management_system/data/freight_routes_data.xml b/freight_management_system/data/freight_routes_data.xml new file mode 100644 index 000000000..28a4f4d5b --- /dev/null +++ b/freight_management_system/data/freight_routes_data.xml @@ -0,0 +1,12 @@ + + + + + + Main Carriage + 0.00 + 0.00 + 0.00 + + + diff --git a/freight_management_system/data/ir_sequence_data.xml b/freight_management_system/data/ir_sequence_data.xml new file mode 100644 index 000000000..4075b0ea7 --- /dev/null +++ b/freight_management_system/data/ir_sequence_data.xml @@ -0,0 +1,15 @@ + + + + + + Freight Order Sequence + freight.order.sequence + FO-%(year)s-%(month)s-%(day)s- + + + + 4 + + + diff --git a/freight_management_system/doc/RELEASE_NOTES.md b/freight_management_system/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..fb6176609 --- /dev/null +++ b/freight_management_system/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 15.03.2025 +#### Version 18.0.1.0.0 +#### ADD + +- Initial commit for Freight Management diff --git a/freight_management_system/model/__init__.py b/freight_management_system/model/__init__.py new file mode 100644 index 000000000..39fcff5dc --- /dev/null +++ b/freight_management_system/model/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 custom_clearance +from . import clearance_revision +from . import freight_container +from . import freight_order +from . import freight_order_track +from . import freight_port +from . import freight_price +from . import freight_routes +from . import freight_service diff --git a/freight_management_system/model/clearance_revision.py b/freight_management_system/model/clearance_revision.py new file mode 100644 index 000000000..a74b3fe46 --- /dev/null +++ b/freight_management_system/model/clearance_revision.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 fields, models + + +class CustomClearanceRevision(models.Model): + """Allows custom clearance for freight orders""" + _name = 'clearance.revision' + _description = 'Custom Clearance Revision' + + name = fields.Char(string='Name', help='Name of the revision') + reason = fields.Text(string='Reason', help='Reason for revision') + clearance_id = fields.Many2one('custom.clearance', + string='Custom Clearance', + help='Relation from custom clearance') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) diff --git a/freight_management_system/model/custom_clearance.py b/freight_management_system/model/custom_clearance.py new file mode 100644 index 000000000..1d36b570f --- /dev/null +++ b/freight_management_system/model/custom_clearance.py @@ -0,0 +1,170 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 werkzeug import urls +from odoo import api, fields, models, _ + + +class CustomClearance(models.Model): + """Model for custom clearance""" + _name = 'custom.clearance' + _description = 'Custom Clearance' + + name = fields.Char(string='Name', compute='_compute_name', + help='Name of custom clearance') + freight_id = fields.Many2one('freight.order', required=True, + string='Freight Order', + help='Select the freight order') + date = fields.Date(string='Date', help='Date of clearance') + agent_id = fields.Many2one('res.partner', string='Agent', required=True, + help='Select the agent for the clearance') + loading_port_id = fields.Many2one('freight.port', string="Loading Port", + help='Select the port for loading') + discharging_port_id = fields.Many2one('freight.port', + string="Discharging Port", + help='Specify the discharging port') + line_ids = fields.One2many('custom.clearance.line', 'clearance_id', + string='Clearance Line', + help='Line for adding the document') + state = fields.Selection([('draft', 'Draft'), ('confirm', 'Confirm'), + ('done', 'Done')], + default='draft', string="State", + help='Different states of custom clearance') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) + + @api.depends('freight_id') + def _compute_name(self): + """Compute the name of custom clearance""" + for freight in self: + freight.name = 'CC - ' + str( + freight.freight_id.name) if freight.freight_id else 'CC - ' + + @api.onchange('freight_id') + def _onchange_freight_id(self): + """Getting default values for loading and discharging port""" + for rec in self: + rec.date = rec.freight_id.order_date + rec.loading_port_id = rec.freight_id.loading_port_id + rec.discharging_port_id = rec.freight_id.discharging_port_id + rec.agent_id = rec.freight_id.agent_id + + def action_confirm(self): + """Send mail to inform agents to custom clearance is confirmed""" + for rec in self: + rec.name = 'CC' \ + ' - ' + rec.freight_id.name + rec.state = 'confirm' + base_url = self.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + Urls = urls.url_join(base_url, + 'odoo/action-%(actionId)s/%(id)s' % { + 'id': self.id, 'actionId': self.env.ref('freight_management_system.custom_clearance_action').id}) + Urls_ = urls.url_join(base_url, + 'odoo/action-%(actionId)s/%(id)s' % { + 'id': self.freight_id.id, 'actionId': self.env.ref('freight_management_system.freight_order_action').id}) + mail_content = _('Hi %s,
' + 'The Custom Clearance %s is confirmed' + '' + '' + ) % (rec.agent_id.name, rec.name, Urls, + rec.name, Urls_, self.freight_id.name) + main_content = { + 'subject': _('Custom Clearance For %s') % self.freight_id.name, + 'author_id': self.env.user.partner_id.id, + 'body_html': mail_content, + 'email_to': rec.agent_id.email, + } + mail_id = self.env['mail.mail'].create(main_content) + mail_id.mail_message_id.body = mail_content + mail_id.send() + + def action_revision(self): + """Creating custom revision""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': 'Received/Delivered', + 'view_mode': 'form', + 'target': 'new', + 'res_model': 'custom.clearance.revision', + 'context': { + 'default_custom_id': self.id + } + } + + def action_get_revision(self): + """Getting details of custom revision""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': 'Custom Revision', + 'view_mode': 'list,form', + 'res_model': 'custom.clearance.revision', + 'domain': [('custom_id', '=', self.id)], + 'context': "{'create': False}" + } + + +class CustomClearanceLine(models.Model): + """Uploading the documents for custom clearance""" + _name = 'custom.clearance.line' + _description = 'Custom Clearance Line' + + name = fields.Char(string='Document Name', + help='Name of the document attaching') + document = fields.Binary(string="Documents", store=True, attachment=True, + help='Upload the document') + clearance_id = fields.Many2one('custom.clearance', + string='Custom Clearance', + help='Relation from custom clearance') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) diff --git a/freight_management_system/model/freight_container.py b/freight_management_system/model/freight_container.py new file mode 100644 index 000000000..3d437ff88 --- /dev/null +++ b/freight_management_system/model/freight_container.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 fields, models + + +class FreightContainer(models.Model): + """Model for creating the containers for freight""" + _name = 'freight.container' + _description = 'Freight Container' + + name = fields.Char(string='Name', required=True, + help='Name of the container') + code = fields.Char(string='Code', help='Code for the container') + size = fields.Float(string='Size', required=True, + help='Size of the container') + size_uom_id = fields.Many2one('uom.uom', string='Size UOM', + help='The unit of measure of selected size') + weight = fields.Float(string='Weight', required=True, + help='The weight capacity of container') + weight_uom_id = fields.Many2one('uom.uom', string='Weight UOM', + help='The unit of measure of selected' + 'weight') + volume = fields.Float(string='Volume', required=True, + help='Volume of the container') + volume_uom_id = fields.Many2one('uom.uom', string='Volume UOM', + help='The unit of measure of the volume') + active = fields.Boolean(string='Active', default=True, + help='Make it active or inactive') + state = fields.Selection([('available', 'Available'), + ('reserve', 'Reserve')], default='available', + help='Select the state') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) diff --git a/freight_management_system/model/freight_order.py b/freight_management_system/model/freight_order.py new file mode 100644 index 000000000..4100e4e62 --- /dev/null +++ b/freight_management_system/model/freight_order.py @@ -0,0 +1,588 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 werkzeug import urls +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError + + +class FreightOrder(models.Model): + """Model for creating freight orders""" + _name = 'freight.order' + _description = 'Freight Order' + + name = fields.Char(string='Name', default='New', readonly=True, + help='Name of the order') + shipper_id = fields.Many2one('res.partner', string='Shipper', required=True, + help="Shipper's Details") + consignee_id = fields.Many2one('res.partner', 'Consignee', + help="Select the consignee for the order") + type = fields.Selection([('import', 'Import'), ('export', 'Export')], + string='Import/Export', required=True, + help="Type of freight operation") + transport_type = fields.Selection([('land', 'Land'), ('air', 'Air'), + ('water', 'Water')], string='Transport', + help='Type of transportation', + required=True) + land_type = fields.Selection([('ltl', 'LTL'), ('ftl', 'FTL')], + string='Land Shipping', + help="Types of shipment movement involved in" + "Land") + water_type = fields.Selection([('fcl', 'FCL'), ('lcl', 'LCL')], + string='Water Shipping', + help="Types of shipment movement involved in" + "Water") + order_date = fields.Date(string='Date', default=fields.Date.today(), + help="Date of order") + loading_port_id = fields.Many2one('freight.port', string="Loading Port", + required=True, + help="Loading port of the freight order") + discharging_port_id = fields.Many2one('freight.port', + string="Discharging Port", + required=True, + help="Discharging port of freight" + "order") + state = fields.Selection([('draft', 'Draft'), ('submit', 'Submitted'), + ('confirm', 'Confirmed'), + ('invoice', 'Invoiced'), ('done', 'Done'), + ('cancel', 'Cancel')], + default='draft', string="State", + help='Different states of freight order') + clearance = fields.Boolean(string='Clearance', help='Checking the' + 'clearance') + clearance_count = fields.Integer(compute='_compute_count', + string='Clearance Count', + help='The number of clearance') + invoice_count = fields.Integer(compute='_compute_count', + string='Invoice Count', + help='The number invoice created') + total_order_price = fields.Float(string='Total', + compute='_compute_total_order_price', + help='The total order price') + total_volume = fields.Float(string='Total Volume', + compute='_compute_total_order_price', + help='The total used volume') + total_weight = fields.Float(string='Total Weight', + compute='_compute_total_order_price', + help='The total weight used') + order_ids = fields.One2many('freight.order.line', 'order_id', + string='Freight Order Line', + help='The freight order lines of the order') + route_ids = fields.One2many('freight.order.routes.line', 'freight_id', + string='Route', help='The route of order') + total_route_sale = fields.Float(string='Total Sale', + compute="_compute_total_route_cost", + help='The total cost of sale') + service_ids = fields.One2many('freight.order.service', 'freight_id', + string="Service", help='Service of the order') + total_service_sale = fields.Float(string='Service Total Sale', + compute="_compute_total_service_cost", + help='The total service cost of order') + agent_id = fields.Many2one('res.partner', string='Agent', + required=True, help="Details of agent") + expected_date = fields.Date(string='Expected Date', help='The expected date' + 'of the order') + track_ids = fields.One2many('freight.track', 'freight_id', + string='Tracking', help='For tracking the' + 'freight orders') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) + + @api.depends('order_ids.total_price', 'order_ids.volume', + 'order_ids.weight') + def _compute_total_order_price(self): + """Computing the price of the order""" + for rec in self: + rec.total_order_price = sum(rec.order_ids.mapped('total_price')) + rec.total_volume = sum(rec.order_ids.mapped('volume')) + rec.total_weight = sum(rec.order_ids.mapped('weight')) + + @api.depends('route_ids.sale') + def _compute_total_route_cost(self): + """Computing the total cost of route operation""" + for rec in self: + rec.total_route_sale = sum(rec.route_ids.mapped('sale')) + + @api.depends('service_ids.total_sale') + def _compute_total_service_cost(self): + """Computing the total cost of services""" + for rec in self: + rec.total_service_sale = sum(rec.service_ids.mapped('total_sale')) + + @api.model_create_multi + def create(self, vals_list): + """Create Sequence for multiple records""" + for vals in vals_list: + vals['name'] = self.env['ir.sequence'].next_by_code( + 'freight.order.sequence') + return super(FreightOrder, self).create(vals_list) + + def action_create_custom_clearance(self): + """Create custom clearance""" + clearance = self.env['custom.clearance'].create({ + 'name': 'CC - ' + self.name, + 'freight_id': self.id, + 'date': self.order_date, + 'loading_port_id': self.loading_port_id.id, + 'discharging_port_id': self.discharging_port_id.id, + 'agent_id': self.agent_id.id, + }) + result = { + 'name': 'action.name', + 'type': 'ir.actions.act_window', + 'views': [[False, 'form']], + 'target': 'current', + 'res_id': clearance.id, + 'res_model': 'custom.clearance', + } + self.clearance = True + return result + + def get_custom_clearance(self): + """Get custom clearance""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': 'Custom Clearance', + 'view_mode': 'list,form', + 'res_model': 'custom.clearance', + 'domain': [('freight_id', '=', self.id)], + 'context': "{'create': False}" + } + + def action_track_order(self): + """Track the order""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': 'Received/Delivered', + 'view_mode': 'form', + 'target': 'new', + 'res_model': 'freight.order.track', + 'context': { + 'default_freight_id': self.id + } + } + + def action_create_invoice(self): + """Create invoice""" + lines = [] + if self.order_ids: + for order in self.order_ids: + value = (0, 0, { + 'name': order.product_id.name, + 'price_unit': order.price, + 'quantity': order.volume + order.weight, + }) + lines.append(value) + if self.route_ids: + for route in self.route_ids: + value = (0, 0, { + 'name': route.routes_id.name, + 'price_unit': route.sale, + }) + lines.append(value) + if self.service_ids: + for service in self.service_ids: + value = (0, 0, { + 'name': service.service_id.name, + 'price_unit': service.sale, + 'quantity': service.qty + }) + lines.append(value) + invoice_line = { + 'move_type': 'out_invoice', + 'partner_id': self.shipper_id.id, + 'invoice_user_id': self.env.user.id, + 'invoice_origin': self.name, + 'ref': self.name, + 'invoice_line_ids': lines, + } + inv = self.env['account.move'].create(invoice_line) + result = { + 'name': 'action.name', + 'type': 'ir.actions.act_window', + 'views': [[False, 'form']], + 'target': 'current', + 'res_id': inv.id, + 'res_model': 'account.move', + } + self.state = 'invoice' + return result + + def action_cancel(self): + """Cancel the record""" + if self.state == 'draft' and self.state == 'submit': + self.state = 'cancel' + else: + raise ValidationError("You can't cancel this order") + + def get_invoice(self): + """View the invoice""" + self.ensure_one() + return { + 'type': 'ir.actions.act_window', + 'name': 'Invoice', + 'view_mode': 'list,form', + 'res_model': 'account.move', + 'domain': [('ref', '=', self.name)], + 'context': "{'create': False}" + } + + @api.depends('name') + def _compute_count(self): + """Compute custom clearance and account move's count""" + for rec in self: + if rec.env['custom.clearance'].search( + [('freight_id', '=', rec.id)]): + rec.clearance_count = rec.env['custom.clearance'].search_count( + [('freight_id', '=', rec.id)]) + else: + rec.clearance_count = 0 + if rec.env['account.move'].search([('ref', '=', rec.name)]): + rec.invoice_count = rec.env['account.move'].search_count( + [('ref', '=', rec.name)]) + else: + rec.invoice_count = 0 + + def action_submit(self): + """Submitting order""" + for rec in self: + rec.state = 'submit' + base_url = self.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + Urls = urls.url_join(base_url, + 'odoo/action-%(actionId)s/%(id)s' % { + 'id': self.id, 'actionId': self.env.ref('freight_management_system.freight_order_action').id}) + mail_content = _('Hi %s,
' + 'The Freight Order %s is Submitted' + '' + ) % (rec.agent_id.name, rec.name, Urls, rec.name) + email_to = self.env['res.partner'].search([ + ('id', 'in', (self.shipper_id.id, self.consignee_id.id, + self.agent_id.id))]) + for mail in email_to: + main_content = { + 'subject': _('Freight Order %s is Submitted') % self.name, + 'author_id': self.env.user.partner_id.id, + 'body_html': mail_content, + 'email_to': mail.email + } + mail_id = self.env['mail.mail'].create(main_content) + mail_id.mail_message_id.body = mail_content + mail_id.send() + + def action_confirm(self): + """Confirm order""" + for rec in self: + custom_clearance = self.env['custom.clearance'].search([ + ('freight_id', '=', self.id)]) + if custom_clearance: + for clearance in custom_clearance: + if clearance.state == 'confirm': + rec.state = 'confirm' + base_url = self.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + Urls = urls.url_join(base_url, + 'odoo/action-%(actionId)s/%(id)s' % { + 'id': self.id, 'actionId': self.env.ref('freight_management_system.freight_order_action').id}) + mail_content = _('Hi %s,
' + 'The Freight Order %s is Confirmed ' + '' + ) % (rec.agent_id.name, rec.name, + Urls, rec.name) + email_to = self.env['res.partner'].search([ + ('id', 'in', (self.shipper_id.id, + self.consignee_id.id, self.agent_id.id))]) + for mail in email_to: + main_content = { + 'subject': _( + 'Freight Order %s is Confirmed') % self.name, + 'author_id': self.env.user.partner_id.id, + 'body_html': mail_content, + 'email_to': mail.email + } + mail_id = self.env['mail.mail'].create(main_content) + mail_id.mail_message_id.body = mail_content + mail_id.send() + elif clearance.state == 'draft': + raise ValidationError("the custom clearance ' %s ' is " + "not confirmed" % clearance.name) + else: + raise ValidationError( + "Create a custom clearance for %s" % rec.name) + for line in rec.order_ids: + line.container_id.state = 'reserve' + + def action_done(self): + """Mark order as done""" + for rec in self: + base_url = self.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + Urls = urls.url_join(base_url, + 'odoo/action-%(actionId)s/%(id)s' % { + 'id': self.id, 'actionId': self.env.ref('freight_management_system.freight_order_action').id}) + mail_content = _('Hi %s,
' + 'The Freight Order %s is Completed' + '' + ) % (rec.agent_id.name, rec.name, Urls, rec.name) + email_to = self.env['res.partner'].search([ + ('id', 'in', (self.shipper_id.id, self.consignee_id.id, + self.agent_id.id))]) + for mail in email_to: + main_content = { + 'subject': _('Freight Order %s is completed') % self.name, + 'author_id': self.env.user.partner_id.id, + 'body_html': mail_content, + 'email_to': mail.email + } + mail_id = self.env['mail.mail'].create(main_content) + mail_id.mail_message_id.body = mail_content + mail_id.send() + self.state = 'done' + for line in rec.order_ids: + line.container_id.state = 'available' + + +class FreightOrderLine(models.Model): + """Freight order lines are defined""" + _name = 'freight.order.line' + _description = 'Freight Order Line' + + order_id = fields.Many2one('freight.order', string="Freight Order", + help="Reference from freight order") + container_id = fields.Many2one('freight.container', string='Container', + domain="[('state', '=', 'available')]", + help='The freight container') + product_id = fields.Many2one('product.product', string='Goods', + help='The Freight Products') + billing_type = fields.Selection([('weight', 'Weight'), + ('volume', 'Volume')], string="Billing On", + help='Select the billing type for' + 'calculating the total amount') + pricing_id = fields.Many2one('freight.price', string='Pricing', + help='The pricing of order') + price = fields.Float(string='Unit Price', help='Unit price of the selected' + 'goods') + total_price = fields.Float(string='Total Price', help='This will be the' + 'total price') + volume = fields.Float(string='Volume', help='Volume of the goods') + weight = fields.Float(string='Weight', help='Weight of the goods') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) + + @api.constrains('weight') + def _check_weight(self): + """Checking the weight of containers""" + for rec in self: + if rec.container_id and rec.billing_type: + if rec.billing_type == 'weight': + if rec.container_id.weight < rec.weight: + raise ValidationError( + 'The weight is must be less ' + 'than or equal to %s' % (rec.container_id.weight)) + + @api.constrains('volume') + def _check_volume(self): + """Checking the volume of containers""" + for rec in self: + if rec.container_id and rec.billing_type: + if rec.billing_type == 'volume': + if rec.container_id.volume < rec.volume: + raise ValidationError( + 'The volume is must be less ' + 'than or equal to %s' % (rec.container_id.volume)) + + @api.onchange('pricing_id', 'billing_type') + def _onchange_price(self): + """Calculate the weight and volume of container""" + for rec in self: + if rec.billing_type == 'weight': + rec.volume = 0.00 + rec.price = rec.pricing_id.weight + elif rec.billing_type == 'volume': + rec.weight = 0.00 + rec.price = rec.pricing_id.volume + + @api.onchange('pricing_id', 'billing_type', 'volume', 'weight') + def _onchange_total_price(self): + """Calculate sub total price""" + for rec in self: + if rec.billing_type and rec.pricing_id: + if rec.billing_type == 'weight': + rec.total_price = rec.weight * rec.price + elif rec.billing_type == 'volume': + rec.total_price = rec.volume * rec.price + + +class FreightOrderRoutesLine(models.Model): + """Defining the routes for the shipping, also we can add the operations for + the routes.""" + _name = 'freight.order.routes.line' + _description = 'Freight Order Routes Lines' + + freight_id = fields.Many2one('freight.order', string='Freight Order', + help='Relation from freight order') + routes_id = fields.Many2one('freight.routes', required=True, + string='Routes', help='Select route of freight') + source_loc_id = fields.Many2one('freight.port', string='Source Location', + help='Select the source port') + destination_loc_id = fields.Many2one('freight.port', + string='Destination Location', + help='Select the destination port') + transport_type = fields.Selection([('land', 'Land'), ('air', 'Air'), + ('water', 'Water')], string="Transport", + required=True, + help='Select the transporting medium') + sale = fields.Float(string='Sale', help="Set the price for Land") + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) + + @api.onchange('routes_id', 'transport_type') + def _onchange_routes_id(self): + """Calculate the price of route operation""" + for rec in self: + if rec.routes_id and rec.transport_type: + if rec.transport_type == 'land': + rec.sale = rec.routes_id.land_sale + elif rec.transport_type == 'air': + rec.sale = rec.routes_id.air_sale + elif rec.transport_type == 'water': + rec.sale = rec.routes_id.water_sale + + +class FreightOrderServiceLine(models.Model): + """Services in freight orders""" + _name = 'freight.order.service' + _description = 'Freight Order Service' + + freight_id = fields.Many2one('freight.order', string='Freight Order', + help='Relation from freight order') + service_id = fields.Many2one('freight.service', required=True, + string='Service', help='Select the service') + partner_id = fields.Many2one('res.partner', string="Vendor", + help='Select the partner for the service') + qty = fields.Float(string='Quantity', help='How many Quantity required') + cost = fields.Float(string='Cost', help='The cost price of the service') + sale = fields.Float(string='Sale', help='Sale price of the service') + total_sale = fields.Float('Total Sale', help='The total sale price') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) + + @api.onchange('service_id', 'partner_id') + def _onchange_partner_id(self): + """Calculate the price of services""" + for rec in self: + if rec.service_id: + if rec.partner_id: + if rec.service_id.line_ids: + for service in rec.service_id.line_ids: + if rec.partner_id == service.partner_id: + rec.sale = service.sale + else: + rec.sale = rec.service_id.sale_price + else: + rec.sale = rec.service_id.sale_price + else: + rec.sale = rec.service_id.sale_price + + @api.onchange('qty', 'sale') + def _onchange_qty(self): + """Calculate the subtotal of route operation""" + for rec in self: + rec.total_sale = rec.qty * rec.sale + + +class Tracking(models.Model): + """Tracking the freight order""" + _name = 'freight.track' + _description = 'Freight Track' + + source_loc_id = fields.Many2one('freight.port', string='Source Location', + help='Select the source location of port') + destination_loc_id = fields.Many2one('freight.port', + string='Destination Location', + help='Destination location of the port') + transport_type = fields.Selection([('land', 'Land'), ('air', 'Air'), + ('water', 'Water')], string='Transport', + help='Transporting medium of the order') + freight_id = fields.Many2one('freight.order', string='Freight Order', + help='Reference from freight order') + date = fields.Date(string='Date', help='Select the date') + type = fields.Selection([('received', 'Received'), + ('delivered', 'Delivered')], + string='Received/Delivered', + help='Status of the order') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) diff --git a/freight_management_system/model/freight_order_track.py b/freight_management_system/model/freight_order_track.py new file mode 100644 index 000000000..ca37e74a1 --- /dev/null +++ b/freight_management_system/model/freight_order_track.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 werkzeug import urls +from odoo import fields, models, _ + + +class FreightTracking(models.Model): + _name = 'freight.order.track' + _description = 'Freight Order Track' + + date = fields.Date('Date', default=fields.Date.today()) + freight_id = fields.Many2one('freight.order') + source_loc_id = fields.Many2one('freight.port', 'Source Location') + destination_loc_id = fields.Many2one('freight.port', 'Destination Location') + transport_type = fields.Selection([('land', 'Land'), ('air', 'Air'), + ('water', 'Water')], "Transport") + type = fields.Selection([('received', 'Received'), + ('delivered', 'Delivered')], 'Received/Delivered') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) + + def action_order_submit(self): + """Create tracking details of order""" + self.env['freight.track'].create({ + 'freight_id': self.freight_id.id, + 'source_loc_id': self.source_loc_id.id, + 'destination_loc_id': self.destination_loc_id.id, + 'transport_type': self.transport_type, + 'date': self.date, + 'type': self.type, + }) + for rec in self.freight_id: + base_url = self.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + Urls = urls.url_join(base_url, + 'odoo/action-%(actionId)s/%(id)s' % { + 'id': self.id, 'actionId': self.env.ref('freight_management_system.freight_order_action').id}) + + mail_content = _('Hi
' + 'The Freight Order %s is %s at %s' + '' + ) % (rec.name, self.type, + self.destination_loc_id.name, Urls, rec.name) + email_to = self.env['res.partner'].search([ + ('id', 'in', (rec.shipper_id.id, rec.consignee_id.id, + rec.agent_id.id))]) + for mail in email_to: + main_content = { + 'subject': _('Freight Order %s is %s at %s') % (rec.name, + self.type, + self.destination_loc_id.name,), + 'author_id': rec.env.user.partner_id.id, + 'body_html': mail_content, + 'email_to': mail.email + } + mail_id = rec.env['mail.mail'].create(main_content) + mail_id.mail_message_id.body = mail_content + mail_id.send() diff --git a/freight_management_system/model/freight_port.py b/freight_management_system/model/freight_port.py new file mode 100644 index 000000000..d94ac32e4 --- /dev/null +++ b/freight_management_system/model/freight_port.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 fields, models + + +class FreightPort(models.Model): + """Creating different port location for managing freight""" + _name = 'freight.port' + _description = 'Freight Port' + + name = fields.Char(string='Name', help='Name for the port') + code = fields.Char(string='Code', help='Specify a code for freight') + state_id = fields.Many2one('res.country.state', string='State', + domain="[('country_id', '=', country_id)]", + help='The State in which port located') + country_id = fields.Many2one('res.country', required=True, + string='Country', + help='The Country in which port located') + active = fields.Boolean(string='Active', default=True, + help='For activate the Port') + land = fields.Boolean(string='Land', help='Enable it if the medium is Land') + air = fields.Boolean(string='Air', help='Enable it if the medium is Air') + water = fields.Boolean(string='Water', + help='Enable it if the medium is Water') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) diff --git a/freight_management_system/model/freight_price.py b/freight_management_system/model/freight_price.py new file mode 100644 index 000000000..2639a096b --- /dev/null +++ b/freight_management_system/model/freight_price.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 fields, models + + +class FreightPrice(models.Model): + """Freight Pricing""" + _name = 'freight.price' + _description = 'Freight Price' + + name = fields.Char(string='Name', required=True, help='Name of the pricing') + volume = fields.Float(string='Volume Price', required=True, + help='Pricing according to Volume') + weight = fields.Float(string='Weight Price', required=True, + help='Pricing according to Weight') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) diff --git a/freight_management_system/model/freight_routes.py b/freight_management_system/model/freight_routes.py new file mode 100644 index 000000000..b5abc0592 --- /dev/null +++ b/freight_management_system/model/freight_routes.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 fields, models + + +class FreightRoutes(models.Model): + """Creating the routes for the freight""" + _name = 'freight.routes' + _description = 'Freight Routes' + + name = fields.Char(string='Name', required=True, help='Name of the route') + active = fields.Boolean(string='Active', default=True, + help='For activating the route') + land_sale = fields.Float(string='Land Sale Price', required=True, + help='Sale price for land') + air_sale = fields.Float(string='Air Sale Price', required=True, + help='Sale price for Air') + water_sale = fields.Float(string='Water Sale Price', required=True, + help='Sale price for Air') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) diff --git a/freight_management_system/model/freight_service.py b/freight_management_system/model/freight_service.py new file mode 100644 index 000000000..9c8e6050c --- /dev/null +++ b/freight_management_system/model/freight_service.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 fields, models + + +class FreightService(models.Model): + """For Creating services available for freight""" + _name = 'freight.service' + _description = 'Freight Service' + + name = fields.Char(string='Name', required=True, help='Name of service') + sale_price = fields.Float(string='Sale Price', required=True, + help='Sale price of the service') + line_ids = fields.One2many('freight.service.line', 'service_id', + string='Service Lines', + help="Service lines corresponding to a service") + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) + + +class FreightServiceLine(models.Model): + _name = 'freight.service.line' + _description = 'Freight Service Line' + + partner_id = fields.Many2one('res.partner', string="Vendor", + help='Partner corresponding to the service') + sale = fields.Float(string='Sale Price', + help='Mention the price for the service') + service_id = fields.Many2one('freight.service', string='Service', + help='Relation from freight service') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) diff --git a/freight_management_system/report/freight_report_templates.xml b/freight_management_system/report/freight_report_templates.xml new file mode 100644 index 000000000..01a8dd56e --- /dev/null +++ b/freight_management_system/report/freight_report_templates.xml @@ -0,0 +1,204 @@ + + + + + Freight Order + freight.order + qweb-pdf + freight_management_system.report_freight_order + freight_management_system.report_freight_order + 'Freight Order - %s' % object.name + + report + + + + diff --git a/freight_management_system/report/tracking_report_templates.xml b/freight_management_system/report/tracking_report_templates.xml new file mode 100644 index 000000000..c22c5745a --- /dev/null +++ b/freight_management_system/report/tracking_report_templates.xml @@ -0,0 +1,128 @@ + + + + + Order Tracking + freight.order + qweb-pdf + freight_management_system.report_freight_track + freight_management_system.report_freight_track + 'Order Tracking - %s' % object.name + + report + + + + diff --git a/freight_management_system/security/freight_security.xml b/freight_management_system/security/freight_security.xml new file mode 100644 index 000000000..187ba8a40 --- /dev/null +++ b/freight_management_system/security/freight_security.xml @@ -0,0 +1,147 @@ + + + + + + Freight + 0 + + + + Freight Manager + + + + + Freight order multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight OrderLine multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Port multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Container multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Price multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Routes multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Order Routes Line multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Service multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Service Line multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Order Service multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Custom Clearance multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Custom Clearance Line multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight Track multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Freight order Track multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Clearance revision multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + Custom Clearance Revision multi-company + + + ['|', ('company_id', 'in', company_ids), + ('company_id', '=', False)] + + + + diff --git a/freight_management_system/security/ir.model.access.csv b/freight_management_system/security/ir.model.access.csv new file mode 100644 index 000000000..a6ed1e100 --- /dev/null +++ b/freight_management_system/security/ir.model.access.csv @@ -0,0 +1,17 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_freight_order_user,access.freight.order.user,model_freight_order,freight_management_system.group_freight,1,1,1,1 +access_freight_order_line_user,access.freight.order.line.user,model_freight_order_line,freight_management_system.group_freight,1,1,1,1 +access_freight_port_user,access.freight.port.user,model_freight_port,freight_management_system.group_freight,1,1,1,1 +access_freight_container_user,access.freight.container.user,model_freight_container,freight_management_system.group_freight,1,1,1,1 +access_freight_price_user,access.freight.price.user,model_freight_price,freight_management_system.group_freight,1,1,1,1 +access_freight_routes_user,access.freight.routes.user,model_freight_routes,freight_management_system.group_freight,1,1,1,1 +access_freight_order_routes_line_user,access.freight.order.routes.line.user,model_freight_order_routes_line,freight_management_system.group_freight,1,1,1,1 +access_freight_service_user,access.freight.service.user,model_freight_service,freight_management_system.group_freight,1,1,1,1 +access_freight_service_line_user,access.freight.service.line.user,model_freight_service_line,freight_management_system.group_freight,1,1,1,1 +access_freight_order_service_user,access.freight.order.service.user,model_freight_order_service,freight_management_system.group_freight,1,1,1,1 +access_custom_clearance_user,access.custom.clearance.user,model_custom_clearance,freight_management_system.group_freight,1,1,1,1 +access_custom_clearance_line_user,access.custom.clearance.line.user,model_custom_clearance_line,freight_management_system.group_freight,1,1,1,1 +access_freight_track_user,access.freight.track.user,model_freight_track,freight_management_system.group_freight,1,1,1,1 +access_freight_order_track_user,access.freight.order.track.user,model_freight_order_track,freight_management_system.group_freight,1,1,1,1 +access_clearance_revision_user,access.clearance.revision.user,model_clearance_revision,freight_management_system.group_freight,1,1,1,1 +access_custom_clearance_revision_user,access.custom.clearance.revision.user,model_custom_clearance_revision,freight_management_system.group_freight,1,1,1,1 diff --git a/freight_management_system/static/description/assets/icons/capture (1).png b/freight_management_system/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/freight_management_system/static/description/assets/icons/capture (1).png differ diff --git a/freight_management_system/static/description/assets/icons/check.png b/freight_management_system/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/freight_management_system/static/description/assets/icons/check.png differ diff --git a/freight_management_system/static/description/assets/icons/chevron.png b/freight_management_system/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/chevron.png differ diff --git a/freight_management_system/static/description/assets/icons/cogs.png b/freight_management_system/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/cogs.png differ diff --git a/freight_management_system/static/description/assets/icons/consultation.png b/freight_management_system/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/freight_management_system/static/description/assets/icons/consultation.png differ diff --git a/freight_management_system/static/description/assets/icons/ecom-black.png b/freight_management_system/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/ecom-black.png differ diff --git a/freight_management_system/static/description/assets/icons/education-black.png b/freight_management_system/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/freight_management_system/static/description/assets/icons/education-black.png differ diff --git a/freight_management_system/static/description/assets/icons/hotel-black.png b/freight_management_system/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/freight_management_system/static/description/assets/icons/hotel-black.png differ diff --git a/freight_management_system/static/description/assets/icons/img.png b/freight_management_system/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/img.png differ diff --git a/freight_management_system/static/description/assets/icons/license.png b/freight_management_system/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/freight_management_system/static/description/assets/icons/license.png differ diff --git a/freight_management_system/static/description/assets/icons/lifebuoy.png b/freight_management_system/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/freight_management_system/static/description/assets/icons/lifebuoy.png differ diff --git a/freight_management_system/static/description/assets/icons/manufacturing-black.png b/freight_management_system/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/freight_management_system/static/description/assets/icons/manufacturing-black.png differ diff --git a/freight_management_system/static/description/assets/icons/photo-capture.png b/freight_management_system/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/photo-capture.png differ diff --git a/freight_management_system/static/description/assets/icons/pos-black.png b/freight_management_system/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/pos-black.png differ diff --git a/freight_management_system/static/description/assets/icons/puzzle.png b/freight_management_system/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/puzzle.png differ diff --git a/freight_management_system/static/description/assets/icons/restaurant-black.png b/freight_management_system/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/restaurant-black.png differ diff --git a/freight_management_system/static/description/assets/icons/service-black.png b/freight_management_system/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/freight_management_system/static/description/assets/icons/service-black.png differ diff --git a/freight_management_system/static/description/assets/icons/trading-black.png b/freight_management_system/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/freight_management_system/static/description/assets/icons/trading-black.png differ diff --git a/freight_management_system/static/description/assets/icons/training.png b/freight_management_system/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/freight_management_system/static/description/assets/icons/training.png differ diff --git a/freight_management_system/static/description/assets/icons/update.png b/freight_management_system/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/freight_management_system/static/description/assets/icons/update.png differ diff --git a/freight_management_system/static/description/assets/icons/user.png b/freight_management_system/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/freight_management_system/static/description/assets/icons/user.png differ diff --git a/freight_management_system/static/description/assets/icons/wrench.png b/freight_management_system/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/freight_management_system/static/description/assets/icons/wrench.png differ diff --git a/freight_management_system/static/description/assets/misc/Cybrosys R.png b/freight_management_system/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/freight_management_system/static/description/assets/misc/Cybrosys R.png differ diff --git a/freight_management_system/static/description/assets/misc/email.svg b/freight_management_system/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/freight_management_system/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/freight_management_system/static/description/assets/misc/phone.svg b/freight_management_system/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/freight_management_system/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/freight_management_system/static/description/assets/misc/star (1) 2.svg b/freight_management_system/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/freight_management_system/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/freight_management_system/static/description/assets/misc/support (1) 1.svg b/freight_management_system/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/freight_management_system/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/freight_management_system/static/description/assets/misc/support-email.svg b/freight_management_system/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/freight_management_system/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/freight_management_system/static/description/assets/misc/tick-mark.svg b/freight_management_system/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/freight_management_system/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/freight_management_system/static/description/assets/misc/whatsapp 1.svg b/freight_management_system/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/freight_management_system/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/freight_management_system/static/description/assets/misc/whatsapp.svg b/freight_management_system/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/freight_management_system/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/freight_management_system/static/description/assets/modules/1.png b/freight_management_system/static/description/assets/modules/1.png new file mode 100644 index 000000000..ba1058c42 Binary files /dev/null and b/freight_management_system/static/description/assets/modules/1.png differ diff --git a/freight_management_system/static/description/assets/modules/2.png b/freight_management_system/static/description/assets/modules/2.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/freight_management_system/static/description/assets/modules/2.png differ diff --git a/freight_management_system/static/description/assets/modules/3.png b/freight_management_system/static/description/assets/modules/3.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/freight_management_system/static/description/assets/modules/3.png differ diff --git a/freight_management_system/static/description/assets/modules/4.png b/freight_management_system/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/freight_management_system/static/description/assets/modules/4.png differ diff --git a/freight_management_system/static/description/assets/modules/5.png b/freight_management_system/static/description/assets/modules/5.png new file mode 100755 index 000000000..272ec20f9 Binary files /dev/null and b/freight_management_system/static/description/assets/modules/5.png differ diff --git a/freight_management_system/static/description/assets/modules/6.png b/freight_management_system/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/freight_management_system/static/description/assets/modules/6.png differ diff --git a/freight_management_system/static/description/assets/screenshots/1.png b/freight_management_system/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..75b663b37 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/1.png differ diff --git a/freight_management_system/static/description/assets/screenshots/10.png b/freight_management_system/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..9fc1087a6 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/10.png differ diff --git a/freight_management_system/static/description/assets/screenshots/11.png b/freight_management_system/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..ff57347f0 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/11.png differ diff --git a/freight_management_system/static/description/assets/screenshots/12.png b/freight_management_system/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..2bbb068fb Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/12.png differ diff --git a/freight_management_system/static/description/assets/screenshots/13.png b/freight_management_system/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..b4442c377 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/13.png differ diff --git a/freight_management_system/static/description/assets/screenshots/14.png b/freight_management_system/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..98007dd57 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/14.png differ diff --git a/freight_management_system/static/description/assets/screenshots/15.png b/freight_management_system/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..85d4e0b65 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/15.png differ diff --git a/freight_management_system/static/description/assets/screenshots/16.png b/freight_management_system/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..efb3418be Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/16.png differ diff --git a/freight_management_system/static/description/assets/screenshots/2.png b/freight_management_system/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..4f52085cb Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/2.png differ diff --git a/freight_management_system/static/description/assets/screenshots/3.png b/freight_management_system/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..486d74ced Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/3.png differ diff --git a/freight_management_system/static/description/assets/screenshots/4.png b/freight_management_system/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..574cc11e5 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/4.png differ diff --git a/freight_management_system/static/description/assets/screenshots/5.png b/freight_management_system/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..59488057f Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/5.png differ diff --git a/freight_management_system/static/description/assets/screenshots/6.png b/freight_management_system/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..d20834140 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/6.png differ diff --git a/freight_management_system/static/description/assets/screenshots/7.png b/freight_management_system/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..b194a47b9 Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/7.png differ diff --git a/freight_management_system/static/description/assets/screenshots/8.png b/freight_management_system/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..c16a7e4ac Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/8.png differ diff --git a/freight_management_system/static/description/assets/screenshots/9.png b/freight_management_system/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..32601942c Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/9.png differ diff --git a/freight_management_system/static/description/assets/screenshots/hero.gif b/freight_management_system/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..49f64083b Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/hero.gif differ diff --git a/freight_management_system/static/description/assets/screenshots/img.png b/freight_management_system/static/description/assets/screenshots/img.png new file mode 100644 index 000000000..074d9c78b Binary files /dev/null and b/freight_management_system/static/description/assets/screenshots/img.png differ diff --git a/freight_management_system/static/description/banner.png b/freight_management_system/static/description/banner.png new file mode 100644 index 000000000..4658f5cec Binary files /dev/null and b/freight_management_system/static/description/banner.png differ diff --git a/freight_management_system/static/description/icon.png b/freight_management_system/static/description/icon.png new file mode 100644 index 000000000..c4aeb9ca8 Binary files /dev/null and b/freight_management_system/static/description/icon.png differ diff --git a/freight_management_system/static/description/index.html b/freight_management_system/static/description/index.html new file mode 100644 index 000000000..638bf3655 --- /dev/null +++ b/freight_management_system/static/description/index.html @@ -0,0 +1,813 @@ + + + + + + + Freight Management + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Freight Management

+

+ A Module for Managing All Freight Operation. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Configure Freight Orders.

+
+
+
+
+
+
+ +
+
+

Configure Freight Operation Services.

+
+
+
+
+
+
+ +
+
+

Custom Clearance And Custom Clearance Revision.

+
+
+
+
+
+
+ +
+
+

Freight Order Track Details.

+
+
+
+
+
+
+ +
+
+

Configure the Freight Operation Routes.

+
+
+
+
+
+
+ +
+
+

Freight Operation Tracking.

+
+
+
+
+
+
+ +
+
+

Freight Order Reports.

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

+ First of all set the Group Freight Manager for the allowed user.

+
+
+
+
+
+
+ +
+
+

+ After installation open Freight Management go to shipping, then create the Freight Orders.

+
+
+
+
+
+
+ +
+
+

+ Add the fright order lines. Select the container, billing on and pricing suitable for the shipping. Based on the Billing on and Pricing it will calculate the total price. If we add more goods than container capacity it's show the warning message.

+
+
+
+
+
+
+ +
+
+

+ Freight Operation Routes
+ Defining the Routes for the shipping.Also, we can add the operations for the Routes.

+
+
+
+
+
+
+ +
+
+

+ Freight Operation Services
+ Defining the services for the shipping. Also, we can add the Services. We can calculate the total sale amount based on tha vendor and the services provided by the vendor. +

+
+
+
+
+
+
+ +
+
+

+ Custom Clearance
+ By clicking the Custom Clearance button we can create the Custom clearance for the Freight Order. We can view the Custom Clearance in Custom Clearance menu under the Custom. After Conforming the Custom Clearance, we can confirm our Fright Order. +

+
+
+
+
+
+
+ +
+
+

+ Custom Clearance Revision
+ We can create the revision for the custom clearance by clicking the revision button. We can view the custom clearance revision from the Revision smart button. +

+
+
+
+
+
+
+ +
+
+

+ Freight Order Invoice
+ We can create the invoice for the Freight Order by clicking the Invoice button. +

+
+
+
+
+
+
+ +
+
+

+ Freight Order Tracking
+ We can track our order by click the Tracking button. +

+
+
+
+ +
+
+
+ +
+
+

+ Freight Order Reporting
+ From the action bar we can print the Fright Order Report and order Tracked Report. +

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

+ Configure Ports
+ Under Configuration menu we can see a Port menu, for configuring our ports. Here we can specify the port location, and available transport methods. +

+
+
+
+
+
+
+ +
+
+

+ Configure Pricing
+ Under Configuration menu we can see a Pricing list menu, it is used to configuring the pricing. Here we can specify the pricing in both weight and volume. +

+
+
+
+
+
+
+ +
+
+

+ Configure Route Operation
+ Under Configuration menu we can see a Route operation menu, it is used to configuring the Routes. +

+
+
+
+
+
+
+ +
+
+

+ Configure container
+ Under Configuration menu we can see a Containers menu, it is used to configuring the Container. Here we can specify the weight and volume.If we add more goods than container capacity it's show the warning message. When once order is confirmed for particular container then we can't be used it for another order. +

+
+
+
+
+
+
+ +
+
+

+ Configure services
+ Under Configuration menu we can see a Services menu, it is used to configuring the Services. Here we can set specific amount for particular vendor. +

+
+
+
+
+
+
+
    +
  • + Freight Order Tracking +
  • +
  • + Freight Order Reporting +
  • +
+
+
+
+
+
+
Version + 18.0.1.0.0|Released on:02th Feb 2025 +
+

+ + Initial Commit for Manufacturing (MRP) Timesheet.

+
+
+
+
+
+
+
+

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/freight_management_system/views/custom_clearance_views.xml b/freight_management_system/views/custom_clearance_views.xml new file mode 100644 index 000000000..7bb552070 --- /dev/null +++ b/freight_management_system/views/custom_clearance_views.xml @@ -0,0 +1,84 @@ + + + + + custom.clearance.view.tree + custom.clearance + + + + + + + + + + custom.clearance.view.form + custom.clearance + +
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + Custom Clearance + ir.actions.act_window + custom.clearance + list,form + +

+ Define a new custom clearance +

+
+
+ + + +
diff --git a/freight_management_system/views/freight_container_views.xml b/freight_management_system/views/freight_container_views.xml new file mode 100644 index 000000000..047290530 --- /dev/null +++ b/freight_management_system/views/freight_container_views.xml @@ -0,0 +1,67 @@ + + + + + freight.container.view.tree + freight.container + + + + + + + + + + freight.container.form.view + freight.container + +
+
+ +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + + freight.container.view.search + freight.container + + + + + + + + + Freight Container + ir.actions.act_window + freight.container + list,form + +

+ Define a new freight container +

+
+
+
diff --git a/freight_management_system/views/freight_order_views.xml b/freight_management_system/views/freight_order_views.xml new file mode 100644 index 000000000..cbe96303e --- /dev/null +++ b/freight_management_system/views/freight_order_views.xml @@ -0,0 +1,214 @@ + + + + + freight.order.view.tree + freight.order + + + + + + + + + + + + + freight.order.view.form + freight.order + +
+
+
+ +
+ + +
+
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + +
+
+ +
+
+ + + + + + + + + + + +
+
+ +
+
+ + + + + + + + + + + +
+
+
+
+
+ + + Freight Order + ir.actions.act_window + freight.order + list,form + +

+ Define a new freight order +

+
+
+ + + +
diff --git a/freight_management_system/views/freight_port_views.xml b/freight_management_system/views/freight_port_views.xml new file mode 100644 index 000000000..7e67a88f0 --- /dev/null +++ b/freight_management_system/views/freight_port_views.xml @@ -0,0 +1,166 @@ + + + + + freight.port.view.tree + freight.port + + + + + + + + + + freight.port.view.form + freight.port + +
+ + + + + + + + + + + + + + + + + +
+
+
+ + + freight.port.view.search + freight.port + + + + + + + + + Freight Port + ir.actions.act_window + freight.port + list,form,search + +

+ Define a new freight port +

+
+
+ + + freight.price.view.tree + freight.price + + + + + + + + + + + freight.price.view.form + freight.price + +
+ + + + + + + + + + + + + + +
+
+
+ + + Freight Price + ir.actions.act_window + freight.price + list,form + +

+ Define a new freight price +

+
+
+ + + freight.routes.view.tree + freight.routes + + + + + + + + + freight.rotes.view.form + freight.routes + +
+ + + + + + + + + + + + + +
+
+
+ + + Freight Routes + ir.actions.act_window + freight.routes + list,form + +

+ Define a new freight routes +

+
+
+ + + + + +
diff --git a/freight_management_system/views/freight_service_views.xml b/freight_management_system/views/freight_service_views.xml new file mode 100644 index 000000000..c1eac1be4 --- /dev/null +++ b/freight_management_system/views/freight_service_views.xml @@ -0,0 +1,63 @@ + + + + + freight.service.view.tree + freight.service + + + + + + + + + + freight.service.view.form + freight.service + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + Freight Service + ir.actions.act_window + freight.service + list,form + +

+ Define a new freight service +

+
+
+ + + +
diff --git a/freight_management_system/views/order_track_views.xml b/freight_management_system/views/order_track_views.xml new file mode 100644 index 000000000..8dcd08a0a --- /dev/null +++ b/freight_management_system/views/order_track_views.xml @@ -0,0 +1,50 @@ + + + + + freight.order.track.view.form + freight.order.track + +
+ + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + Track Order + ir.actions.act_window + freight.order.track + form + +

+ Define a new track order +

+
+
+
diff --git a/freight_management_system/wizard/__init__.py b/freight_management_system/wizard/__init__.py new file mode 100644 index 000000000..3bbbad0c5 --- /dev/null +++ b/freight_management_system/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies (). +# Author: Abbas P (odoo@cybrosys.com) +# +# 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 custom_clearance_revision diff --git a/freight_management_system/wizard/custom_clearance_revision.py b/freight_management_system/wizard/custom_clearance_revision.py new file mode 100644 index 000000000..42ef34632 --- /dev/null +++ b/freight_management_system/wizard/custom_clearance_revision.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies(). +# Author: Abbas P (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 werkzeug import urls +from odoo import models, fields, _ + + +class CustomClearanceRevision(models.TransientModel): + """Create Revision for the custom clearance""" + _name = 'custom.clearance.revision' + _description = 'Custom Clearance Revision' + + name = fields.Text(string='Reason', required=True, + help='Mention the reason for revision') + custom_id = fields.Many2one('custom.clearance', string='Custom clearance', + help='Select the custom clearance') + text = fields.Char(string='Text', help='Note any points') + company_id = fields.Many2one('res.company', string='Company', + copy=False, readonly=True, + help="Current company", + default=lambda + self: self.env.company.id) + + def action_create_revision(self): + """Create revision against custom clearance""" + for rec in self.custom_id: + base_url = self.env['ir.config_parameter'].sudo().get_param( + 'web.base.url') + Urls = urls.url_join(base_url, + 'odoo/action-%(actionId)s/%(id)s' % { + 'id': self.custom_id.id, + 'actionId': self.env.ref('freight_management_system.custom_clearance_action').id}) + Urls_ = urls.url_join(base_url, + 'odoo/action-%(actionId)s/%(id)s' % { + 'id': self.custom_id.freight_id.id, + 'actionId': self.env.ref('freight_management_system.freight_order_action').id}) + mail_content = _('Hi %s,
' + 'The Custom Clearance Revision with reason: %s' + '' + '' + ) % (rec.agent_id.name, self.name, Urls, + rec.name, Urls_, + self.custom_id.freight_id.name) + main_content = { + 'subject': _( + 'Custom Clearance Revision For %s') % self.custom_id.freight_id.name, + 'author_id': self.env.user.partner_id.id, + 'body_html': mail_content, + 'email_to': rec.agent_id.email, + } + mail_id = self.env['mail.mail'].create(main_content) + mail_id.mail_message_id.body = mail_content + mail_id.send() + self.env['custom.clearance.revision'].create({ + 'custom_id': self.custom_id.id, + 'name': self.name, + }) diff --git a/freight_management_system/wizard/custom_clearance_revision_views.xml b/freight_management_system/wizard/custom_clearance_revision_views.xml new file mode 100644 index 000000000..1f08b73b3 --- /dev/null +++ b/freight_management_system/wizard/custom_clearance_revision_views.xml @@ -0,0 +1,38 @@ + + + + + custom.clearance.revision.view.form + custom.clearance.revision + +
+ + + + + + + +
+
+
+
+
+ + + Custom Clearance Revision + ir.actions.act_window + custom.clearance.revision + form + +

+ Define a new custom clearance revision +

+
+
+