@ -0,0 +1,50 @@ |
|||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
|||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
|||
:alt: License: AGPL-3 |
|||
|
|||
Scrap Management |
|||
================ |
|||
* Module which helps manage scrap dismantle in company. |
|||
|
|||
Configuration |
|||
============= |
|||
- Additional configuration not required |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
Affero General Public License, Version 3 (AGPL v3). |
|||
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
|||
|
|||
Credits |
|||
------- |
|||
* Developer: |
|||
(V16)Ranjith R, |
|||
(V17)Safa Faheem PE, |
|||
(V18)Gayathri V, |
|||
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 <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (Contact : 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
########################################################################### |
|||
from . import models |
|||
from . import report |
|||
from . import wizard |
@ -0,0 +1,51 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (Contact : 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
########################################################################### |
|||
{ |
|||
'name': 'Scrap Management', |
|||
'version': '18.0.1.0.0', |
|||
'category': 'Inventory', |
|||
'summary': 'Manage Scrap in a company', |
|||
'description': """Module helps to dismantle the product having bom and move |
|||
the useful parts to the stock""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': 'https://www.cybrosys.com', |
|||
'depends': ['mail', 'stock', 'mrp'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'data/ir_sequence_data.xml', |
|||
'views/scrap_management_line_views.xml', |
|||
'views/scrap_management_views.xml', |
|||
'views/stock_scrap_views.xml', |
|||
'report/scrap_management_template.xml', |
|||
'report/scrap_management_state_wise_template.xml', |
|||
'report/scrap_management_reports.xml', |
|||
'report/scrap_management_product_wise_template.xml', |
|||
'wizard/scrap_management_report_views.xml', |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'AGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Sequence for scrap management model --> |
|||
<data noupdate="1"> |
|||
<record id="sequence_scrap_management" model="ir.sequence"> |
|||
<field name="name">Scrap Management</field> |
|||
<field name="code">scrap.management</field> |
|||
<field name="active">TRUE</field> |
|||
<field name="prefix">SM</field> |
|||
<field name="padding">6</field> |
|||
<field name="number_next">1</field> |
|||
<field name="number_increment">1</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,6 @@ |
|||
## Module <company_scrap_management> |
|||
|
|||
#### 27.12.2024 |
|||
#### Version 18.0.1.0.0 |
|||
#### ADD |
|||
- Initial commit for Scrap Management |
@ -0,0 +1,24 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (Contact : 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
########################################################################### |
|||
from . import scrap_management |
|||
from . import scrap_management_line |
|||
from . import stock_scrap |
@ -0,0 +1,149 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (Contact : 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
########################################################################### |
|||
from datetime import date |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class ScrapManagement(models.Model): |
|||
""" This class define a new model for scrap management.""" |
|||
_name = "scrap.management" |
|||
_description = "Scrap Management" |
|||
_inherit = ['mail.thread', 'mail.activity.mixin'] |
|||
_rec_name = 'scrap_management_number' |
|||
|
|||
scrap_management_number = fields.Char( |
|||
string="Scrap Number", readonly=True, required=True, copy=False, |
|||
default="New", help="Field to specify sequence number") |
|||
scrap_order_id = fields.Many2one( |
|||
'stock.scrap', String="Scrap Order", required=True, |
|||
help="Field to choose scrap order", |
|||
domain="[('state', '=','done')," |
|||
"('typ_of_reuse','=','dismantle')," |
|||
"('state_management', '=','none')]") |
|||
bill_of_material_id = fields.Many2one( |
|||
'mrp.bom', related="scrap_order_id.bill_of_material_id", |
|||
string="Bill of Material", help="Field to choose bill of material") |
|||
product_id = fields.Many2one( |
|||
'product.product', |
|||
String="Product", related="scrap_order_id.product_id", |
|||
help="Field to choose product") |
|||
date = fields.Date(string="Date", help="field to give the date") |
|||
qty = fields.Float(String="Quantity", related="scrap_order_id.scrap_qty", |
|||
help="Field to specify quantity") |
|||
scrap_management_line_ids = fields.One2many( |
|||
'scrap.management.line', 'scrap_management_id', |
|||
string="Components", help="Field to specify components") |
|||
location_id = fields.Many2one( |
|||
'stock.location', String="Transfer location", |
|||
domain="[('usage','=','internal')]", required=True, |
|||
help="Field to specify location") |
|||
state = fields.Selection( |
|||
[('draft', 'Draft'), ('confirm', 'Confirm'), ('done', 'Done')], |
|||
string="State", default="draft", |
|||
help="Field to specify state of Scrap Management") |
|||
|
|||
@api.model |
|||
def create(self, vals): |
|||
""" |
|||
Summary: |
|||
function return sequence number for record |
|||
Args: |
|||
vals:To store the sequence created |
|||
return: |
|||
result:return sequence created |
|||
""" |
|||
if vals.get('scrap_management_number', 'New') == 'New': |
|||
vals['scrap_management_number'] = self.env[ |
|||
'ir.sequence'].next_by_code( |
|||
'scrap.management') or 'New' |
|||
result = super(ScrapManagement, self).create(vals) |
|||
return result |
|||
|
|||
def action_confirm(self): |
|||
"""Function to confirm the Scrap Management and add value to one2many""" |
|||
for line in self.bill_of_material_id.bom_line_ids: |
|||
if line.product_id.type not in ['combo', 'service']: |
|||
self.write({ |
|||
'scrap_management_line_ids': [ |
|||
(0, 0, {'product_id': line.product_id.id, |
|||
'dismantle_qty': (self.qty * line.product_qty)})], |
|||
}) |
|||
self.write({ |
|||
'state': "confirm" |
|||
}) |
|||
|
|||
def action_done(self): |
|||
"""Function to done the Scrap Management and |
|||
add product move and stock quantity""" |
|||
self.env['stock.quant'].create({ |
|||
'location_id': self.scrap_order_id.scrap_location_id.id, |
|||
'product_id': self.product_id.id, |
|||
'quantity': 0 - self.qty |
|||
}) |
|||
for line in self.scrap_management_line_ids: |
|||
scrap_qty = line.dismantle_qty - line.useful_qty |
|||
if line.useful_qty > 0: |
|||
self.env['stock.quant'].create({ |
|||
'location_id': self.location_id.id, |
|||
'product_id': line.product_id.id, |
|||
'quantity': line.useful_qty |
|||
}) |
|||
self.env['stock.move.line'].create({ |
|||
'reference': self.scrap_management_number, |
|||
'product_id': line.product_id.id, |
|||
'location_dest_id': self.location_id.id, |
|||
'quantity': line.useful_qty, |
|||
'company_id': self.env.company.id, |
|||
'location_id': self.scrap_order_id.scrap_location_id.id, |
|||
'state': "done" |
|||
}) |
|||
if scrap_qty > 0: |
|||
self.env['stock.quant'].create({ |
|||
'location_id': self.scrap_order_id.scrap_location_id.id, |
|||
'product_id': line.product_id.id, |
|||
'quantity': scrap_qty |
|||
}) |
|||
self.env['stock.move.line'].create({ |
|||
'reference': self.scrap_management_number, |
|||
'product_id': line.product_id.id, |
|||
'quantity': scrap_qty, |
|||
'location_id': self.scrap_order_id.scrap_location_id.id, |
|||
'company_id': self.env.company.id, |
|||
'state': "done", |
|||
'location_dest_id': self.scrap_order_id.scrap_location_id.id |
|||
}) |
|||
self.write({ |
|||
'state': "done" |
|||
}) |
|||
self.scrap_order_id.write({ |
|||
'state_management': "dismantled" |
|||
}) |
|||
self.date = date.today() |
|||
|
|||
def action_product_moves(self): |
|||
"""Function to return the product moves""" |
|||
return { |
|||
'name': "Product Moves", |
|||
'type': 'ir.actions.act_window', |
|||
'view_mode': 'tree,form', |
|||
'res_model': 'stock.move.line', |
|||
'domain': [('reference', '=', self.scrap_management_number)]} |
@ -0,0 +1,40 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (Contact : 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
########################################################################### |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class ScrapManagementLine(models.Model): |
|||
""" This class define a new model for manage scrap components """ |
|||
_name = "scrap.management.line" |
|||
_description = "Scrap Management Line" |
|||
|
|||
product_id = fields.Many2one('product.product', |
|||
String="Product", readonly=True, |
|||
help="Field to specify product") |
|||
scrap_management_id = fields.Many2one('scrap.management', |
|||
String="Product", readonly=True, |
|||
help="Field to specify " |
|||
"scrap management order") |
|||
dismantle_qty = fields.Integer(String="Available quantity", readonly=True, |
|||
help="Field to specify total quantity") |
|||
useful_qty = fields.Integer(string="Useful Product Quantity", |
|||
help="Field to specify useful quantity") |
@ -0,0 +1,45 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V(Contact : 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
########################################################################### |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class StockScrap(models.Model): |
|||
""" This class inherit the model stock.scrap for adding some fields. """ |
|||
_inherit = "stock.scrap" |
|||
|
|||
product_tmpl_id = fields.Many2one( |
|||
'product.template', |
|||
string='Product Template',related='product_id.product_tmpl_id', |
|||
help="Corresponding product of the variant") |
|||
bill_of_material_id = fields.Many2one( |
|||
'mrp.bom', |
|||
domain="[('product_tmpl_id', '=',product_tmpl_id)]", |
|||
string="Bill of Material", |
|||
help="Field to specify sequence bill of material") |
|||
typ_of_reuse = fields.Selection( |
|||
[('none', 'None'), ('dismantle', 'Dismantle')], |
|||
default="none", help="Field to specify type of scrap", |
|||
string="Type of Operation") |
|||
state_management = fields.Selection( |
|||
[('none', 'None'), ('dismantled', 'Dismantled')], |
|||
string="State", default="none", |
|||
help="Field to specify type of scrap management") |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Gayathri V (Contact : 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
########################################################################### |
|||
from . import scrap_management_report |
@ -0,0 +1,56 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for pdf report in product wise of scarp management --> |
|||
<template id="report_scrap_management_product_wise"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<div class="page"> |
|||
<center> |
|||
<h1>Scrap Management Report</h1> |
|||
</center> |
|||
<div class="row mt32 mb32"> |
|||
<div class="col-3"> |
|||
<strong>From Date:</strong> |
|||
<p t-esc="from_date"/> |
|||
</div> |
|||
<div class="col-3"> |
|||
<strong>To Date:</strong> |
|||
<p t-esc="to_date"/> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm"> |
|||
<thead> |
|||
<tr> |
|||
<th class="text-center">Sequence number</th> |
|||
<th class="text-center">Date</th> |
|||
<th class="text-center">Scrap order</th> |
|||
<th class="text-center">Product</th> |
|||
<th class="text-center">State</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="datas" t-as="line"> |
|||
<td class="text-center"> |
|||
<span t-esc="line['scrap_management_number']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['date']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['name']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['product']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['state']"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,36 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author:Gayathri V (Contact : 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 <http://www.gnu.org/licenses/>. |
|||
# |
|||
########################################################################### |
|||
from odoo import api, models |
|||
|
|||
|
|||
class ScrapManagementPrint(models.AbstractModel): |
|||
""" This class defines a new model to print scrap management report""" |
|||
_name = 'report.company_scrap_management.report_scrap_management' |
|||
_description = "Scrap Management Report" |
|||
|
|||
@api.model |
|||
def _get_report_values(self, docids, data=None): |
|||
"""Function to print the report""" |
|||
scrap_management = self.env['scrap.management'].browse(docids) |
|||
return { |
|||
'scrap_management': scrap_management |
|||
} |
@ -0,0 +1,36 @@ |
|||
<?xml version="1.0" encoding='utf-8'?> |
|||
<odoo> |
|||
<!-- Action for print pdf in product wise--> |
|||
<record id="action_scrap_management_product_wise" |
|||
model="ir.actions.report"> |
|||
<field name="name">Scrap Management Report</field> |
|||
<field name="model">scrap.management.report</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">company_scrap_management.report_scrap_management_product_wise</field> |
|||
<field name="report_file">company_scrap_management.report_scrap_management_product_wise</field> |
|||
<field name="binding_type" ref="model_scrap_management_report"/> |
|||
<field name="binding_type">report</field> |
|||
</record> |
|||
<!-- Action for print pdf in state wise--> |
|||
<record id="action_scrap_management_state_wise" |
|||
model="ir.actions.report"> |
|||
<field name="name">Scrap Management Report</field> |
|||
<field name="model">scrap.management.report</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">company_scrap_management.report_scrap_management_state_wise</field> |
|||
<field name="report_file">company_scrap_management.report_scrap_management_state_wise</field> |
|||
<field name="binding_type" ref="model_scrap_management_report"/> |
|||
<field name="binding_type">report</field> |
|||
</record> |
|||
<!-- Action for print pdf--> |
|||
<record id="action_scrap_management_form_print" |
|||
model="ir.actions.report"> |
|||
<field name="name">Scrap Management</field> |
|||
<field name="model">scrap.management</field> |
|||
<field name="report_type">qweb-pdf</field> |
|||
<field name="report_name">company_scrap_management.report_scrap_management</field> |
|||
<field name="report_file">report.company_scrap_management.report_scrap_management</field> |
|||
<field name="binding_model_id" ref="model_scrap_management"/> |
|||
<field name="binding_type">report</field> |
|||
</record> |
|||
</odoo> |
@ -0,0 +1,52 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for pdf report in state wise of scarp management--> |
|||
<template id="report_scrap_management_state_wise"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<div class="page"> |
|||
<center> |
|||
<h1>Scrap Management Report</h1> |
|||
</center> |
|||
<div class="row mt32 mb32"> |
|||
<div class="col-3"> |
|||
<strong>From Date:</strong> |
|||
<p t-esc="from_date"/> |
|||
</div> |
|||
<div class="col-3"> |
|||
<strong>To Date:</strong> |
|||
<p t-esc="to_date"/> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm"> |
|||
<thead> |
|||
<tr> |
|||
<th class="text-center">Sequence number</th> |
|||
<th class="text-center">Date</th> |
|||
<th class="text-center">Scrap order</th> |
|||
<th class="text-center">State</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="datas" t-as="line"> |
|||
<td class="text-center"> |
|||
<span t-esc="line['scrap_management_number']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['date']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['name']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['state']"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,61 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<!-- Template for pdf report of scarp management --> |
|||
<template id="report_scrap_management"> |
|||
<t t-call="web.html_container"> |
|||
<t t-call="web.external_layout"> |
|||
<div class="page"> |
|||
<center> |
|||
<h1>Scrap Management Form</h1> |
|||
</center> |
|||
<div class="row mt32 mb32"> |
|||
<div class="col-3"> |
|||
<strong>Sequence Number:</strong> |
|||
<h4> |
|||
<t t-esc="scrap_management.scrap_management_number"/> |
|||
</h4> |
|||
</div> |
|||
<br/> |
|||
<div class="col-3"> |
|||
<strong>Quantity:</strong> |
|||
<h6> |
|||
<t t-esc="scrap_management.scrap_order_id.scrap_qty"/> |
|||
</h6> |
|||
</div> |
|||
<br/> |
|||
<div class="col-3"> |
|||
<strong>Product:</strong> |
|||
<h6> |
|||
<t t-esc="scrap_management.scrap_order_id.product_id.name"/> |
|||
</h6> |
|||
</div> |
|||
</div> |
|||
<br/> |
|||
<table class="table table-sm"> |
|||
<thead> |
|||
<tr> |
|||
<th class="text-center">Components</th> |
|||
<th class="text-center">Dismantled quantity</th> |
|||
<th class="text-center">Useful quantity</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="scrap_management.scrap_management_line_ids" |
|||
t-as="line"> |
|||
<td class="text-center"> |
|||
<span t-esc="line.product_id['name']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['dismantle_qty']"/> |
|||
</td> |
|||
<td class="text-center"> |
|||
<span t-esc="line['useful_qty']"/> |
|||
</td> |
|||
</tr> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
</odoo> |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 565 B |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 912 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 80 KiB |