@ -0,0 +1,18 @@ |
|||
Indent Management - MRP v10 |
|||
=========================== |
|||
The aim is to have a complete module to manage all MRP product indents. When we create a MRP |
|||
order, it automatically create a indent to the warehouse manager to approve the raw materials. |
|||
And also if the Manufacturing team need a product for there internal use, they can also create a |
|||
indent to the warehouse team for the same. |
|||
|
|||
Features |
|||
======== |
|||
|
|||
* MRP indents create automatically. |
|||
* Each MRP indent can approve by the warehouse manager. |
|||
* Raw materials available only after the approval of indent by warehouse manager. |
|||
* Manufacturing Plants need some goods for internal purpose, then they can indent it too with reason. |
|||
|
|||
Credits |
|||
======= |
|||
Nikhil Krishnan @ cybrosys, nikhil@cybrosys.in |
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
import models |
@ -0,0 +1,48 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': 'Indent Management - MRP', |
|||
'version': '10.0.1.0.0', |
|||
'summary': """Create MRP Indents To Warehouse Team.""", |
|||
'description': """When we create a MRP Order, MRP team need raw material and if we check the availability, |
|||
an indnet is created automatically and only Warehouse manager can approve the indent""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'category': 'Manufacturing', |
|||
'depends': ['stock', 'mrp'], |
|||
'license': 'LGPL-3', |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'views/mrp_production_views.xml', |
|||
'views/manufacturing_indent_menu.xml', |
|||
'views/stock_indent_menu.xml', |
|||
'views/mrp_indent_sequence.xml', |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,48 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': 'Indent Management - MRP', |
|||
'version': '10.0.1.0.0', |
|||
'summary': """Manufacturing Team Can Create Indents To Warehouse""", |
|||
'description': """When we create a MRP Order, MRP team need raw material and if we check the availability, |
|||
an indnet is created automatically and only Warehouse manager can approve the indent""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'category': 'Manufacturing', |
|||
'depends': ['stock', 'mrp'], |
|||
'license': 'LGPL-3', |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'views/mrp_production_views.xml', |
|||
'views/manufacturing_indent_menu.xml', |
|||
'views/stock_indent_menu.xml', |
|||
'views/mrp_indent_sequence.xml', |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
import manufacturing_indent |
@ -0,0 +1,344 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Nikhil krishnan(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
import datetime |
|||
from datetime import datetime |
|||
from odoo import models, fields, api, exceptions, _ |
|||
from odoo.exceptions import Warning |
|||
from odoo.exceptions import UserError |
|||
import odoo.addons.decimal_precision as dp |
|||
|
|||
|
|||
class MrpProduction(models.Model): |
|||
""" Manufacturing Orders """ |
|||
_inherit = 'mrp.production' |
|||
|
|||
@api.multi |
|||
def _indent_count(self): |
|||
for order in self: |
|||
indent_count = self.env['mrp.indent'].search([('origin', '=', order.id)]) |
|||
order.mrp_indent_order_count = len(indent_count) |
|||
|
|||
@api.multi |
|||
def mrp_indent_confirm(self): |
|||
for order in self: |
|||
indent_id = self.env['mrp.indent'].search([('origin', '=', order.id)]) |
|||
if indent_id: |
|||
for indent in indent_id: |
|||
if not indent.move_lines: |
|||
raise exceptions.Warning(_("Warning " |
|||
"You cannot confirm an indent %s which has no line." % indent.name)) |
|||
else: |
|||
indent.write({'state': 'waiting_approval'}) |
|||
self.indent_state = 'waiting_approval' |
|||
|
|||
@api.multi |
|||
def action_before_assign(self): |
|||
indent_count = self.env['mrp.indent'].search([('origin', '=', self.id)]) |
|||
if not indent_count: |
|||
self.indent_state = 'indent_created' |
|||
vals = { |
|||
'origin': self.id, |
|||
'required_date': self.date_planned_start, |
|||
'item_for': 'mrp', |
|||
'company_id': self.company_id.id, |
|||
} |
|||
indent_obj = self.env['mrp.indent'].create(vals) |
|||
for move in self.move_raw_ids: |
|||
move.write({'mrp_indent_id': indent_obj.id}) |
|||
else: |
|||
if self.indent_state == 'indent_created': |
|||
raise UserError(_("Indent already created, Please Check and Confirm your indent")) |
|||
else: |
|||
raise UserError(_("Indent already created, Please wait for the store team approval")) |
|||
|
|||
@api.multi |
|||
def action_cancel(self): |
|||
indent_ids = self.env['mrp.indent'].search([('origin', '=', self.id)]) |
|||
if indent_ids: |
|||
for indent in indent_ids: |
|||
indent.write({'state': 'cancel'}) |
|||
self.indent_state = 'cancel' |
|||
return super(MrpProduction, self).action_cancel() |
|||
|
|||
mrp_indent_order_count = fields.Integer(string='# of Indent Orders', compute='_indent_count') |
|||
indent_state = fields.Selection( |
|||
[('draft', 'Not indented'), |
|||
('indent_created', 'Indent Created'), |
|||
('waiting_approval', 'Waiting for Approval'), |
|||
('done', 'Indent Approved'), |
|||
('cancel', 'Indent Canceled'), |
|||
('reject', 'Indent Rejected')], string='Indent Status', readonly=True, copy=False, default='draft') |
|||
|
|||
|
|||
class MrpIndent(models.Model): |
|||
_name = "mrp.indent" |
|||
|
|||
@api.multi |
|||
def action_assign(self): |
|||
for production in self: |
|||
move_to_assign = production.move_lines.filtered(lambda x: x.state in ('confirmed', 'waiting', 'assigned')) |
|||
move_to_assign.action_assign() |
|||
if self.origin.availability == 'assigned': |
|||
self.issued_date = datetime.now().strftime("%Y-%m-%d %H:%M:%S") |
|||
self.state = 'done' |
|||
self.origin.write({'indent_state': 'done'}) |
|||
return True |
|||
|
|||
@api.model |
|||
def create(self, vals): |
|||
vals['name'] = self.env['ir.sequence'].next_by_code('mrp.indent') or '/' |
|||
return super(MrpIndent, self).create(vals) |
|||
|
|||
name = fields.Char(string='name', readonly=True, copy=False) |
|||
indent_date = fields.Datetime(string='Indent Date', required=True, default=fields.Datetime.now, readonly=True, |
|||
states={'draft': [('readonly', False)]}) |
|||
required_date = fields.Datetime(string='Required Date', required=True, readonly=True, default=fields.Datetime.now, |
|||
states={'draft': [('readonly', False)]}) |
|||
origin = fields.Many2one('mrp.production', string='Source Document', readonly=True, copy=False, states={'draft': [('readonly', False)]}) |
|||
issued_date = fields.Datetime(string='Approve Date', readonly=True) |
|||
issued_by = fields.Many2one('res.users', string='Issued by', readonly=True) |
|||
requirement = fields.Selection([('1', 'Ordinary'), ('2', 'Urgent')], 'Requirement', readonly=True, default='1', |
|||
states={'draft': [('readonly', False)]}) |
|||
item_for = fields.Selection([('mrp', 'Produce'), ('other', 'Other')], string='Order for', default='other', |
|||
readonly=True, states={'draft': [('readonly', False)]}) |
|||
move_lines = fields.One2many('stock.move', 'mrp_indent_id', string='Moves', copy=False, readonly=True) |
|||
product_lines = fields.One2many('mrp.indent.product.lines', 'indent_id', string='Product', copy=False) |
|||
description = fields.Text(string='Additional Information', readonly=True, |
|||
states={'draft': [('readonly', False)], 'waiting_approval': [('readonly', False)]}) |
|||
company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.user.company_id, |
|||
readonly=True, states={'draft': [('readonly', False)]}) |
|||
|
|||
state = fields.Selection( |
|||
[('draft', 'Draft'), |
|||
('waiting_approval', 'Waiting for Approval'), |
|||
('inprogress', 'Ready to Transfer'), |
|||
('move_created', 'Moves Created'), |
|||
('done', 'Done'), |
|||
('cancel', 'Cancel'), |
|||
('reject', 'Rejected')], string='State', readonly=True, default='draft', track_visibility='onchange') |
|||
|
|||
@api.multi |
|||
def mrp_indent_confirm(self): |
|||
for indent in self: |
|||
if indent.item_for == 'mrp': |
|||
if not indent.move_lines: |
|||
raise exceptions.Warning(_("Warning " |
|||
"You cannot confirm an indent %s which has no line." % indent.name)) |
|||
else: |
|||
indent.write({'state': 'waiting_approval'}) |
|||
indent.origin.write({'indent_state': 'waiting_approval'}) |
|||
else: |
|||
if not indent.product_lines: |
|||
raise exceptions.Warning(_("Warning " |
|||
"You cannot confirm an indent %s which has " |
|||
"no product line." % indent.name)) |
|||
else: |
|||
indent.write({'state': 'waiting_approval'}) |
|||
|
|||
@api.one |
|||
def mrp_indent_inprogress(self): |
|||
todo = [] |
|||
for o in self: |
|||
if not any(line for line in o.product_lines): |
|||
raise exceptions.Warning(_('Error!'), |
|||
_('You cannot Approve a order without any order line.')) |
|||
|
|||
for line in o.product_lines: |
|||
if line: |
|||
todo.append(line.id) |
|||
|
|||
appr_date = datetime.now().strftime("%Y-%m-%d %H:%M:%S") |
|||
|
|||
self.env['mrp.indent.product.lines'].action_confirm(todo) |
|||
|
|||
for id in self.ids: |
|||
self.write({'state': 'inprogress', 'issued_date': appr_date}) |
|||
return True |
|||
|
|||
@api.one |
|||
def indent_reject(self): |
|||
if self.move_lines: |
|||
for line in self.move_lines: |
|||
if line.state == 'cancel': |
|||
pass |
|||
elif line.state == 'done': |
|||
pass |
|||
else: |
|||
line.action_cancel() |
|||
self.write({'state': 'reject'}) |
|||
if self.origin: |
|||
self.origin.action_cancel() |
|||
|
|||
@api.multi |
|||
def indent_transfer(self): |
|||
name = self.name |
|||
move_lines_obj = self.env['stock.move'] |
|||
if self.product_lines: |
|||
for line in self.product_lines: |
|||
if line.product_id.type != 'service': |
|||
if line.location_id: |
|||
if line.location_dest_id: |
|||
tot_qty = 0 |
|||
obj_quant = self.env['stock.quant'].search([('product_id', '=', line.product_id.id), |
|||
('location_id', '=', line.location_id.id)]) |
|||
for obj in obj_quant: |
|||
tot_qty += obj.qty |
|||
move_line = {} |
|||
if line.product_id.type == 'consu': |
|||
move_line = { |
|||
'product_id': line.product_id.id, |
|||
'state': "draft", |
|||
'product_uom_qty': line.product_uom_qty, |
|||
'product_uom': line.product_id.uom_id.id, |
|||
'name': line.product_id.name, |
|||
'location_id': line.location_id.id, |
|||
'location_dest_id': line.location_dest_id.id, |
|||
'date': datetime.now().strftime("%Y-%m-%d %H:%M:%S"), |
|||
'date_expected': self.required_date, |
|||
'invoice_state': "none", |
|||
'origin': name, |
|||
'mrp_indent_id': self.id |
|||
} |
|||
move_lines_obj.create(move_line) |
|||
else: |
|||
move_line = {} |
|||
if tot_qty >= line.product_uom_qty: |
|||
move_line = { |
|||
'product_id': line.product_id.id, |
|||
'state': "draft", |
|||
'product_uom_qty': line.product_uom_qty, |
|||
'product_uom': line.product_id.uom_id.id, |
|||
'name': line.product_id.name, |
|||
'location_id': line.location_id.id, |
|||
'location_dest_id': line.location_dest_id.id, |
|||
'date': datetime.now().strftime("%Y-%m-%d %H:%M:%S"), |
|||
'date_expected': self.required_date, |
|||
'invoice_state': "none", |
|||
'origin': name, |
|||
'mrp_indent_id': self.id |
|||
} |
|||
move_lines_obj.create(move_line) |
|||
else: |
|||
if tot_qty: |
|||
raise exceptions.Warning((" No sufficient stock for product ' %s ' in '%s'. " |
|||
"Available quantity is %s %s.") % |
|||
(line.product_id.name, line.location_id.name, tot_qty, |
|||
line.product_uom.name)) |
|||
else: |
|||
raise exceptions.Warning( |
|||
(" No stock for product ' %s ' in '%s'." |
|||
" Please continue with another location ") % (line.product_id.name, |
|||
line.location_id.name)) |
|||
else: |
|||
raise exceptions.Warning((" Destination Location is not set properly for' %s '. " |
|||
"So Plese cancel this indent and create a new one please.") |
|||
% line.product_id.name) |
|||
else: |
|||
raise exceptions.Warning(("Source Location is not set properly for ' %s '. " |
|||
"Please go and set Source Location.") |
|||
% line.product_id.name) |
|||
else: |
|||
raise exceptions.Warning("This product is a service type product.") |
|||
else: |
|||
raise exceptions.Warning('You cannot Transfer a order without any product line.') |
|||
self.write({'state': 'move_created'}) |
|||
|
|||
@api.multi |
|||
def indent_transfer_move_confirm(self): |
|||
if self.move_lines: |
|||
for line in self.move_lines: |
|||
if line.state == 'cancel': |
|||
pass |
|||
elif line.state == 'done': |
|||
pass |
|||
else: |
|||
line.action_done() |
|||
else: |
|||
raise Warning(_('Error!'), |
|||
_('You cannot Confirm a order without any move lines.')) |
|||
self.write({'state': 'done'}) |
|||
|
|||
|
|||
class IndentProductLines(models.Model): |
|||
_name = 'mrp.indent.product.lines' |
|||
_description = 'Indent Product Lines' |
|||
|
|||
@api.one |
|||
def action_confirm(self, todo): |
|||
self.write({'state': 'inprogress'}) |
|||
return True |
|||
|
|||
indent_id = fields.Many2one('mrp.indent', string='Indent', required=True, ondelete='cascade') |
|||
name = fields.Text(string='Description', required=True, readonly=True, |
|||
states={'draft': [('readonly', False)], 'waiting_approval': [('readonly', False)]}) |
|||
product_id = fields.Many2one('product.product', string='Product', required=True, readonly=True, |
|||
states={'draft': [('readonly', False)], 'waiting_approval': [('readonly', False)]}) |
|||
original_product_id = fields.Many2one('product.product', string='Product to be Manufactured', readonly=True, |
|||
states={'draft': [('readonly', False)], 'waiting_approval': [('readonly', False)]}) |
|||
product_uom_qty = fields.Float(string='Quantity Required', digits_compute=dp.get_precision('Product UoS'), required=True, |
|||
readonly=True, states={'draft': [('readonly', False)], |
|||
'waiting_approval': [('readonly', False)], |
|||
'inprogress': [('readonly', False)]}) |
|||
product_uom = fields.Many2one('product.uom', string='Unit of Measure', required=True, readonly=True, |
|||
states={'draft': [('readonly', False)], 'waiting_approval': [('readonly', False)], |
|||
'inprogress': [('readonly', False)]}) |
|||
location_id = fields.Many2one('stock.location', string='Source Location', readonly=True, |
|||
states={'inprogress': [('readonly', False)]}) |
|||
location_dest_id = fields.Many2one('stock.location', string='Destination Location', required=True, readonly=True, |
|||
states={'draft': [('readonly', False)], |
|||
'waiting_approval': [('readonly', False)]}) |
|||
|
|||
delay = fields.Float(string='Lead Time') |
|||
purpose = fields.Text(string='Purpose') |
|||
state = fields.Selection( |
|||
[('draft', 'Draft'), |
|||
('waiting_approval', 'Waiting for Approval'), |
|||
('inprogress', 'Ready to Transfer'), |
|||
('move_created', 'Moves Created'), |
|||
('done', 'Done'), |
|||
('cancel', 'Cancel'), |
|||
('reject', 'Rejected')], string='State', default='draft', related='indent_id.state') |
|||
|
|||
sequence = fields.Integer('Sequence') |
|||
|
|||
def onchange_product_id(self, product_id=False, product_uom_qty=0.0, product_uom=False, name=''): |
|||
product_obj = self.env['product.product'] |
|||
value = {} |
|||
if not product_id: |
|||
return {'value': {'product_uom_qty': 1.0, 'product_uom': False, |
|||
'name': '', 'specification': '', 'delay': 0.0}} |
|||
|
|||
product = product_obj.browse(product_id) |
|||
value['name'] = product.name_get()[0][1] |
|||
value['product_uom'] = product.uom_id.id |
|||
value['specification'] = product.name_get()[0][1] |
|||
|
|||
return {'value': value} |
|||
|
|||
|
|||
class StockMove(models.Model): |
|||
_inherit = 'stock.move' |
|||
|
|||
mrp_indent_id = fields.Many2one('mrp.indent', 'Indent') |
|
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 100 KiB |
@ -0,0 +1,129 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Indent Management - MRP</h2> |
|||
<h3 class="oe_slogan">MRP indents created automatically from MRP orders to warehouse team</h3> |
|||
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
|||
<div> |
|||
<h4><p>Features:</p></h4> |
|||
<ul> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> MRP indents create automatically.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Each MRP indent can approve by the warehouse manager.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Raw materials available only after the approval of indent by warehouse manager.</li> |
|||
<li style="list-style:none !important;"><span style="color:green;"> ☑</span> Goods required by Manufacturing Plants for internal purpose, can be made as an indent with a note.</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h3 class="oe_slogan">MRP Indent to the Warehouse Team</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="indent order.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
The aim is to have a complete module to manage all MRP product indents. |
|||
When we create a MRP order, it automatically create an indent to the warehouse manager |
|||
to approve the raw materials. In addition if the Manufacturing team requires products for |
|||
internal use, an indent can be created to the warehouse team. |
|||
</p> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h3 class="oe_slogan">Why need MRP indent..? How to create MRP indent?.</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="MRP indent.png"> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
Usually MRP team does not require permission, but check the product’s availability in the stock. |
|||
This module helps to make order for the raw materials automatically. A smart button option is |
|||
include to check the indent status. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span6"> |
|||
<h4 class="oe_slogan">Indent from MRP order</h4> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="Indent tree.png"> |
|||
</div> |
|||
<p class="oe_mt32"> |
|||
<p>It automatically creates the MRP indents. Warehouse manager can approve the indent. |
|||
This indent is used to make order for the raw materials. Warehouse manager need to sanction it to |
|||
start the production process.</p> |
|||
</p> |
|||
</div> |
|||
<div class="oe_span6"> |
|||
<h4 class="oe_slogan">Direct creation of Indent</h4> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="Direct indent order.png"> |
|||
</div> |
|||
<p class="oe_mt32"> |
|||
<p>Manufacturing team may need some products for their internal purpose. They can create a new |
|||
indent and add the products in line and wait for the sanction from the warehouse team.</p> |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h3 class="oe_slogan">Indent from Manufacturing</h3> |
|||
<div class="oe_row oe_spaced"> |
|||
<p> |
|||
Warehouse team have an extra menu for handling the indent. Warehouse team can select |
|||
the source location, and can move product to the destination mentioned in the indent. |
|||
</p> |
|||
</div> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="indent form view in store.png"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
@ -0,0 +1,165 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
|
|||
<!-- MRP_Indent Form View --> |
|||
<record id='view_mrp_indent_indent_form' model='ir.ui.view'> |
|||
<field name="name">mrp.indent.form</field> |
|||
<field name="model">mrp.indent</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Indents"> |
|||
<header> |
|||
<button name="mrp_indent_confirm" string="Confirm" states="draft" type="object" |
|||
class="oe_highlight"/> |
|||
<button name="action_assign" string="Approve" type="object" |
|||
class="oe_highlight" groups="stock.group_stock_manager" |
|||
attrs="{'invisible': ['|',('item_for', '!=', 'mrp'),('state', '!=', 'waiting_approval')]}"/> |
|||
<button name="mrp_indent_inprogress" string="Approve" type="object" |
|||
class="oe_highlight" groups="stock.group_stock_user" |
|||
attrs="{'invisible': ['|',('item_for', '=', 'mrp'),('state', '!=', 'waiting_approval')]}"/> |
|||
<button name="indent_reject" string="Reject" states="waiting_approval,inprogress,move_created" type="object" |
|||
groups="mrp.group_mrp_user,mrp.group_mrp_manager,stock.group_stock_manager"/> |
|||
<button name="indent_transfer" string="Ready To Transfer" states="inprogress" type="object" |
|||
class="oe_highlight" groups="stock.group_stock_manager"/> |
|||
<button name="indent_transfer_move_confirm" string="Confirm Transfer" states="move_created" type="object" |
|||
class="oe_highlight" groups="stock.group_stock_manager"/> |
|||
<field name="state" widget="statusbar" |
|||
statusbar_visible="draft,waiting_approval,inprogress,move_created,done" |
|||
statusbar_colors='{"reject":"red"}' /> |
|||
</header> |
|||
<sheet> |
|||
<h1> |
|||
<field name="name" class="oe_inline" readonly="1"/> |
|||
</h1> |
|||
<group> |
|||
<group> |
|||
<field name="requirement"/> |
|||
<field name="issued_by" /> |
|||
<field name="company_id" groups="base.group_multi_company"/> |
|||
</group> |
|||
<group> |
|||
<field name="indent_date" /> |
|||
<field name="required_date" /> |
|||
<field name="issued_date" /> |
|||
</group> |
|||
</group> |
|||
<notebook> |
|||
<page string="Products" attrs="{'invisible':[('item_for', '=', 'mrp')]}"> |
|||
<field name="product_lines"> |
|||
<form string="Products"> |
|||
<group> |
|||
<group> |
|||
<field name="product_id" groups="base.group_user" |
|||
on_change="onchange_product_id(product_id, product_uom_qty, product_uom, name)" /> |
|||
<field name="original_product_id"/> |
|||
<label for="product_uom_qty" /> |
|||
<div> |
|||
<field name="product_uom_qty" class="oe_inline" /> |
|||
<field name="product_uom" groups="product.group_uom" |
|||
class="oe_inline oe_no_button" |
|||
on_change="onchange_product_id(product_id, product_uom_qty, |
|||
product_uom, name)" /> |
|||
</div> |
|||
</group> |
|||
|
|||
</group> |
|||
<group> |
|||
<field name="name"/> |
|||
<field name="state"/> |
|||
</group> |
|||
|
|||
<group string ="Locations"> |
|||
<field name="location_id"/> |
|||
<field name="location_dest_id"/> |
|||
</group> |
|||
</form> |
|||
<tree string="Products"> |
|||
<field name="sequence" widget="handle"/> |
|||
<field name="product_id"/> |
|||
<field name="state" invisible="1"/> |
|||
<field name="product_uom_qty" sum="Total Qty"/> |
|||
<field name="product_uom" string="Unit" groups="product.group_uom"/> |
|||
<field name="location_id"/> |
|||
<field name="location_dest_id"/> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
<div class="oe_clear"> |
|||
<label for="description" /> |
|||
</div> |
|||
<field name="description" class="oe_inline" placeholder="Additional note..." /> |
|||
</page> |
|||
|
|||
<page string="Moves"> |
|||
<field name="move_lines"> |
|||
<tree string="Products" colors="grey:state == 'cancel';black:state == 'done';red:(state not in ('cancel','done')) and date > current_date;blue:(state not in ('cancel','done'))"> |
|||
<field name="product_id"/> |
|||
<field name="name"/> |
|||
<field name="product_uom_qty"/> |
|||
<field name="product_uom" groups="product.group_uom"/> |
|||
<field name="state" invisible="1"/> |
|||
<field name="location_id"/> |
|||
<field name="location_dest_id"/> |
|||
<field name="mrp_indent_id" invisible="1"/> |
|||
<field name="date" invisible="1"/> |
|||
</tree> |
|||
</field> |
|||
<div class="oe_clear"> |
|||
<label for="description" /> |
|||
</div> |
|||
<field name="description" class="oe_inline" placeholder="Additional note..." /> |
|||
</page> |
|||
<page string="Other Info"> |
|||
<group> |
|||
<group><field name="origin" readonly="True"/></group> |
|||
<group><field name="item_for" readonly="True"/></group> |
|||
</group> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- MRP Indent Tree View --> |
|||
<record id='view_mrp_indent_indent_tree' model='ir.ui.view'> |
|||
<field name="name">mrp.indent.tree</field> |
|||
<field name="model">mrp.indent</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Indents" |
|||
colors="red:(state == 'waiting_approval' and requirement == '2') or (state == 'inprogress' and requirement == '2');black:state=='draft';blue:state=='waiting_approval';green:state=='inprogress';gray:state=='reject';"> |
|||
<field name="name" /> |
|||
<field name="indent_date" /> |
|||
<field name="required_date" /> |
|||
<field name="requirement" invisible="1"/> |
|||
<field name="state" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Indent Window Action --> |
|||
<record id='menu_mrp_indent_indent' model='ir.actions.act_window'> |
|||
<field name="name">Indents</field> |
|||
<field name="res_model">mrp.indent</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="domain">[('state', 'in', ('draft','waiting_approval','inprogress','move_created','done','reject'))]</field> |
|||
<field name="view_ids" |
|||
eval="[(5, 0, 0), |
|||
(0, 0, {'view_mode': 'tree', 'view_id': ref('view_mrp_indent_indent_tree')}), |
|||
(0, 0, {'view_mode': 'form', 'view_id': ref('view_mrp_indent_indent_form')})]"/> |
|||
|
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to create a new indent. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem id="menu_mrp_indent_main" name="Indents" |
|||
parent="mrp.menu_mrp_root" sequence="10" groups="mrp.group_mrp_user"/> |
|||
<menuitem action="menu_mrp_indent_indent" |
|||
id="menu_mrp_production_order_indent_action" name="Indents" |
|||
parent="menu_mrp_indent_main" sequence="1"/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,12 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<!-- Indent Sequences --> |
|||
<record id="sequence_mrp_indent" model="ir.sequence"> |
|||
<field name="name">Indent</field> |
|||
<field eval="5" name="padding"/> |
|||
<field name="prefix">MRP_indent/%(year)s/</field> |
|||
<field name="code">mrp.indent</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,116 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<record id='view_mrp_to_mrp_indent_form' model='ir.ui.view'> |
|||
<field name="name">mrp.indent.form</field> |
|||
<field name="model">mrp.indent</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Indents" create="false" edit="false" delete="false"> |
|||
<header> |
|||
<button name="mrp_indent_confirm" string="Confirm" states="draft" type="object" |
|||
class="oe_highlight" /> |
|||
<field name="state" widget="statusbar" |
|||
statusbar_visible="draft,waiting_approval,inprogress,move_created,done" |
|||
statusbar_colors='{"reject":"red"}' /> |
|||
</header> |
|||
<sheet> |
|||
<h1> |
|||
<field name="name" class="oe_inline" readonly="1"/> |
|||
</h1> |
|||
<group> |
|||
<group> |
|||
<field name="requirement"/> |
|||
<field name="issued_by" /> |
|||
<field name="company_id" groups="base.group_multi_company"/> |
|||
</group> |
|||
<group> |
|||
<field name="indent_date" /> |
|||
<field name="required_date" /> |
|||
<field name="issued_date" /> |
|||
</group> |
|||
</group> |
|||
<notebook> |
|||
<page string="Moves"> |
|||
<field name="move_lines"> |
|||
<tree string="Products" colors="grey:state == 'cancel';green:state == 'done';red:(state not in ('cancel','done')) and date > current_date;black:(state not in ('cancel','done'))"> |
|||
<field name="product_id"/> |
|||
<field name="name"/> |
|||
<field name="product_uom_qty"/> |
|||
<field name="product_uom" groups="product.group_uom"/> |
|||
<field name="state" invisible="1"/> |
|||
<field name="location_id"/> |
|||
<field name="location_dest_id"/> |
|||
<field name="mrp_indent_id" invisible="1"/> |
|||
<field name="date" invisible="1"/> |
|||
</tree> |
|||
</field> |
|||
<div class="oe_clear"> |
|||
<label for="description" /> |
|||
</div> |
|||
<field name="description" class="oe_inline" placeholder="Additional note..." /> |
|||
</page> |
|||
<page string="Other Info"> |
|||
<group> |
|||
<group><field name="origin" readonly="True"/></group> |
|||
<group><field name="item_for"/></group> |
|||
</group> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id='view_mrp_to_mrp_indent_tree' model='ir.ui.view'> |
|||
<field name="name">mrp.indent.tree</field> |
|||
<field name="model">mrp.indent</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Indents" create="false" edit="false" delete="false" |
|||
colors="red:(state == 'waiting_approval' and requirement == '2') or (state == 'inprogress' and requirement == '2');black:state=='draft';green:state=='inprogress';gray:state=='reject';"> |
|||
<field name="name" /> |
|||
<field name="indent_date" /> |
|||
<field name="required_date" /> |
|||
<field name="requirement" invisible="1"/> |
|||
<field name="state" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="act_mrp_production_indent_view" model="ir.actions.act_window"> |
|||
<field name="name">Indent Orders</field> |
|||
<field name="res_model">mrp.indent</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="view_ids" |
|||
eval="[(5, 0, 0), |
|||
(0, 0, {'view_mode': 'tree', 'view_id': ref('view_mrp_to_mrp_indent_tree')}), |
|||
(0, 0, {'view_mode': 'form', 'view_id': ref('view_mrp_to_mrp_indent_form')})]"/> |
|||
<field name="domain">[('origin', '=', active_id)]</field> |
|||
</record> |
|||
|
|||
<record id="mrp_production_indent_form_view" model="ir.ui.view"> |
|||
<field name="name">mrp.production.form</field> |
|||
<field name="model">mrp.production</field> |
|||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//button[@name='action_assign']" position="replace"> |
|||
<button name="action_before_assign" |
|||
attrs="{'invisible': [('availability', 'in', ('assigned', 'none'))]}" |
|||
string="Check availability" type="object" class="oe_highlight"/> |
|||
<button name="mrp_indent_confirm" |
|||
attrs="{'invisible': [('indent_state', '!=', 'indent_created')]}" |
|||
string="Confirm the Indent" type="object" class="oe_highlight"/> |
|||
</xpath> |
|||
<xpath expr="//field[@name='availability']" position="after"> |
|||
<field name="indent_state" readonly="True"/> |
|||
</xpath> |
|||
<xpath expr="//div[@name='button_box']" position="inside"> |
|||
<button class="oe_inline oe_stat_button" type="action" name="%(act_mrp_production_indent_view)d" |
|||
icon="fa-bars" attrs="{'invisible':[('indent_state','=','draft')]}"> |
|||
<field string="Indent" name="mrp_indent_order_count" widget="statinfo"/> |
|||
</button> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,149 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<odoo> |
|||
<data> |
|||
<!--MRP_Indent Form View --> |
|||
<record id='view_stock_mrp_indent_indent_form' model='ir.ui.view'> |
|||
<field name="name">mrp.indent.form</field> |
|||
<field name="model">mrp.indent</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Indents" create="false"> |
|||
<header> |
|||
<button name="action_assign" string="Approve" type="object" |
|||
class="oe_highlight" groups="stock.group_stock_manager" |
|||
attrs="{'invisible': ['|',('item_for', '!=', 'mrp'),('state', '!=', 'waiting_approval')]}"/> |
|||
<button name="mrp_indent_inprogress" string="Approve" type="object" |
|||
class="oe_highlight" groups="stock.group_stock_user" |
|||
attrs="{'invisible': ['|',('item_for', '=', 'mrp'),('state', '!=', 'waiting_approval')]}"/> |
|||
<button name="indent_reject" string="Reject" states="waiting_approval,inprogress,move_created" type="object" |
|||
groups="mrp.group_mrp_user,mrp.group_mrp_manager,stock.group_stock_manager"/> |
|||
<button name="indent_transfer" string="Ready To Transfer" states="inprogress" type="object" |
|||
class="oe_highlight" groups="stock.group_stock_manager"/> |
|||
<button name="indent_transfer_move_confirm" string="Confirm Transfer" states="move_created" type="object" |
|||
class="oe_highlight" groups="stock.group_stock_manager"/> |
|||
<field name="state" widget="statusbar" |
|||
statusbar_visible="draft,waiting_approval,inprogress,move_created,done" |
|||
statusbar_colors='{"reject":"red"}' /> |
|||
</header> |
|||
<sheet> |
|||
<h1> |
|||
<field name="name" class="oe_inline" readonly="1"/> |
|||
</h1> |
|||
<group> |
|||
<group> |
|||
<field name="requirement"/> |
|||
<field name="issued_by" /> |
|||
<field name="company_id" groups="base.group_multi_company"/> |
|||
</group> |
|||
<group> |
|||
<field name="indent_date" /> |
|||
<field name="required_date" /> |
|||
<field name="issued_date" /> |
|||
</group> |
|||
</group> |
|||
<notebook> |
|||
<page string="Products" attrs="{'invisible':[('item_for', '=', 'mrp')]}"> |
|||
<field name="product_lines"> |
|||
<form string="Products"> |
|||
<group> |
|||
<group> |
|||
<field name="product_id" groups="base.group_user" |
|||
on_change="onchange_product_id(product_id, product_uom_qty, product_uom, name)" /> |
|||
<field name="original_product_id"/> |
|||
<label for="product_uom_qty" /> |
|||
<div> |
|||
<field name="product_uom_qty" class="oe_inline" /> |
|||
<field name="product_uom" groups="product.group_uom" |
|||
class="oe_inline oe_no_button" |
|||
on_change="onchange_product_id(product_id, product_uom_qty, |
|||
product_uom, name)" /> |
|||
</div> |
|||
</group> |
|||
|
|||
</group> |
|||
<group> |
|||
<field name="name"/> |
|||
<field name="state"/> |
|||
</group> |
|||
|
|||
<group string ="Locations"> |
|||
<field name="location_id"/> |
|||
<field name="location_dest_id"/> |
|||
</group> |
|||
</form> |
|||
<tree string="Products"> |
|||
<field name="sequence" widget="handle"/> |
|||
<field name="product_id"/> |
|||
<field name="state" invisible="1"/> |
|||
<field name="product_uom_qty" sum="Total Qty"/> |
|||
<field name="product_uom" string="Unit" groups="product.group_uom"/> |
|||
<field name="location_id"/> |
|||
<field name="location_dest_id"/> |
|||
<field name="name"/> |
|||
</tree> |
|||
</field> |
|||
<div class="oe_clear"> |
|||
<label for="description" /> |
|||
</div> |
|||
<field name="description" class="oe_inline" placeholder="Additional note..." /> |
|||
</page> |
|||
|
|||
<page string="Moves"> |
|||
<field name="move_lines"> |
|||
<tree string="Products" colors="grey:state == 'cancel';black:state == 'done';red:(state not in ('cancel','done')) and date > current_date;blue:(state not in ('cancel','done'))"> |
|||
<field name="product_id"/> |
|||
<field name="name"/> |
|||
<field name="product_uom_qty"/> |
|||
<field name="product_uom" groups="product.group_uom"/> |
|||
<field name="state" invisible="1"/> |
|||
<field name="location_id"/> |
|||
<field name="location_dest_id"/> |
|||
<field name="mrp_indent_id" invisible="1"/> |
|||
<field name="date" invisible="1"/> |
|||
</tree> |
|||
</field> |
|||
<div class="oe_clear"> |
|||
<label for="description" /> |
|||
</div> |
|||
<field name="description" class="oe_inline" placeholder="Additional note..." /> |
|||
</page> |
|||
<page string="Other Info"> |
|||
<group> |
|||
<group><field name="origin" readonly="True"/></group> |
|||
<group><field name="item_for" readonly="True"/></group> |
|||
</group> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<!-- Indent Window Action --> |
|||
<record id='menu_action_mrp_indent_stock_approve' model='ir.actions.act_window'> |
|||
<field name="name">Indents</field> |
|||
<field name="res_model">mrp.indent</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="domain">[('state', 'in', ('waiting_approval','inprogress','move_created','done','reject'))]</field> |
|||
<field name="view_ids" |
|||
eval="[(5, 0, 0), |
|||
(0, 0, {'view_mode': 'tree', 'view_id': ref('view_mrp_to_mrp_indent_tree')}), |
|||
(0, 0, {'view_mode': 'form', 'view_id': ref('view_stock_mrp_indent_indent_form')})]"/> |
|||
|
|||
<field name="help" type="html"> |
|||
<p class="oe_view_nocontent_create"> |
|||
Click to create a new indent. |
|||
</p> |
|||
</field> |
|||
</record> |
|||
|
|||
<!--Indent main menu in stock--> |
|||
<menuitem id="menu_indent_indent_main" name="Indent" |
|||
parent="stock.menu_stock_root" sequence="40"/> |
|||
|
|||
<!--Indent view for store users--> |
|||
<menuitem action="menu_action_mrp_indent_stock_approve" id="menu_mrp_indent_stock_approve_action" |
|||
parent="menu_indent_indent_main" name="Indent from Manufacturing" sequence="40" |
|||
groups="stock.group_stock_user"/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,21 @@ |
|||
======================== |
|||
Pos Product Creation v10 |
|||
======================== |
|||
|
|||
This module adds product creation button an wizard in pos. |
|||
|
|||
Installation |
|||
============ |
|||
|
|||
Just select it from available modules to install it, there is no need to extra installations. |
|||
|
|||
Configuration |
|||
============= |
|||
|
|||
Nothing to configure. |
|||
|
|||
Credits |
|||
======= |
|||
Developer: Linto CT @ cybrosys, linto@cybrosys.in |
|||
|
|||
|
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: LINTO C T(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
import models |
@ -0,0 +1,41 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: LINTO C T(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': 'Create Products From POS', |
|||
'version': '10.0.1.0.0', |
|||
'category': 'Point of Sale', |
|||
'summary': 'Create Products From POS Interface', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'images': ['static/description/banner.jpg'], |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['point_of_sale'], |
|||
'data': [ |
|||
'views/pos_template.xml', |
|||
], |
|||
'qweb': ['static/src/xml/pos.xml'], |
|||
'installable': True, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,25 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: LINTO C T(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
import product_pos |
@ -0,0 +1,66 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: LINTO C T(<https://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from odoo import models |
|||
|
|||
|
|||
class ProductFromPos(models.Model): |
|||
_inherit = 'product.product' |
|||
|
|||
def create_product_pos(self, vals): |
|||
type = None |
|||
if vals.get('type') == 'Stockable': |
|||
type = 'product' |
|||
elif vals.get('type') == 'Consumable': |
|||
type = 'consu' |
|||
elif vals.get('type') == 'Service': |
|||
type = 'service' |
|||
category = self.env['product.category'].search([('name', '=', vals.get('category'))], limit=1) |
|||
uom_id = self.env['product.uom'].search([('name', '=', vals.get('unit'))], limit=1) |
|||
new_vals = { |
|||
'name': vals.get('name'), |
|||
'display_name': vals.get('name'), |
|||
'type': type, |
|||
'categ_id': category.id if category else None, |
|||
'list_price': vals.get('price') if vals.get('price') else 1, |
|||
'available_in_pos': True, |
|||
'sale_ok': True, |
|||
'uom_id': uom_id.id, |
|||
'uom_po_id': uom_id.id |
|||
} |
|||
rec = self.env['product.product'].create(new_vals) |
|||
new_vals['id'] = rec.id |
|||
new_vals['price'] = vals.get('price') if vals.get('price') else 1 |
|||
new_vals['pos_categ_id'] = [rec.pos_categ_id.id] if rec.pos_categ_id else None |
|||
new_vals['taxes_id'] = [rec.taxes_id.id] if rec.taxes_id else [] |
|||
new_vals['barcode'] = rec.barcode |
|||
new_vals['default_code'] = rec.default_code |
|||
new_vals['to_weight'] = rec.to_weight |
|||
new_vals['uom_id'] = [rec.uom_id.id, rec.uom_id.name] |
|||
new_vals['description_sale'] = rec.description_sale |
|||
new_vals['description'] = rec.description |
|||
new_vals['product_tmpl_id'] = [rec.product_tmpl_id.id] |
|||
new_vals['tracking'] = rec.tracking |
|||
|
|||
return new_vals |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,93 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">POS Product Creation</h2> |
|||
<h3 class="oe_slogan">Create Products From POS</h3> |
|||
<h4 class="oe_slogan">Cybrosys Technologies , www.cybrosys.com</h4> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
This module allows us to create products from point of sale. A new button is added for this purpose. |
|||
When we click on the 'Add Product' button, a new wizard will be appeared in which we can enter the |
|||
details of the product such as name, type, category price etc. When we click the confirm button, |
|||
a new product will be created with the provided details. |
|||
</p> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<center> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="wizard.png"> |
|||
</div> |
|||
</center> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<center> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="product.png"> |
|||
</div> |
|||
</center> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
The products list will be updated real time. It is not needed to reload the page to |
|||
show the newly created product in the point of sale products list. |
|||
</p> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 100 KiB |
@ -0,0 +1,105 @@ |
|||
odoo.define('pos_product_creation',function(require) { |
|||
|
|||
var gui = require('point_of_sale.gui'); |
|||
var chrome = require('point_of_sale.chrome'); |
|||
var PosBaseWidget = require('point_of_sale.BaseWidget'); |
|||
var popups = require('point_of_sale.popups'); |
|||
var core = require('web.core'); |
|||
var models = require('point_of_sale.models'); |
|||
var Model = require('web.DataModel'); |
|||
var QWeb = core.qweb; |
|||
var _t = core._t; |
|||
models.load_models({ |
|||
model: 'product.category', |
|||
fields: ['name'], |
|||
loaded: function(self,categories){ |
|||
self.categories = categories; |
|||
}, |
|||
}); |
|||
|
|||
chrome.OrderSelectorWidget.include({ |
|||
renderElement: function(){ |
|||
var self = this; |
|||
this._super(); |
|||
var categ = []; |
|||
var unit = []; |
|||
for (var i in self.pos.categories){ |
|||
categ.push(self.pos.categories[i].name); |
|||
} |
|||
for (var i in self.pos.units){ |
|||
unit.push(self.pos.units[i].name); |
|||
} |
|||
this.$('.add-product').click(function(event){ |
|||
self.gui.show_popup('product_create',{ |
|||
'category': categ, |
|||
'units':unit, |
|||
'confirm': function(value) { |
|||
}, |
|||
}); |
|||
}); |
|||
}, |
|||
}); |
|||
var ProductCreationWidget = PosBaseWidget.extend({ |
|||
template: 'ProductCreationWidget', |
|||
init: function(parent, args) { |
|||
this._super(parent, args); |
|||
this.options = {}; |
|||
this.category = []; |
|||
this.units = []; |
|||
}, |
|||
events: { |
|||
'click .button.cancel': 'click_cancel', |
|||
'click .button.confirm': 'click_confirm', |
|||
}, |
|||
show: function(options){ |
|||
options = options || {}; |
|||
this._super(options); |
|||
this.category = options.category; |
|||
this.units = options.units; |
|||
this.renderElement(); |
|||
this.$('.name').focus(); |
|||
}, |
|||
close: function(){ |
|||
if (this.pos.barcode_reader) { |
|||
this.pos.barcode_reader.restore_callbacks(); |
|||
} |
|||
}, |
|||
click_confirm: function(){ |
|||
var self = this; |
|||
var name = this.$('.name').val(); |
|||
var type = this.$('.type').val(); |
|||
var category = this.$('.category').val(); |
|||
var unit = this.$('.uom').val(); |
|||
var price = this.$('.price').val(); |
|||
if(isNaN(price) || !price) { |
|||
alert("Please check the price !") |
|||
} |
|||
else { |
|||
var product_vals = { |
|||
'name': name, |
|||
'type': type, |
|||
'category': category, |
|||
'price': price, |
|||
'unit': unit |
|||
}; |
|||
new Model('product.product').call('create_product_pos',[1, product_vals]).then(function(product){ |
|||
self.pos.db.add_products([product]); |
|||
console.log(self) |
|||
}); |
|||
console.log(product_vals) |
|||
this.gui.close_popup(); |
|||
if( this.options.confirm ){ |
|||
this.options.confirm.call(this,name); |
|||
} |
|||
} |
|||
}, |
|||
click_cancel: function(){ |
|||
this.gui.close_popup(); |
|||
if (this.options.cancel) { |
|||
this.options.cancel.call(this); |
|||
} |
|||
}, |
|||
}); |
|||
gui.define_popup({name:'product_create', widget: ProductCreationWidget}); |
|||
|
|||
}); |
@ -0,0 +1,54 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<templates id="template" xml:space="preserve"> |
|||
<t t-extend="OrderSelectorWidget"> |
|||
<t t-jquery="div.order-selector" t-operation="append"> |
|||
<div> |
|||
<span class="order-button square add-product"> |
|||
Add Product |
|||
</span> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
<t t-name="ProductCreationWidget"> |
|||
<div class="modal-dialog"> |
|||
<div class="popup popup-product-creation"> |
|||
<p class="title">Create Product</p> |
|||
Name : <input class="name" type='text' style="width:60%;height:34px;border-radius:5px;"></input> <br /><br /> |
|||
Type : |
|||
<select class="type" style="width:35%;height:30px;border-radius:5px;"> |
|||
<option>Consumable</option> |
|||
<option>Stockable</option> |
|||
<option>Service</option> |
|||
</select> |
|||
<br /><br /> |
|||
Category: |
|||
<select class="category" style="width:27%;height:30px;border-radius:5px;"> |
|||
<t t-foreach="widget.category || []" t-as="item"> |
|||
<option> |
|||
<t t-esc='item'/> |
|||
</option> |
|||
</t> |
|||
</select><br /><br /> |
|||
UoM: |
|||
<select class="uom" style="width:15%;height:30px;border-radius:5px;"> |
|||
<t t-foreach="widget.units || []" t-as="item"> |
|||
<option> |
|||
<t t-esc='item'/> |
|||
</option> |
|||
</t> |
|||
</select> |
|||
|
|||
<span /><span />Price : <input class="price" type='text' style="width:18%;height:10px !important;border-radius:5px;"></input> |
|||
<div class="footer"> |
|||
<div class="button confirm"> |
|||
Ok |
|||
</div> |
|||
<div class="button cancel"> |
|||
Cancel |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data> |
|||
<template id="assets" inherit_id="point_of_sale.assets"> |
|||
<xpath expr="." position="inside"> |
|||
<script type="text/javascript" src="/pos_product_creation/static/src/js/create_product.js"></script> |
|||
</xpath> |
|||
</template> |
|||
|
|||
</data> |
|||
</odoo> |