-
+
-
+
@@ -18,7 +26,9 @@
-
+
|
@@ -28,10 +38,14 @@
-
+
-
+
@@ -43,10 +57,14 @@
-
+
-
+
@@ -54,9 +72,12 @@
-
+
- Prod Qty * Prod Price |
+ Prod Qty * Prod Price |
@@ -64,10 +85,14 @@
-
+
-
+
@@ -79,10 +104,14 @@
-
+
-
+
@@ -91,7 +120,9 @@
-
+
@@ -100,10 +131,14 @@
-
+
-
+
@@ -115,10 +150,14 @@
-
+
-
+
diff --git a/mrp_bom_reference/__manifest__.py b/mrp_bom_reference/__manifest__.py
index dc6fabf6a..6d569cb58 100644
--- a/mrp_bom_reference/__manifest__.py
+++ b/mrp_bom_reference/__manifest__.py
@@ -2,15 +2,14 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP BOM Reference",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "MRP",
"depends": [
"product_bom_revision",
],
- "data": [
- ],
+ "data": [],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_bom_reference/models/mrp_bom.py b/mrp_bom_reference/models/mrp_bom.py
index 6749348f9..eb8f27a96 100644
--- a/mrp_bom_reference/models/mrp_bom.py
+++ b/mrp_bom_reference/models/mrp_bom.py
@@ -1,15 +1,17 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, api
+from odoo import api, models
class MrpBom(models.Model):
_inherit = "mrp.bom"
- @api.onchange('bom_revision', 'product_tmpl_id', 'product_id')
+ @api.onchange("bom_revision", "product_tmpl_id", "product_id")
def onchange_reference(self):
- tmpl = self.product_tmpl_id.default_code if (
- self.product_tmpl_id.default_code) else ''
- va = self.product_id.default_code if (
- self.product_id.default_code) else ''
- self.code = u'{} {} {}'.format(va, tmpl, self.bom_revision)
+ tmpl = (
+ self.product_tmpl_id.default_code
+ if self.product_tmpl_id.default_code
+ else ""
+ )
+ va = self.product_id.default_code if (self.product_id.default_code) else ""
+ self.code = "{} {} {}".format(va, tmpl, self.bom_revision)
diff --git a/mrp_bom_report_group/__manifest__.py b/mrp_bom_report_group/__manifest__.py
index d699bc60d..6680210b8 100644
--- a/mrp_bom_report_group/__manifest__.py
+++ b/mrp_bom_report_group/__manifest__.py
@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP BoM Report Group",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"category": "Manufacturing",
"license": "AGPL-3",
"author": "AvanzOSC",
@@ -13,7 +13,7 @@
"data": [
"data/mrp_bom_report_group.xml",
"report/mrp_bom_report.xml",
- "views/mrp_bom_views.xml"
+ "views/mrp_bom_views.xml",
],
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_bom_report_group/data/mrp_bom_report_group.xml b/mrp_bom_report_group/data/mrp_bom_report_group.xml
index 457856bfb..b1a82a64a 100644
--- a/mrp_bom_report_group/data/mrp_bom_report_group.xml
+++ b/mrp_bom_report_group/data/mrp_bom_report_group.xml
@@ -1,9 +1,10 @@
-
-
-
-
- See costs in BoM
-
-
-
+
+
+
+ See costs in BoM
+
+
diff --git a/mrp_bom_report_group/report/mrp_bom_report.xml b/mrp_bom_report_group/report/mrp_bom_report.xml
index 767c745dd..dacfbbf2d 100644
--- a/mrp_bom_report_group/report/mrp_bom_report.xml
+++ b/mrp_bom_report_group/report/mrp_bom_report.xml
@@ -1,45 +1,73 @@
-
+
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
-
+
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
-
+
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
-
+
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
- mrp_bom_report_group.group_mrp_bom_report_group_see_cost
+ mrp_bom_report_group.group_mrp_bom_report_group_see_cost
diff --git a/mrp_bom_report_group/views/mrp_bom_views.xml b/mrp_bom_report_group/views/mrp_bom_views.xml
index d723d051b..5c14aa4c7 100644
--- a/mrp_bom_report_group/views/mrp_bom_views.xml
+++ b/mrp_bom_report_group/views/mrp_bom_views.xml
@@ -1,8 +1,8 @@
-
+
mrp.bom
-
+
Structure
diff --git a/mrp_cut/__manifest__.py b/mrp_cut/__manifest__.py
index ff7ecc286..bffe8877c 100644
--- a/mrp_cut/__manifest__.py
+++ b/mrp_cut/__manifest__.py
@@ -4,10 +4,17 @@
"name": "MRP Cut",
"version": "14.0.1.0.0",
"author": "Avanzosc",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "MRP",
- "depends": ["product_second_uom", "mrp", "product_dimension"],
- "data": ["views/mrp_bom_views.xml", "views/mrp_production.xml"],
+ "depends": [
+ "product_second_uom",
+ "mrp",
+ "product_dimension",
+ ],
+ "data": [
+ "views/mrp_bom_views.xml",
+ "views/mrp_production.xml",
+ ],
"license": "AGPL-3",
"installable": True,
}
diff --git a/mrp_manual_sale_info/__manifest__.py b/mrp_manual_sale_info/__manifest__.py
index 6951d53a0..0e7b8ffb0 100644
--- a/mrp_manual_sale_info/__manifest__.py
+++ b/mrp_manual_sale_info/__manifest__.py
@@ -7,7 +7,7 @@
"category": "Manufacturing",
"license": "AGPL-3",
"author": "AvanzOSC",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"depends": [
"mrp",
"sale",
diff --git a/mrp_manual_sale_info/models/mrp_production.py b/mrp_manual_sale_info/models/mrp_production.py
index 176d1ebff..66f5e804f 100644
--- a/mrp_manual_sale_info/models/mrp_production.py
+++ b/mrp_manual_sale_info/models/mrp_production.py
@@ -32,8 +32,10 @@ class MrpProduction(models.Model):
@api.constrains("manual_sale_id", "manual_partner_id")
def _check_auto_renew_canceled_lines(self):
for rec in self:
- if (rec.manual_sale_id and
- rec.manual_sale_id.partner_id != rec.manual_partner_id):
+ if (
+ rec.manual_sale_id
+ and rec.manual_sale_id.partner_id != rec.manual_partner_id
+ ):
raise ValidationError(
_("Customer must be same as customer from Sale Order!")
)
diff --git a/mrp_manual_sale_info/views/mrp_workorder_view.xml b/mrp_manual_sale_info/views/mrp_workorder_view.xml
index ee2a20219..528a18491 100644
--- a/mrp_manual_sale_info/views/mrp_workorder_view.xml
+++ b/mrp_manual_sale_info/views/mrp_workorder_view.xml
@@ -2,8 +2,10 @@
mrp.workorder
-
+
@@ -19,10 +21,12 @@
-
+
diff --git a/mrp_product_template_lineal/__manifest__.py b/mrp_product_template_lineal/__manifest__.py
index 475990777..35e017675 100644
--- a/mrp_product_template_lineal/__manifest__.py
+++ b/mrp_product_template_lineal/__manifest__.py
@@ -2,18 +2,18 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP Product Template Lineal",
- 'version': '14.0.1.1.0',
+ "version": "14.0.1.1.0",
"author": "Avanzosc",
"website": "https://github.com/avanzosc/mrp-addons",
"category": "Manufacturing",
"depends": [
"mrp",
- "product_template_lineal"
+ "product_template_lineal",
],
"data": [
"views/mrp_production_views.xml",
"report/mrp_production_report.xml",
],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_product_template_lineal/models/mrp_production.py b/mrp_product_template_lineal/models/mrp_production.py
index ed4c0c054..5fee05225 100644
--- a/mrp_product_template_lineal/models/mrp_production.py
+++ b/mrp_product_template_lineal/models/mrp_production.py
@@ -1,13 +1,14 @@
# Copyright 2022 Alfredo de la Fuente - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields
+from odoo import fields, models
class MrpProduction(models.Model):
- _inherit = 'mrp.production'
+ _inherit = "mrp.production"
lineal_id = fields.Many2one(
- string='Lineal',
- comodel_name='product.lineal',
- related='product_id.lineal_id',
- store=True)
+ string="Lineal",
+ comodel_name="product.lineal",
+ related="product_id.lineal_id",
+ store=True,
+ )
diff --git a/mrp_product_template_lineal/report/mrp_production_report.xml b/mrp_product_template_lineal/report/mrp_production_report.xml
index 4732e9961..4ea2c4b16 100644
--- a/mrp_product_template_lineal/report/mrp_production_report.xml
+++ b/mrp_product_template_lineal/report/mrp_production_report.xml
@@ -1,4 +1,4 @@
-
+
@@ -6,7 +6,7 @@
-
+
|
diff --git a/mrp_product_template_lineal/views/mrp_production_views.xml b/mrp_product_template_lineal/views/mrp_production_views.xml
index 31af3ea30..b895a44b7 100644
--- a/mrp_product_template_lineal/views/mrp_production_views.xml
+++ b/mrp_product_template_lineal/views/mrp_production_views.xml
@@ -1,20 +1,29 @@
-
+
mrp.production
-
+
-
+
-
+
-
+
@@ -23,7 +32,7 @@
mrp.production
-
+
@@ -33,13 +42,18 @@
mrp.production
-
+
-
+
diff --git a/mrp_product_version_to_bom/__manifest__.py b/mrp_product_version_to_bom/__manifest__.py
index 99baac371..a38d8b3a0 100644
--- a/mrp_product_version_to_bom/__manifest__.py
+++ b/mrp_product_version_to_bom/__manifest__.py
@@ -2,19 +2,19 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP Product Version To BOM",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "MRP",
"depends": [
"product",
- "mrp"
+ "mrp",
],
"data": [
"views/mrp_bom_views.xml",
"views/product_template_views.xml",
- "views/mrp_production_views.xml"
+ "views/mrp_production_views.xml",
],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_product_version_to_bom/models/mrp_bom_line.py b/mrp_product_version_to_bom/models/mrp_bom_line.py
index 051c05912..30bc6a4a3 100644
--- a/mrp_product_version_to_bom/models/mrp_bom_line.py
+++ b/mrp_product_version_to_bom/models/mrp_bom_line.py
@@ -1,16 +1,19 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields, api
+from odoo import api, fields, models
class MrpBomLine(models.Model):
_inherit = "mrp.bom.line"
- version = fields.Char(string='Version')
+ version = fields.Char(string="Version")
outdate = fields.Boolean(
- string='Out Date', compute='_compute_outdate', store=True)
+ string="Out Date",
+ compute="_compute_outdate",
+ store=True,
+ )
- @api.depends('version', 'product_id.last_version', 'product_id')
+ @api.depends("version", "product_id.last_version", "product_id")
def _compute_outdate(self):
for line in self:
if int(line.version) < int(line.product_id.last_version):
diff --git a/mrp_product_version_to_bom/models/product_template.py b/mrp_product_version_to_bom/models/product_template.py
index a35f40c53..fbabe9b72 100644
--- a/mrp_product_version_to_bom/models/product_template.py
+++ b/mrp_product_version_to_bom/models/product_template.py
@@ -1,19 +1,23 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields, api
+from odoo import api, fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
last_version = fields.Char(
- string='Last Version', compute='_compute_last_version', store=True)
+ string="Last Version",
+ compute="_compute_last_version",
+ store=True,
+ )
- @api.depends('bom_line_ids', 'bom_line_ids.version')
+ @api.depends("bom_line_ids", "bom_line_ids.version")
def _compute_last_version(self):
for product in self:
if product.bom_line_ids:
product.last_version = max(
- product.bom_line_ids, key=lambda x: int(x.version)).version
+ product.bom_line_ids, key=lambda x: int(x.version)
+ ).version
else:
- product.last_version = '00'
+ product.last_version = "00"
diff --git a/mrp_product_version_to_bom/models/stock_move.py b/mrp_product_version_to_bom/models/stock_move.py
index 02c5288ba..1f08f66e6 100644
--- a/mrp_product_version_to_bom/models/stock_move.py
+++ b/mrp_product_version_to_bom/models/stock_move.py
@@ -1,10 +1,13 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields
+from odoo import fields, models
class StockMove(models.Model):
_inherit = "stock.move"
version = fields.Char(
- string='Version', related='bom_line_id.version', store=True)
+ string="Version",
+ related="bom_line_id.version",
+ store=True,
+ )
diff --git a/mrp_product_version_to_bom/views/mrp_bom_views.xml b/mrp_product_version_to_bom/views/mrp_bom_views.xml
index a4ae9ac59..2c3471bde 100644
--- a/mrp_product_version_to_bom/views/mrp_bom_views.xml
+++ b/mrp_product_version_to_bom/views/mrp_bom_views.xml
@@ -1,15 +1,20 @@
-
-
+
mrp.bom
-
+
-
-
-
+
+
+
-
+
outdate != False
diff --git a/mrp_product_version_to_bom/views/mrp_production_views.xml b/mrp_product_version_to_bom/views/mrp_production_views.xml
index 12a38b92c..93b22e66d 100644
--- a/mrp_product_version_to_bom/views/mrp_production_views.xml
+++ b/mrp_product_version_to_bom/views/mrp_production_views.xml
@@ -1,12 +1,14 @@
-
-
+
mrp.production
-
+
-
-
+
+
diff --git a/mrp_product_version_to_bom/views/product_template_views.xml b/mrp_product_version_to_bom/views/product_template_views.xml
index 99854ebe5..4e8210260 100644
--- a/mrp_product_version_to_bom/views/product_template_views.xml
+++ b/mrp_product_version_to_bom/views/product_template_views.xml
@@ -1,22 +1,24 @@
-
-
+
product.template
-
+
-
-
+
+
product.template
-
+
-
+
diff --git a/mrp_production_cost/models/mrp_production.py b/mrp_production_cost/models/mrp_production.py
index 970ae7d9e..6a88a8c7d 100644
--- a/mrp_production_cost/models/mrp_production.py
+++ b/mrp_production_cost/models/mrp_production.py
@@ -8,25 +8,43 @@ class MrpProduction(models.Model):
# Material costs
cost_material_to_consume = fields.Float(
- string="Cost Material to consume", copy=False, store=True,
- compute="_compute_cost_material_to_consume")
+ string="Cost Material to consume",
+ copy=False,
+ store=True,
+ compute="_compute_cost_material_to_consume",
+ )
cost_material_consumed = fields.Float(
- string="Cost Material consumed", copy=False, store=True,
- compute="_compute_cost_material_consumed")
+ string="Cost Material consumed",
+ copy=False,
+ store=True,
+ compute="_compute_cost_material_consumed",
+ )
# Workorder costs
cost_workorder_estimated = fields.Float(
- string="Cost Workorder estimated", copy=False, store=True,
- compute="_compute_cost_workorder_estimated")
+ string="Cost Workorder estimated",
+ copy=False,
+ store=True,
+ compute="_compute_cost_workorder_estimated",
+ )
cost_workorder_real = fields.Float(
- string="Cost Workorder real", copy=False, store=True,
- compute='_compute_cost_workorder_real')
+ string="Cost Workorder real",
+ copy=False,
+ store=True,
+ compute="_compute_cost_workorder_real",
+ )
# Manufacturing costs
cost_manufacturing_estimated = fields.Float(
- string="Cost Manufacturing estimated", copy=False, store=True,
- compute='_compute_cost_manufacturing_estimated')
+ string="Cost Manufacturing estimated",
+ copy=False,
+ store=True,
+ compute="_compute_cost_manufacturing_estimated",
+ )
cost_manufacturing_real = fields.Float(
- string="Cost Manufacturing real", copy=False, store=True,
- compute='_compute_cost_manufacturing_real')
+ string="Cost Manufacturing real",
+ copy=False,
+ store=True,
+ compute="_compute_cost_manufacturing_real",
+ )
@api.depends("move_raw_ids.material_cost_to_consume")
def _compute_cost_material_to_consume(self):
@@ -52,19 +70,21 @@ def _compute_cost_workorder_estimated(self):
@api.depends("workorder_ids.workorder_cost_real")
def _compute_cost_workorder_real(self):
for production in self:
- production.cost_workorder_real = (
- sum(production.workorder_ids.mapped("workorder_cost_real")))
+ production.cost_workorder_real = sum(
+ production.workorder_ids.mapped("workorder_cost_real")
+ )
@api.depends("cost_material_to_consume", "cost_workorder_estimated")
def _compute_cost_manufacturing_estimated(self):
for production in self:
production.cost_manufacturing_estimated = (
- production.cost_material_to_consume +
- production.cost_workorder_estimated)
+ production.cost_material_to_consume
+ + production.cost_workorder_estimated
+ )
@api.depends("cost_material_consumed", "cost_workorder_real")
def _compute_cost_manufacturing_real(self):
for production in self:
production.cost_manufacturing_real = (
- production.cost_material_consumed +
- production.cost_workorder_real)
+ production.cost_material_consumed + production.cost_workorder_real
+ )
diff --git a/mrp_production_cost/models/mrp_workorder.py b/mrp_production_cost/models/mrp_workorder.py
index 6a28daa76..34f872119 100644
--- a/mrp_production_cost/models/mrp_workorder.py
+++ b/mrp_production_cost/models/mrp_workorder.py
@@ -7,23 +7,33 @@ class MrpWorkorder(models.Model):
_inherit = "mrp.workorder"
machine_hour_cost = fields.Float(
- string="Machine hour cost", readonly=True, store=True, copy=False,
- related="workcenter_id.costs_hour")
+ string="Machine hour cost",
+ readonly=True,
+ store=True,
+ copy=False,
+ related="workcenter_id.costs_hour",
+ )
workorder_cost_estimated = fields.Float(
- string="Workorder Cost estimated", copy=False, store=True,
- compute='_compute_workorder_cost_estimated')
+ string="Workorder Cost estimated",
+ copy=False,
+ store=True,
+ compute="_compute_workorder_cost_estimated",
+ )
workorder_cost_real = fields.Float(
- string="Workorder Cost real", copy=False, store=True,
- compute='_compute_workorder_cost_real')
+ string="Workorder Cost real",
+ copy=False,
+ store=True,
+ compute="_compute_workorder_cost_real",
+ )
- @api.depends('duration_expected', 'machine_hour_cost')
+ @api.depends("duration_expected", "machine_hour_cost")
def _compute_workorder_cost_estimated(self):
for order in self:
order.workorder_cost_estimated = (
- order.machine_hour_cost * order.duration_expected)
+ order.machine_hour_cost * order.duration_expected
+ )
- @api.depends('duration', 'machine_hour_cost')
+ @api.depends("duration", "machine_hour_cost")
def _compute_workorder_cost_real(self):
for order in self:
- order.workorder_cost_real = (
- order.machine_hour_cost * order.duration)
+ order.workorder_cost_real = order.machine_hour_cost * order.duration
diff --git a/mrp_production_cost/models/stock_move.py b/mrp_production_cost/models/stock_move.py
index eed96c972..7a0215bb9 100644
--- a/mrp_production_cost/models/stock_move.py
+++ b/mrp_production_cost/models/stock_move.py
@@ -1,29 +1,41 @@
# Copyright 2022 Patxi Lersundi
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
-from odoo import api, models, fields
+from odoo import api, fields, models
class StockMove(models.Model):
_inherit = "stock.move"
product_standard_cost = fields.Float(
- string="Standard Cost", readonly=True, store=True, copy=False,
- related='product_id.standard_price')
+ string="Standard Cost",
+ readonly=True,
+ store=True,
+ copy=False,
+ related="product_id.standard_price",
+ )
material_cost_to_consume = fields.Float(
- string="Material cost to consume", store=True, copy=False,
- compute='_compute_material_cost_to_consume')
+ string="Material cost to consume",
+ store=True,
+ copy=False,
+ compute="_compute_material_cost_to_consume",
+ )
material_cost_consumed = fields.Float(
- string="Material cost consumed", store=True, copy=False,
- compute='_compute_material_cost_consumed')
+ string="Material cost consumed",
+ store=True,
+ copy=False,
+ compute="_compute_material_cost_consumed",
+ )
- @api.depends('product_standard_cost', 'product_uom_qty')
+ @api.depends("product_standard_cost", "product_uom_qty")
def _compute_material_cost_to_consume(self):
for move in self:
move.material_cost_to_consume = (
- move.product_standard_cost * move.product_uom_qty)
+ move.product_standard_cost * move.product_uom_qty
+ )
- @api.depends('product_standard_cost', 'quantity_done')
+ @api.depends("product_standard_cost", "quantity_done")
def _compute_material_cost_consumed(self):
for move in self:
move.material_cost_consumed = (
- move.product_standard_cost * move.quantity_done)
+ move.product_standard_cost * move.quantity_done
+ )
diff --git a/mrp_production_cost/views/mrp_production_views.xml b/mrp_production_cost/views/mrp_production_views.xml
index 598004beb..5672e7caa 100644
--- a/mrp_production_cost/views/mrp_production_views.xml
+++ b/mrp_production_cost/views/mrp_production_views.xml
@@ -1,13 +1,16 @@
-
+
mrp.production
-
+
-
-
-
-
+
+
+
+
Cost Material to consume
@@ -22,12 +25,15 @@
mrp.production
-
+
-
+
diff --git a/mrp_production_cost/views/mrp_stockmove_views.xml b/mrp_production_cost/views/mrp_stockmove_views.xml
index b8cb36a57..d98a929a8 100644
--- a/mrp_production_cost/views/mrp_stockmove_views.xml
+++ b/mrp_production_cost/views/mrp_stockmove_views.xml
@@ -5,8 +5,8 @@
-
-
+
+
Material cost to consume
diff --git a/mrp_production_cost/views/mrp_workorder_views.xml b/mrp_production_cost/views/mrp_workorder_views.xml
index 67669fa75..e12435fb0 100644
--- a/mrp_production_cost/views/mrp_workorder_views.xml
+++ b/mrp_production_cost/views/mrp_workorder_views.xml
@@ -2,12 +2,15 @@
mrp.workorder
-
+
-
-
-
+
+
+
Workorder Cost estimated
diff --git a/mrp_production_date/__manifest__.py b/mrp_production_date/__manifest__.py
index 896ad7ee1..fb155b900 100644
--- a/mrp_production_date/__manifest__.py
+++ b/mrp_production_date/__manifest__.py
@@ -4,6 +4,7 @@
"name": "MRP Production Date",
"version": "14.0.1.0.0",
"author": "Avanzosc",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "Manufacturing",
"depends": [
"mrp",
diff --git a/mrp_production_deconstruction/__manifest__.py b/mrp_production_deconstruction/__manifest__.py
index bfd287a96..0bbce5063 100644
--- a/mrp_production_deconstruction/__manifest__.py
+++ b/mrp_production_deconstruction/__manifest__.py
@@ -2,8 +2,9 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP Production Deconstruction",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "MRP",
"depends": [
"mrp",
@@ -13,5 +14,5 @@
"views/mrp_bom_view.xml",
],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_production_deconstruction/models/mrp_bom.py b/mrp_production_deconstruction/models/mrp_bom.py
index b5ff49fcc..61c710154 100644
--- a/mrp_production_deconstruction/models/mrp_bom.py
+++ b/mrp_production_deconstruction/models/mrp_bom.py
@@ -1,10 +1,12 @@
# Copyright 2022 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields
+from odoo import fields, models
class MrpBom(models.Model):
_inherit = "mrp.bom"
is_deconstruction = fields.Boolean(
- string="Is Deconstruction?", default=False)
+ string="Is Deconstruction?",
+ default=False,
+ )
diff --git a/mrp_production_deconstruction/models/mrp_production.py b/mrp_production_deconstruction/models/mrp_production.py
index 4bfa58eb5..2b0bb4d13 100644
--- a/mrp_production_deconstruction/models/mrp_production.py
+++ b/mrp_production_deconstruction/models/mrp_production.py
@@ -1,6 +1,6 @@
# Copyright 2022 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import api, models, fields
+from odoo import api, fields, models
class MrpProduction(models.Model):
@@ -9,30 +9,33 @@ class MrpProduction(models.Model):
is_deconstruction = fields.Boolean(
string="Is Deconstruction?",
related="bom_id.is_deconstruction",
- store=True)
+ store=True,
+ )
move_line_ids = fields.One2many(
string="Move Lines",
comodel_name="stock.move.line",
inverse_name="production_id",
domain=lambda self: [
- ("location_dest_id", "in", self.production_location_id.ids)],
- )
+ ("location_dest_id", "in", self.production_location_id.ids)
+ ],
+ )
finished_move_line_ids = fields.One2many(
compute=False,
inverse_name="production_id",
domain=lambda self: [
("location_id", "in", self.production_location_id.ids),
- ("location_dest_id", "in", self.location_dest_id.ids)],
- )
+ ("location_dest_id", "in", self.location_dest_id.ids),
+ ],
+ )
- @api.depends('product_id', 'company_id', "is_deconstruction")
+ @api.depends("product_id", "company_id", "is_deconstruction")
def _compute_production_location(self):
super(MrpProduction, self)._compute_production_location()
for production in self:
if production.is_deconstruction:
production.production_location_id = (
- production.picking_type_id.default_location_src_id.id) or (
- False)
+ production.picking_type_id.default_location_src_id.id
+ ) or (False)
def write(self, vals):
res = super(MrpProduction, self).write(vals)
@@ -46,28 +49,39 @@ def write(self, vals):
def _check_is_deconstruction(self):
for production in self:
- if production.bom_id and (
- production.is_deconstruction) is True and (
- production.move_raw_ids):
+ if (
+ production.bom_id
+ and production.is_deconstruction is True
+ and production.move_raw_ids
+ ):
origin = production.picking_type_id.default_location_src_id
if origin.usage != "internal" and (
- production.production_location_id.usage) == (
- "internal"):
+ production.production_location_id.usage == "internal"
+ ):
origin = production.production_location_id
dest = production.move_raw_ids.location_dest_id
if dest.usage == "production":
- production.write({
- "location_dest_id": dest.id,
- "location_src_id": dest.id,
- "production_location_id": origin.id})
+ production.write(
+ {
+ "location_dest_id": dest.id,
+ "location_src_id": dest.id,
+ "production_location_id": origin.id,
+ }
+ )
for move in production.move_raw_ids:
- move.write({
- "location_id": dest.id,
- "location_dest_id": origin.id})
- for line in move.move_line_ids:
- line.write({
+ move.write(
+ {
"location_id": dest.id,
- "location_dest_id": origin.id})
+ "location_dest_id": origin.id,
+ }
+ )
+ for line in move.move_line_ids:
+ line.write(
+ {
+ "location_id": dest.id,
+ "location_dest_id": origin.id,
+ }
+ )
def action_confirm(self):
self._check_is_deconstruction()
@@ -79,7 +93,10 @@ def button_mark_done(self):
if production.is_deconstruction is True:
origin = production.finished_move_line_ids.location_id
dest = production.finished_move_line_ids.location_dest_id
- production.finished_move_line_ids.write({
- "location_id": dest.id,
- "location_dest_id": origin.id})
+ production.finished_move_line_ids.write(
+ {
+ "location_id": dest.id,
+ "location_dest_id": origin.id,
+ }
+ )
return result
diff --git a/mrp_production_deconstruction/models/stock_move_line.py b/mrp_production_deconstruction/models/stock_move_line.py
index 2307ae640..998c6e8ad 100644
--- a/mrp_production_deconstruction/models/stock_move_line.py
+++ b/mrp_production_deconstruction/models/stock_move_line.py
@@ -1,6 +1,6 @@
# Copyright 2022 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import _, api, models, fields
+from odoo import api, fields, models
class StockMoveLine(models.Model):
@@ -28,10 +28,8 @@ def _get_default_location_dest_id(self):
result = production.picking_type_id.default_location_src_id.id
return result
- location_id = fields.Many2one(
- default=_get_default_location_id)
- location_dest_id = fields.Many2one(
- default=_get_default_location_dest_id)
+ location_id = fields.Many2one(default=_get_default_location_id)
+ location_dest_id = fields.Many2one(default=_get_default_location_dest_id)
@api.onchange("location_id", "location_dest_id")
def onchange_product_id_domain(self):
@@ -42,13 +40,9 @@ def onchange_product_id_domain(self):
[("id", "=", production)], limit=1
)
domain = {}
- if production.is_deconstruction is not True and (
- production.move_raw_ids
- ):
+ if production.is_deconstruction is not True and (production.move_raw_ids):
products = production.move_raw_ids.mapped("product_id")
- domain = {"domain": {"product_id": [
- ("id", "in", products.ids)
- ]}}
+ domain = {"domain": {"product_id": [("id", "in", products.ids)]}}
elif "default_production_id" in self.env.context:
production = self.env.context["default_production_id"]
production = self.env["mrp.production"].search(
@@ -57,7 +51,5 @@ def onchange_product_id_domain(self):
domain = {}
if production.move_byproduct_ids:
products = production.move_byproduct_ids.mapped("product_id")
- domain = {"domain": {"product_id": [
- ("id", "in", products.ids)
- ]}}
+ domain = {"domain": {"product_id": [("id", "in", products.ids)]}}
return domain
diff --git a/mrp_production_deconstruction/views/mrp_bom_view.xml b/mrp_production_deconstruction/views/mrp_bom_view.xml
index 7d66722cc..667bef786 100644
--- a/mrp_production_deconstruction/views/mrp_bom_view.xml
+++ b/mrp_production_deconstruction/views/mrp_bom_view.xml
@@ -1,26 +1,32 @@
-
+
mrp.bom
-
+
-
+
- {'invisible': [('is_deconstruction', '=', True)]}
+ {'invisible': [('is_deconstruction', '=', True)]}
mrp.bom
-
+
-
-
+
+
diff --git a/mrp_production_deconstruction/views/mrp_production_view.xml b/mrp_production_deconstruction/views/mrp_production_view.xml
index 0b54e91c6..bdf4c8726 100644
--- a/mrp_production_deconstruction/views/mrp_production_view.xml
+++ b/mrp_production_deconstruction/views/mrp_production_view.xml
@@ -1,35 +1,90 @@
-
+
mrp.production
-
+
-
+
- {'column_invisible':[('parent.is_deconstruction', '=', True)]}
+ {'column_invisible':[('parent.is_deconstruction', '=', True)]}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -39,28 +94,52 @@
mrp.production
-
+
-
+
mrp.production
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
diff --git a/mrp_production_extend_origin/__manifest__.py b/mrp_production_extend_origin/__manifest__.py
index 974c28d1f..69cde04eb 100644
--- a/mrp_production_extend_origin/__manifest__.py
+++ b/mrp_production_extend_origin/__manifest__.py
@@ -6,12 +6,11 @@
"category": "MRP",
"license": "AGPL-3",
"author": "AvanzOSC",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"depends": [
"sale",
"mrp",
],
- "data": [
- ],
+ "data": [],
"installable": True,
}
diff --git a/mrp_production_extend_origin/models/stock_rule.py b/mrp_production_extend_origin/models/stock_rule.py
index 54faf08fb..83db18792 100644
--- a/mrp_production_extend_origin/models/stock_rule.py
+++ b/mrp_production_extend_origin/models/stock_rule.py
@@ -6,11 +6,29 @@
class StockRule(models.Model):
_inherit = "stock.rule"
- def _prepare_mo_vals(self, product_id, product_qty, product_uom,
- location_id, name, origin, company_id, values, bom):
+ def _prepare_mo_vals(
+ self,
+ product_id,
+ product_qty,
+ product_uom,
+ location_id,
+ name,
+ origin,
+ company_id,
+ values,
+ bom,
+ ):
mo_values = super(StockRule, self)._prepare_mo_vals(
- product_id, product_qty, product_uom, location_id, name, origin,
- company_id, values, bom)
+ product_id,
+ product_qty,
+ product_uom,
+ location_id,
+ name,
+ origin,
+ company_id,
+ values,
+ bom,
+ )
if "origin" in mo_values and mo_values.get("origin", False):
sale_obj = self.env["sale.order"]
cond = [("name", "=", mo_values.get("origin"))]
@@ -25,7 +43,6 @@ def _prepare_mo_vals(self, product_id, product_qty, product_uom,
cond = [("name", "=", sale.origin)]
sale_origin = sale_obj.sudo().search(cond, limit=1)
if sale_origin:
- origin = "{} - {}".format(
- sale_origin.partner_id.name, origin)
+ origin = "{} - {}".format(sale_origin.partner_id.name, origin)
mo_values["origin"] = origin
return mo_values
diff --git a/mrp_production_quality_operator/README.rst b/mrp_production_quality_operator/README.rst
new file mode 100644
index 000000000..85c89dfed
--- /dev/null
+++ b/mrp_production_quality_operator/README.rst
@@ -0,0 +1,37 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+=============================================
+MRP Production Quality Operator Custom Fields
+=============================================
+
+The **MRP Production Quality Operator Custom Fields** module enhances
+the functionality of MRP Production in Odoo by adding custom fields
+`qty_rejected`, `operator_id`, and `quality_responsible_id`.
+These fields allow for better tracking and management of
+production quality and operator responsibilities.
+
+Features
+========
+
+- **Custom Fields**:
+ - **Quantity Rejected**: Tracks the quantity of rejected products during production.
+ - **Operator**: Associates an operator with the production order.
+ - **Quality Responsible**: Identifies the responsible person for ensuring product quality.
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smash it by providing detailed and welcomed feedback.
+
+Credits
+=======
+
+Contributors
+------------
+- Unai Beristain
+
+Do not contact contributors directly about support or help with technical issues.
diff --git a/mrp_production_quality_operator/__init__.py b/mrp_production_quality_operator/__init__.py
new file mode 100644
index 000000000..0650744f6
--- /dev/null
+++ b/mrp_production_quality_operator/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/mrp_production_quality_operator/__manifest__.py b/mrp_production_quality_operator/__manifest__.py
new file mode 100644
index 000000000..59514ab57
--- /dev/null
+++ b/mrp_production_quality_operator/__manifest__.py
@@ -0,0 +1,18 @@
+# Copyright 2024 Unai Beristain - AvanzOSC
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
+{
+ "name": "MRP Production Quality Operator Custom Fields",
+ "version": "14.0.1.0.0",
+ "category": "Manufacturing",
+ "summary": "Fields qty_rejected, operator_id and quality_responsible_id to production",
+ "author": "AvanzOSC",
+ "website": "https://github.com/avanzosc/mrp-addons",
+ "license": "AGPL-3",
+ "depends": ["mrp", "hr"],
+ "data": [
+ "views/mrp_production_views.xml",
+ ],
+ "installable": True,
+ "auto_install": False,
+}
diff --git a/mrp_production_quality_operator/models/__init__.py b/mrp_production_quality_operator/models/__init__.py
new file mode 100644
index 000000000..a9e5f13e4
--- /dev/null
+++ b/mrp_production_quality_operator/models/__init__.py
@@ -0,0 +1 @@
+from . import mrp_production
diff --git a/mrp_production_quality_operator/models/mrp_production.py b/mrp_production_quality_operator/models/mrp_production.py
new file mode 100644
index 000000000..e403d60fa
--- /dev/null
+++ b/mrp_production_quality_operator/models/mrp_production.py
@@ -0,0 +1,11 @@
+from odoo import fields, models
+
+
+class MrpProduction(models.Model):
+ _inherit = "mrp.production"
+
+ qty_rejected = fields.Float(string="Rejected Quantity")
+ operator_id = fields.Many2one(comodel_name="hr.employee", string="Operator")
+ quality_responsible_id = fields.Many2one(
+ comodel_name="hr.employee", string="Quality Responsible"
+ )
diff --git a/mrp_production_quality_operator/views/mrp_production_views.xml b/mrp_production_quality_operator/views/mrp_production_views.xml
new file mode 100644
index 000000000..7d877d5bc
--- /dev/null
+++ b/mrp_production_quality_operator/views/mrp_production_views.xml
@@ -0,0 +1,28 @@
+
+
+
+ mrp.production
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mrp.production
+
+
+
+
+
+
+
+
+
+
diff --git a/mrp_production_show_button_unreserve/__manifest__.py b/mrp_production_show_button_unreserve/__manifest__.py
index 40917e474..c15147d0c 100644
--- a/mrp_production_show_button_unreserve/__manifest__.py
+++ b/mrp_production_show_button_unreserve/__manifest__.py
@@ -6,11 +6,10 @@
"category": "MRP",
"license": "AGPL-3",
"author": "AvanzOSC",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"depends": [
"mrp",
],
- "data": [
- ],
+ "data": [],
"installable": True,
}
diff --git a/mrp_production_show_button_unreserve/models/mrp_production.py b/mrp_production_show_button_unreserve/models/mrp_production.py
index 41eb2d00c..81a0b2814 100644
--- a/mrp_production_show_button_unreserve/models/mrp_production.py
+++ b/mrp_production_show_button_unreserve/models/mrp_production.py
@@ -10,9 +10,8 @@ class MrpProduction(models.Model):
def _compute_unreserve_visible(self):
result = super(MrpProduction, self)._compute_unreserve_visible()
for order in self:
- already_reserved = (
- order.state not in
- ("done", "cancel") and order.mapped(
- "move_raw_ids.move_line_ids"))
+ already_reserved = order.state not in ("done", "cancel") and order.mapped(
+ "move_raw_ids.move_line_ids"
+ )
order.unreserve_visible = True if already_reserved else False
return result
diff --git a/mrp_production_split_by_serials/README.rst b/mrp_production_split_by_serials/README.rst
index 96c207940..095988de2 100644
--- a/mrp_production_split_by_serials/README.rst
+++ b/mrp_production_split_by_serials/README.rst
@@ -7,7 +7,7 @@ Mrp production split by serials
===============================
* When confirming an OF, if the product to be produced is "Traceable by serial
-number", create as many unit OFs as the quantity to be produced had the OF.
+ number", create as many unit OFs as the quantity to be produced had the OF.
Bug Tracker
===========
diff --git a/mrp_production_split_by_serials/__manifest__.py b/mrp_production_split_by_serials/__manifest__.py
index 75ca1ba39..4a5d317a4 100644
--- a/mrp_production_split_by_serials/__manifest__.py
+++ b/mrp_production_split_by_serials/__manifest__.py
@@ -9,7 +9,7 @@
"website": "https://github.com/avanzosc/mrp-addons",
"depends": [
"mrp",
- "stock"
+ "stock",
],
"data": [
"security/ir.model.access.csv",
diff --git a/mrp_production_split_by_serials/models/mrp_production.py b/mrp_production_split_by_serials/models/mrp_production.py
index 5ea6903db..ac1eba3ff 100644
--- a/mrp_production_split_by_serials/models/mrp_production.py
+++ b/mrp_production_split_by_serials/models/mrp_production.py
@@ -1,19 +1,21 @@
# Copyright 2022 Alfredo de la Fuente - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import fields, models, _
+from odoo import _, models
class MrpProduction(models.Model):
_inherit = "mrp.production"
def action_confirm(self):
- production_obj = self.env['mrp.production']
- wiz_obj = self.env['wiz.split.serials']
+ production_obj = self.env["mrp.production"]
+ wiz_obj = self.env["wiz.split.serials"]
productions_to_split = production_obj
productions_no_to_split = production_obj
for production in self:
- if (production.product_id.tracking == "serial" and
- production.product_qty > 1):
+ if (
+ production.product_id.tracking == "serial"
+ and production.product_qty > 1
+ ):
productions_to_split += production
else:
productions_no_to_split += production
@@ -21,19 +23,20 @@ def action_confirm(self):
return super(MrpProduction, self).action_confirm()
if productions_no_to_split:
super(MrpProduction, productions_no_to_split).action_confirm()
- vals = {'mrp_production_ids': [(6, 0, productions_to_split.ids)]}
- wiz = wiz_obj.with_context(
- default_productions=productions_to_split).create(vals)
+ vals = {"mrp_production_ids": [(6, 0, productions_to_split.ids)]}
+ wiz = wiz_obj.with_context(default_productions=productions_to_split).create(
+ vals
+ )
context = self.env.context.copy()
context["default_productions"] = [(6, 0, productions_to_split.ids)]
return {
- 'name': _("MOs to split"),
- 'view_mode': 'form',
- 'res_model': 'wiz.split.serials',
- 'domain': [('id', '=', wiz.id)],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'context': context
+ "name": _("MOs to split"),
+ "view_mode": "form",
+ "res_model": "wiz.split.serials",
+ "domain": [("id", "=", wiz.id)],
+ "type": "ir.actions.act_window",
+ "target": "new",
+ "context": context,
}
def split_by_serials(self):
@@ -41,11 +44,15 @@ def split_by_serials(self):
cont = 1
old_name = self.name
name = "{}-{}".format(old_name, str(cont).rjust(3, "0"))
- self.write({'product_qty': 1,
- 'name': name})
+ self.write(
+ {
+ "product_qty": 1,
+ "name": name,
+ }
+ )
self._onchange_move_raw()
while qty > 1:
qty -= 1
cont += 1
name = "{}-{}".format(old_name, str(cont).rjust(3, "0"))
- new_production = self.copy({'name': name})
+ self.copy({"name": name})
diff --git a/mrp_production_split_by_serials/wizard/wiz_split_serials.py b/mrp_production_split_by_serials/wizard/wiz_split_serials.py
index f566aa610..ec4cfef12 100644
--- a/mrp_production_split_by_serials/wizard/wiz_split_serials.py
+++ b/mrp_production_split_by_serials/wizard/wiz_split_serials.py
@@ -1,21 +1,23 @@
# Copyright 2022 Alfredo de la Fuente - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields, api
+from odoo import api, fields, models
class WizSplitSerials(models.TransientModel):
- _name = 'wiz.split.serials'
- _description = 'Wizard for split productions'
+ _name = "wiz.split.serials"
+ _description = "Wizard for split productions"
mrp_production_ids = fields.Many2many(
- string="MRP Productions", comodel_name="mrp.production")
+ string="MRP Productions",
+ comodel_name="mrp.production",
+ )
@api.model
def default_get(self, fields_list):
res = super(WizSplitSerials, self).default_get(fields_list)
if "default_productions" in self.env.context:
productions = self.env.context.get("default_productions")
- res["mrp_production_ids"] = productions
+ res["mrp_production_ids"] = productions
return res
def action_split_productions(self):
diff --git a/mrp_production_split_by_serials/wizard/wiz_split_serials_views.xml b/mrp_production_split_by_serials/wizard/wiz_split_serials_views.xml
index 4bbec0010..49168323e 100644
--- a/mrp_production_split_by_serials/wizard/wiz_split_serials_views.xml
+++ b/mrp_production_split_by_serials/wizard/wiz_split_serials_views.xml
@@ -1,4 +1,4 @@
-
+
wiz.split.serials.form
@@ -10,14 +10,14 @@
These MOs have a product to produce with tracking "By unique serial number", and with a quantity to produce greater than 1.
-
+
You want to split these MOs into single unit MOs?.
-
+
@@ -25,10 +25,14 @@
diff --git a/mrp_production_split_finished_product_by_serials/models/stock_quant.py b/mrp_production_split_finished_product_by_serials/models/stock_quant.py
index 8f326ddf7..4af3163ce 100644
--- a/mrp_production_split_finished_product_by_serials/models/stock_quant.py
+++ b/mrp_production_split_finished_product_by_serials/models/stock_quant.py
@@ -6,7 +6,7 @@
class StockQuant(models.Model):
_inherit = "stock.quant"
- @api.constrains('quantity')
+ @api.constrains("quantity")
def check_quantity(self):
if "with_tracking_serial" not in self.env.context:
return super(StockQuant, self).check_quantity()
diff --git a/mrp_production_split_finished_product_by_serials/models/uom_uom.py b/mrp_production_split_finished_product_by_serials/models/uom_uom.py
index 4771ebcb6..5aea04482 100644
--- a/mrp_production_split_finished_product_by_serials/models/uom_uom.py
+++ b/mrp_production_split_finished_product_by_serials/models/uom_uom.py
@@ -6,14 +6,22 @@
class UomUom(models.Model):
_inherit = "uom.uom"
- def _compute_quantity(self, qty, to_unit, round=True, rounding_method='UP',
- raise_if_failure=True):
+ def _compute_quantity(
+ self, qty, to_unit, round=True, rounding_method="UP", raise_if_failure=True
+ ):
if "qty_twith_serial" in self.env.context:
return super(UomUom, self)._compute_quantity(
- self.env.context.get("qty_twith_serial"), to_unit, round=round,
+ self.env.context.get("qty_twith_serial"),
+ to_unit,
+ round=round,
rounding_method=rounding_method,
- raise_if_failure=raise_if_failure)
+ raise_if_failure=raise_if_failure,
+ )
else:
return super(UomUom, self)._compute_quantity(
- qty, to_unit, round=round, rounding_method=rounding_method,
- raise_if_failure=raise_if_failure)
+ qty,
+ to_unit,
+ round=round,
+ rounding_method=rounding_method,
+ raise_if_failure=raise_if_failure,
+ )
diff --git a/mrp_routing_workcenter_capacity/__manifest__.py b/mrp_routing_workcenter_capacity/__manifest__.py
index 84850d1b9..d3967778c 100644
--- a/mrp_routing_workcenter_capacity/__manifest__.py
+++ b/mrp_routing_workcenter_capacity/__manifest__.py
@@ -2,15 +2,16 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP Routing Workcenter Capacity",
- "version": '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
+ "website": "https://github.com/avanzosc/mrp-addons",
"license": "AGPL-3",
"category": "Manufacturing/Manufacturing",
"depends": [
"mrp",
],
"data": [
- 'views/mrp_routing_workcenter_views.xml'
+ "views/mrp_routing_workcenter_views.xml",
],
"installable": True,
}
diff --git a/mrp_routing_workcenter_capacity/models/mrp_routing_workcenter.py b/mrp_routing_workcenter_capacity/models/mrp_routing_workcenter.py
index ae6480ee7..0c5b906d4 100644
--- a/mrp_routing_workcenter_capacity/models/mrp_routing_workcenter.py
+++ b/mrp_routing_workcenter_capacity/models/mrp_routing_workcenter.py
@@ -1,49 +1,55 @@
# Copyright 2021 Alfredo de la fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
-from odoo import models, fields, api, exceptions, _
+from odoo import _, api, exceptions, fields, models
class MrpRoutingWorkcenter(models.Model):
- _inherit = 'mrp.routing.workcenter'
+ _inherit = "mrp.routing.workcenter"
capacity = fields.Float(
- string='Capacity', default=1.0)
+ string="Capacity",
+ default=1.0,
+ )
time_start = fields.Float(
- string='Time before prod.', help="Time in minutes for the setup.")
+ string="Time before prod.",
+ help="Time in minutes for the setup.",
+ )
time_stop = fields.Float(
- string='Time after prod.', help="Time in minutes for the cleaning.")
+ string="Time after prod.",
+ help="Time in minutes for the cleaning.",
+ )
- @api.depends('time_cycle_manual', 'time_mode', 'workorder_ids')
+ @api.depends("time_cycle_manual", "time_mode", "workorder_ids")
def _compute_time_cycle(self):
result = super(MrpRoutingWorkcenter, self)._compute_time_cycle()
- manual_ops = self.filtered(
- lambda operation: operation.time_mode == 'manual')
+ manual_ops = self.filtered(lambda operation: operation.time_mode == "manual")
for operation in manual_ops:
operation.time_cycle = operation.time_cycle_manual
operations = self - manual_ops
for operation in operations.filtered(lambda x: x.capacity):
- data = self.env['mrp.workorder'].read_group(
- [('operation_id', '=', operation.id),
- ('qty_produced', '>', 0),
- ('state', '=', 'done')
- ],
- ['operation_id', 'duration', 'qty_produced'],
- ['operation_id'], limit=operation.time_mode_batch)
- count_data = dict(
- (item['operation_id'][0],
- (item['duration'],
- item['qty_produced'])) for item in data)
+ data = self.env["mrp.workorder"].read_group(
+ [
+ ("operation_id", "=", operation.id),
+ ("qty_produced", ">", 0),
+ ("state", "=", "done"),
+ ],
+ ["operation_id", "duration", "qty_produced"],
+ ["operation_id"],
+ limit=operation.time_mode_batch,
+ )
+ count_data = {
+ item["operation_id"][0]: (item["duration"], item["qty_produced"])
+ for item in data
+ }
if count_data.get(operation.id) and count_data[operation.id][1]:
operation.time_cycle = (
- count_data[operation.id][0] /
- count_data[operation.id][1]) * (operation.capacity or 1.0)
+ count_data[operation.id][0] / count_data[operation.id][1]
+ ) * (operation.capacity or 1.0)
else:
operation.time_cycle = operation.time_cycle_manual
return result
- @api.constrains('capacity')
+ @api.constrains("capacity")
def _check_capacity(self):
- if any(routing_workcenter.capacity < 0.0
- for routing_workcenter in self):
- raise exceptions.UserError(
- _('The capacity must be strictly positive.'))
+ if any(routing_workcenter.capacity < 0.0 for routing_workcenter in self):
+ raise exceptions.UserError(_("The capacity must be strictly positive."))
diff --git a/mrp_routing_workcenter_capacity/models/mrp_workorder.py b/mrp_routing_workcenter_capacity/models/mrp_workorder.py
index 5e4090e9e..f6713c03a 100644
--- a/mrp_routing_workcenter_capacity/models/mrp_workorder.py
+++ b/mrp_routing_workcenter_capacity/models/mrp_workorder.py
@@ -5,20 +5,25 @@
class MrpWorkorder(models.Model):
- _inherit = 'mrp.workorder'
+ _inherit = "mrp.workorder"
def _get_duration_expected(self, alternative_workcenter=False, ratio=1):
self.ensure_one()
if not self.workcenter_id and not self.operation_id:
return super(MrpWorkorder, self)._get_duration_expected(
- alternative_workcenter=alternative_workcenter, ratio=ratio)
+ alternative_workcenter=alternative_workcenter, ratio=ratio
+ )
qty_production = self.production_id.product_uom_id._compute_quantity(
- self.qty_production, self.production_id.product_id.uom_id)
+ self.qty_production, self.production_id.product_id.uom_id
+ )
capacity = (
- self.operation_id.capacity if self.operation_id.capacity else
- self.workcenter_id.capacity)
- cycle_number = float_round(qty_production / capacity,
- precision_digits=0, rounding_method='UP')
+ self.operation_id.capacity
+ if self.operation_id.capacity
+ else self.workcenter_id.capacity
+ )
+ cycle_number = float_round(
+ qty_production / capacity, precision_digits=0, rounding_method="UP"
+ )
if self.operation_id.time_start or self.operation_id.time_stop:
time_start = self.operation_id.time_start
time_stop = self.operation_id.time_stop
@@ -27,14 +32,23 @@ def _get_duration_expected(self, alternative_workcenter=False, ratio=1):
time_stop = self.workcenter_id.time_stop
if alternative_workcenter:
duration_expected_working = (
- (self.duration_expected - time_start - time_stop) *
- self.workcenter_id.time_efficiency / (100.0 * cycle_number))
+ (self.duration_expected - time_start - time_stop)
+ * self.workcenter_id.time_efficiency
+ / (100.0 * cycle_number)
+ )
if duration_expected_working < 0:
duration_expected_working = 0
- return (alternative_workcenter.time_start +
- alternative_workcenter.time_stop +
- cycle_number * duration_expected_working * 100.0 /
- alternative_workcenter.time_efficiency)
+ return (
+ alternative_workcenter.time_start
+ + alternative_workcenter.time_stop
+ + cycle_number
+ * duration_expected_working
+ * 100.0
+ / alternative_workcenter.time_efficiency
+ )
time_cycle = self.operation_id and self.operation_id.time_cycle or 60.0
- return (time_start + time_stop + cycle_number * time_cycle * 100.0 /
- self.workcenter_id.time_efficiency)
+ return (
+ time_start
+ + time_stop
+ + cycle_number * time_cycle * 100.0 / self.workcenter_id.time_efficiency
+ )
diff --git a/mrp_routing_workcenter_capacity/reports/mrp_report_bom_structure.py b/mrp_routing_workcenter_capacity/reports/mrp_report_bom_structure.py
index 0f2f97ab0..30fc75394 100644
--- a/mrp_routing_workcenter_capacity/reports/mrp_report_bom_structure.py
+++ b/mrp_routing_workcenter_capacity/reports/mrp_report_bom_structure.py
@@ -17,16 +17,19 @@ def _get_operation_line(self, bom, qty, level):
qty = bom.product_uom_id._compute_quantity(qty, bom.product_tmpl_id.uom_id)
for operation in bom.operation_ids:
operation_cycle = float_round(
- qty / operation.capacity, precision_rounding=1, rounding_method="UP")
- duration_expected = (
- operation_cycle * (operation.time_cycle + (
- operation.time_stop + operation.time_start)))
- total = ((duration_expected / 60.0) * operation.workcenter_id.costs_hour)
- operations.append({
- "level": level or 0,
- "operation": operation,
- "name": operation.name + " - " + operation.workcenter_id.name,
- "duration_expected": duration_expected,
- "total": self.env.company.currency_id.round(total),
- })
+ qty / operation.capacity, precision_rounding=1, rounding_method="UP"
+ )
+ duration_expected = operation_cycle * (
+ operation.time_cycle + (operation.time_stop + operation.time_start)
+ )
+ total = (duration_expected / 60.0) * operation.workcenter_id.costs_hour
+ operations.append(
+ {
+ "level": level or 0,
+ "operation": operation,
+ "name": operation.name + " - " + operation.workcenter_id.name,
+ "duration_expected": duration_expected,
+ "total": self.env.company.currency_id.round(total),
+ }
+ )
return operations
diff --git a/mrp_routing_workcenter_capacity/tests/test_mrp_routing_workcenter_capacity.py b/mrp_routing_workcenter_capacity/tests/test_mrp_routing_workcenter_capacity.py
index 061f2929e..29ddb0068 100644
--- a/mrp_routing_workcenter_capacity/tests/test_mrp_routing_workcenter_capacity.py
+++ b/mrp_routing_workcenter_capacity/tests/test_mrp_routing_workcenter_capacity.py
@@ -4,25 +4,24 @@
class TestMrpRoutingWorkcenterCapacity(common.SavepointCase):
-
@classmethod
def setUpClass(cls):
super(TestMrpRoutingWorkcenterCapacity, cls).setUpClass()
- cls.product = cls.env.ref('mrp.product_product_computer_desk_head')
- cls.mrp_bom = cls.env['mrp.bom'].search(
- [('product_tmpl_id', '=', cls.product.product_tmpl_id.id)])
+ cls.product = cls.env.ref("mrp.product_product_computer_desk_head")
+ cls.mrp_bom = cls.env["mrp.bom"].search(
+ [("product_tmpl_id", "=", cls.product.product_tmpl_id.id)]
+ )
cls.operation = cls.mrp_bom.operation_ids[0]
- operation_vals = {
- 'capacity': 2,
- 'time_cycle_manual': 60}
+ operation_vals = {"capacity": 2, "time_cycle_manual": 60}
cls.operation.write(operation_vals)
cls.workcenter = cls.operation.workcenter_id
production_vals = {
- 'product_id': cls.product.id,
- 'product_uom_id': cls.product.uom_id.id,
- 'bom_id': cls.mrp_bom.id,
- 'product_qty': 1}
- cls.production = cls.env['mrp.production'].create(production_vals)
+ "product_id": cls.product.id,
+ "product_uom_id": cls.product.uom_id.id,
+ "bom_id": cls.mrp_bom.id,
+ "product_qty": 1,
+ }
+ cls.production = cls.env["mrp.production"].create(production_vals)
cls.production._onchange_workorder_ids()
cls.production._onchange_product_qty()
@@ -35,25 +34,21 @@ def test_mrp_routing_workcenter_capacity(self):
self.production.product_qty = 3
self.production._onchange_product_qty()
self.assertEqual(workorder.duration_expected, 120.0)
- operation_vals = {'time_start': 10,
- 'time_stop': 10}
+ operation_vals = {"time_start": 10, "time_stop": 10}
self.operation.write(operation_vals)
self.production._onchange_product_qty()
self.assertEqual(workorder.duration_expected, 140.0)
- workcenter_vals = {'capacity': 1,
- 'time_start': 20,
- 'time_stop': 20}
+ workcenter_vals = {"capacity": 1, "time_start": 20, "time_stop": 20}
self.workcenter.write(workcenter_vals)
result = workorder._get_duration_expected(
- alternative_workcenter=self.workcenter, ratio=1)
+ alternative_workcenter=self.workcenter, ratio=1
+ )
self.assertEqual(result, 160.0)
- operation_vals = {'time_mode': 'auto',
- 'time_cycle_manual': 30}
+ operation_vals = {"time_mode": "auto", "time_cycle_manual": 30}
self.operation.write(operation_vals)
self.operation._compute_time_cycle()
self.assertEqual(self.operation.time_cycle, 30.0)
- workorder_vals = {'workcenter_id': False,
- 'operation_id': False}
+ workorder_vals = {"workcenter_id": False, "operation_id": False}
workorder.write(workorder_vals)
result = workorder._get_duration_expected()
self.assertEqual(result, 140.0)
diff --git a/mrp_routing_workcenter_capacity/views/mrp_routing_workcenter_views.xml b/mrp_routing_workcenter_capacity/views/mrp_routing_workcenter_views.xml
index 373c9644b..40feaab7a 100644
--- a/mrp_routing_workcenter_capacity/views/mrp_routing_workcenter_views.xml
+++ b/mrp_routing_workcenter_capacity/views/mrp_routing_workcenter_views.xml
@@ -1,8 +1,8 @@
-
+
mrp.routing.workcenter
-
+
@@ -14,17 +14,25 @@
mrp.routing.workcenter
-
+
-
+
- minutes
+ minutes
-
+
- minutes
+ minutes
diff --git a/mrp_second_uom/__manifest__.py b/mrp_second_uom/__manifest__.py
index 64e58caa3..b9c7ce58b 100644
--- a/mrp_second_uom/__manifest__.py
+++ b/mrp_second_uom/__manifest__.py
@@ -2,18 +2,18 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP Second UOM",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "Product",
"depends": [
"product_second_uom",
- "mrp"
+ "mrp",
],
"data": [
"views/mrp_bom_views.xml",
"views/mrp_production_views.xml",
],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_second_uom/models/mrp_bom.py b/mrp_second_uom/models/mrp_bom.py
index ddc995146..394b568e3 100644
--- a/mrp_second_uom/models/mrp_bom.py
+++ b/mrp_second_uom/models/mrp_bom.py
@@ -1,37 +1,44 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields, api
+from odoo import api, fields, models
class MrpBom(models.Model):
_inherit = "mrp.bom"
second_uom_id = fields.Many2one(
- string='Second UOM', comodel_name='uom.uom',
- related='product_tmpl_id.second_uom_id', store=True)
- qty_second_uom = fields.Float(
- string='Quantity Second UOM')
+ string="Second UOM",
+ comodel_name="uom.uom",
+ related="product_tmpl_id.second_uom_id",
+ store=True,
+ )
+ qty_second_uom = fields.Float(string="Quantity Second UOM")
is_calculated = fields.Boolean(
- string='Is calculated', default=False, store=False)
+ string="Is calculated",
+ default=False,
+ store=False,
+ )
- @api.onchange('product_qty', 'product_tmpl_id.factor', 'product_tmpl_id')
+ @api.onchange("product_qty", "product_tmpl_id.factor", "product_tmpl_id")
def onchange_qty_second_uom(self):
- if self.product_qty and (
- self.product_tmpl_id.factor) and (
- self.is_calculated is False):
- self.qty_second_uom = (
- self.product_qty * self.product_tmpl_id.factor)
+ if (
+ self.product_qty
+ and self.product_tmpl_id.factor
+ and self.is_calculated is False
+ ):
+ self.qty_second_uom = self.product_qty * self.product_tmpl_id.factor
self.is_calculated = True
else:
self.is_calculated = False
- @api.onchange('qty_second_uom', 'product_tmpl_id.factor_inverse')
+ @api.onchange("qty_second_uom", "product_tmpl_id.factor_inverse")
def onchange_product_qty(self):
- if self.qty_second_uom and (
- self.product_tmpl_id.factor_inverse) and (
- self.is_calculated is False):
- self.product_qty = (
- self.qty_second_uom * self.product_tmpl_id.factor_inverse)
+ if (
+ self.qty_second_uom
+ and self.product_tmpl_id.factor_inverse
+ and self.is_calculated is False
+ ):
+ self.product_qty = self.qty_second_uom * self.product_tmpl_id.factor_inverse
self.is_calculated = True
else:
self.is_calculated = False
diff --git a/mrp_second_uom/models/stock_move.py b/mrp_second_uom/models/stock_move.py
index 71da01079..4fb38b0c6 100644
--- a/mrp_second_uom/models/stock_move.py
+++ b/mrp_second_uom/models/stock_move.py
@@ -1,19 +1,24 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields, api
+from odoo import api, fields, models
class StockMove(models.Model):
_inherit = "stock.move"
second_uom_id = fields.Many2one(
- string='Second UOM', comodel_name='uom.uom',
- related='product_id.second_uom_id', store=True)
+ string="Second UOM",
+ comodel_name="uom.uom",
+ related="product_id.second_uom_id",
+ store=True,
+ )
qty_second_uom = fields.Float(
- string='Quantity Second UOM', compute='_compute_qty_second_uom',
- store=True)
+ string="Quantity Second UOM",
+ compute="_compute_qty_second_uom",
+ store=True,
+ )
- @api.depends('product_id', 'product_id.factor', 'product_uom_qty')
+ @api.depends("product_id", "product_id.factor", "product_uom_qty")
def _compute_qty_second_uom(self):
for line in self:
line.qty_second_uom = line.product_qty * line.product_id.factor
diff --git a/mrp_second_uom/views/mrp_bom_views.xml b/mrp_second_uom/views/mrp_bom_views.xml
index 7f09844d7..cdd46b0df 100644
--- a/mrp_second_uom/views/mrp_bom_views.xml
+++ b/mrp_second_uom/views/mrp_bom_views.xml
@@ -1,16 +1,19 @@
-
-
+
mrp.bom
-
+
-
+
-
-
+
+
diff --git a/mrp_second_uom/views/mrp_production_views.xml b/mrp_second_uom/views/mrp_production_views.xml
index a961b7228..70b1d5166 100644
--- a/mrp_second_uom/views/mrp_production_views.xml
+++ b/mrp_second_uom/views/mrp_production_views.xml
@@ -1,13 +1,15 @@
-
-
+
mrp.production
-
+
-
-
-
+
+
+
diff --git a/mrp_stock_picking_create_repair/__manifest__.py b/mrp_stock_picking_create_repair/__manifest__.py
index 0d2e43bf5..7cae194b4 100644
--- a/mrp_stock_picking_create_repair/__manifest__.py
+++ b/mrp_stock_picking_create_repair/__manifest__.py
@@ -6,7 +6,7 @@
"category": "Manufacturing/Manufacturing",
"license": "AGPL-3",
"author": "Avanzosc",
- "website": "https://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"depends": [
"stock_picking_create_repair",
"mrp",
diff --git a/mrp_stock_picking_create_repair/models/mrp_workcenter.py b/mrp_stock_picking_create_repair/models/mrp_workcenter.py
index 4e235c8b9..3f1f11f77 100644
--- a/mrp_stock_picking_create_repair/models/mrp_workcenter.py
+++ b/mrp_stock_picking_create_repair/models/mrp_workcenter.py
@@ -7,5 +7,7 @@ class MrpWorkcenter(models.Model):
_inherit = "mrp.workcenter"
use_in_repairs = fields.Boolean(
- string="Use in repairs", default=False, copy=False
+ string="Use in repairs",
+ default=False,
+ copy=False,
)
diff --git a/mrp_stock_picking_create_repair/views/mrp_workcenter_views.xml b/mrp_stock_picking_create_repair/views/mrp_workcenter_views.xml
index a9038f42b..0322a55b1 100644
--- a/mrp_stock_picking_create_repair/views/mrp_workcenter_views.xml
+++ b/mrp_stock_picking_create_repair/views/mrp_workcenter_views.xml
@@ -5,7 +5,7 @@
-
+
@@ -25,14 +25,24 @@
-
-
+
+
-
+
diff --git a/mrp_stock_picking_create_repair/views/repair_order_views.xml b/mrp_stock_picking_create_repair/views/repair_order_views.xml
index 612df78d2..5ceb3be97 100644
--- a/mrp_stock_picking_create_repair/views/repair_order_views.xml
+++ b/mrp_stock_picking_create_repair/views/repair_order_views.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
100
-
+
@@ -29,8 +29,12 @@
-
+
diff --git a/mrp_stock_usability/models/mrp_workorder.py b/mrp_stock_usability/models/mrp_workorder.py
index d38a31ff8..19077333b 100644
--- a/mrp_stock_usability/models/mrp_workorder.py
+++ b/mrp_stock_usability/models/mrp_workorder.py
@@ -33,9 +33,10 @@ def _compute_unreserve_visible(self):
pending_raw_moves = order.move_raw_ids.filtered(
lambda m: m.state not in ("done", "cancel")
)
- order.unreserve_visible = any(
- [m.mrp_unreserve_visible for m in pending_raw_moves]
- ) and order.date_planned_start
+ order.unreserve_visible = (
+ any([m.mrp_unreserve_visible for m in pending_raw_moves])
+ and order.date_planned_start
+ )
def _compute_show_check_availability(self):
"""According to `workorder.show_check_availability`, the
@@ -46,15 +47,18 @@ def _compute_show_check_availability(self):
if workorder.state in ("done", "cancel"):
workorder.show_check_availability = False
continue
- workorder.show_check_availability = any(
- move.state in ("waiting", "confirmed", "partially_available")
- and float_compare(
- move.product_uom_qty,
- 0,
- precision_rounding=move.product_uom.rounding,
+ workorder.show_check_availability = (
+ any(
+ move.state in ("waiting", "confirmed", "partially_available")
+ and float_compare(
+ move.product_uom_qty,
+ 0,
+ precision_rounding=move.product_uom.rounding,
+ )
+ for move in workorder.move_raw_ids
)
- for move in workorder.move_raw_ids
- ) and workorder.date_planned_start
+ and workorder.date_planned_start
+ )
def action_assign(self):
for order in self:
diff --git a/mrp_usability/__manifest__.py b/mrp_usability/__manifest__.py
index 0a98f5d8a..86db6414b 100644
--- a/mrp_usability/__manifest__.py
+++ b/mrp_usability/__manifest__.py
@@ -4,7 +4,7 @@
"name": "MRP Usability",
"version": "14.0.2.1.0",
"author": "Avanzosc",
- "website": "https://github.com/OCA/l10n-spain",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "MRP",
"depends": [
"mrp",
diff --git a/mrp_workcenter_productivity_loss/__manifest__.py b/mrp_workcenter_productivity_loss/__manifest__.py
index a743af15e..31a4013cf 100644
--- a/mrp_workcenter_productivity_loss/__manifest__.py
+++ b/mrp_workcenter_productivity_loss/__manifest__.py
@@ -2,17 +2,17 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Mrp Workcenter Productivity Loss",
- 'version': '14.0.0.0.0',
+ "version": "14.0.0.0.0",
"category": "Manufacturing/Manufacturing",
"license": "AGPL-3",
"author": "AvanzOSC",
"website": "https://github.com/avanzosc/mrp-addons",
"depends": [
"mrp",
- "crm_claim_mrp"
+ "crm_claim_mrp",
],
"data": [
"views/mrp_workorder_views.xml",
],
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_workcenter_productivity_loss/views/mrp_workorder_views.xml b/mrp_workcenter_productivity_loss/views/mrp_workorder_views.xml
index aa87c5388..58e75d178 100644
--- a/mrp_workcenter_productivity_loss/views/mrp_workorder_views.xml
+++ b/mrp_workcenter_productivity_loss/views/mrp_workorder_views.xml
@@ -1,13 +1,19 @@
-
+
mrp.workorder
-
+
-
+
-
+
diff --git a/mrp_workcenter_productivity_loss/wizard/mrp_workorder_pending_wizard.py b/mrp_workcenter_productivity_loss/wizard/mrp_workorder_pending_wizard.py
index 4cf65df64..b0abd9576 100644
--- a/mrp_workcenter_productivity_loss/wizard/mrp_workorder_pending_wizard.py
+++ b/mrp_workcenter_productivity_loss/wizard/mrp_workorder_pending_wizard.py
@@ -8,10 +8,12 @@ class MrpWorkorderPendingWizard(models.TransientModel):
def button_create_claim(self):
if self.loss_id:
- workorder = self.env['mrp.workorder'].browse(
- self.env.context.get('active_id'))
+ workorder = self.env["mrp.workorder"].browse(
+ self.env.context.get("active_id")
+ )
if workorder.time_ids:
mrp_workcenter_productivity = max(
- workorder.time_ids, key=lambda x: x.date_end)
+ workorder.time_ids, key=lambda x: x.date_end
+ )
mrp_workcenter_productivity.loss_id = self.loss_id.id
return super(MrpWorkorderPendingWizard, self).button_create_claim()
diff --git a/mrp_workorder_availability/__manifest__.py b/mrp_workorder_availability/__manifest__.py
index dee7bb074..cec89b84e 100644
--- a/mrp_workorder_availability/__manifest__.py
+++ b/mrp_workorder_availability/__manifest__.py
@@ -2,17 +2,17 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP Workorder Availability",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
- "website": "https://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "MRP",
"depends": [
"mrp",
- "stock_move_availability"
+ "stock_move_availability",
],
"data": [
"views/mrp_workorder_views.xml",
],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_workorder_availability/models/mrp_workorder.py b/mrp_workorder_availability/models/mrp_workorder.py
index c4b6c36c2..9d7938605 100644
--- a/mrp_workorder_availability/models/mrp_workorder.py
+++ b/mrp_workorder_availability/models/mrp_workorder.py
@@ -1,10 +1,10 @@
# Copyright 2021 Berezi - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields, _
+from odoo import _, fields, models
class MrpWorkorder(models.Model):
- _inherit = 'mrp.workorder'
+ _inherit = "mrp.workorder"
def _compute_count_stock_move(self):
for workorder in self:
@@ -15,41 +15,49 @@ def _compute_count_move_line(self):
workorder.count_move_line = len(workorder.move_line_ids)
stock_move_ids = fields.One2many(
- string='Stock Moves', comodel_name='stock.move',
- inverse_name='workorder_id')
+ string="Stock Moves",
+ comodel_name="stock.move",
+ inverse_name="workorder_id",
+ )
count_stock_move = fields.Integer(
- '# Stock Moves', compute='_compute_count_stock_move')
+ "# Stock Moves",
+ compute="_compute_count_stock_move",
+ )
count_move_line = fields.Integer(
- '# Stock Move Lines', compute='_compute_count_move_line')
+ "# Stock Move Lines",
+ compute="_compute_count_move_line",
+ )
def action_view_stock_move(self):
context = self.env.context.copy()
- context.update({'default_workorder_id': self.id})
+ context.update({"default_workorder_id": self.id})
return {
- 'name': _("Stock Moves"),
- 'view_mode': 'tree,form',
- 'res_model': 'stock.move',
- "views": [[self.env.ref(
- 'stock.view_move_tree').id, "tree"],
- [False, "form"]],
- 'domain': [('id', 'in', self.stock_move_ids.ids)],
- 'type': 'ir.actions.act_window',
- 'context': context,
+ "name": _("Stock Moves"),
+ "view_mode": "tree,form",
+ "res_model": "stock.move",
+ "views": [
+ [self.env.ref("stock.view_move_tree").id, "tree"],
+ [False, "form"],
+ ],
+ "domain": [("id", "in", self.stock_move_ids.ids)],
+ "type": "ir.actions.act_window",
+ "context": context,
}
def action_view_stock_move_line(self):
context = self.env.context.copy()
- context.update({'default_workorder_id': self.id})
+ context.update({"default_workorder_id": self.id})
return {
- 'name': _("Stock Move Lines"),
- 'view_mode': 'tree,form',
- 'res_model': 'stock.move.line',
- "views": [[self.env.ref(
- 'stock.view_move_line_tree').id, "tree"],
- [False, "form"]],
- 'domain': [('id', 'in', self.move_line_ids.ids)],
- 'type': 'ir.actions.act_window',
- 'context': context,
+ "name": _("Stock Move Lines"),
+ "view_mode": "tree,form",
+ "res_model": "stock.move.line",
+ "views": [
+ [self.env.ref("stock.view_move_line_tree").id, "tree"],
+ [False, "form"],
+ ],
+ "domain": [("id", "in", self.move_line_ids.ids)],
+ "type": "ir.actions.act_window",
+ "context": context,
}
def action_assign(self):
@@ -66,5 +74,6 @@ def action_done(self):
def action_cancel(self):
for workorder in self:
- workorder.stock_move_ids.filtered(lambda x: x.state not in (
- 'cancel', 'done'))._action_cancel()
+ workorder.stock_move_ids.filtered(
+ lambda x: x.state not in ("cancel", "done")
+ )._action_cancel()
diff --git a/mrp_workorder_availability/views/mrp_workorder_views.xml b/mrp_workorder_availability/views/mrp_workorder_views.xml
index 37e252026..94ce9e8ba 100644
--- a/mrp_workorder_availability/views/mrp_workorder_views.xml
+++ b/mrp_workorder_availability/views/mrp_workorder_views.xml
@@ -1,22 +1,59 @@
-
-
+
mrp.workorder
-
+
-
@@ -24,19 +61,48 @@
mrp.workorder
-
+
-
+
- {'invisible': ['|', '|', ('production_state', 'in', ('draft')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}
+ {'invisible': ['|', '|', ('production_state', 'in', ('draft')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}
-
-
-
-
+
+
+
+
diff --git a/mrp_workorder_extra_time/__manifest__.py b/mrp_workorder_extra_time/__manifest__.py
index 1a14c688d..4edfc5810 100644
--- a/mrp_workorder_extra_time/__manifest__.py
+++ b/mrp_workorder_extra_time/__manifest__.py
@@ -2,10 +2,10 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Mrp Workorder Extra Time",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
"category": "Manufacturing/Manufacturing",
- "website": "https://github.com/alfredoavanzosc/mrp-addons",
+ "website": "https://github.com/avanzosc/mrp-addons",
"license": "AGPL-3",
"depends": [
"mrp",
@@ -13,5 +13,5 @@
"data": [
"views/mrp_workorder_views.xml",
],
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_workorder_extra_time/models/mrp_workorder.py b/mrp_workorder_extra_time/models/mrp_workorder.py
index 80c738723..66c837410 100644
--- a/mrp_workorder_extra_time/models/mrp_workorder.py
+++ b/mrp_workorder_extra_time/models/mrp_workorder.py
@@ -7,23 +7,33 @@ class MrpWorkorder(models.Model):
_inherit = "mrp.workorder"
extra_time_piece = fields.Float(
- string="Extra time piece", copy=False)
+ string="Extra time piece",
+ copy=False,
+ )
total_overtime = fields.Float(
- string="Total overtime", compute="_compute_total_overtime",
- store=True, copy=False)
+ string="Total overtime",
+ compute="_compute_total_overtime",
+ store=True,
+ copy=False,
+ )
total_time = fields.Float(
- string="Total time", compute="_compute_total_overtime",
- store=True, copy=False)
+ string="Total time",
+ compute="_compute_total_overtime",
+ store=True,
+ copy=False,
+ )
- @api.depends("production_id", "production_id.product_qty",
- "extra_time_piece", "duration")
+ @api.depends(
+ "production_id", "production_id.product_qty", "extra_time_piece", "duration"
+ )
def _compute_total_overtime(self):
for workorder in self:
total_overtime = 0
total_time = 0
if workorder.production_id:
- total_overtime = (workorder.extra_time_piece *
- workorder.production_id.product_qty)
+ total_overtime = (
+ workorder.extra_time_piece * workorder.production_id.product_qty
+ )
total_time = workorder.duration + total_overtime
workorder.total_overtime = total_overtime
workorder.total_time = total_time
diff --git a/mrp_workorder_extra_time/views/mrp_workorder_views.xml b/mrp_workorder_extra_time/views/mrp_workorder_views.xml
index 7267d77f3..029309ea1 100644
--- a/mrp_workorder_extra_time/views/mrp_workorder_views.xml
+++ b/mrp_workorder_extra_time/views/mrp_workorder_views.xml
@@ -1,23 +1,38 @@
-
+
mrp.workorder
-
+
-
-
-
+
+
+
hide
-
\ No newline at end of file
+
diff --git a/mrp_workorder_grouping_by_material/models/mrp_production.py b/mrp_workorder_grouping_by_material/models/mrp_production.py
index 64411c2ee..d24e0fdd1 100644
--- a/mrp_workorder_grouping_by_material/models/mrp_production.py
+++ b/mrp_workorder_grouping_by_material/models/mrp_production.py
@@ -28,7 +28,8 @@ def open_nest(self):
self.ensure_one()
nested = self.mapped("workorder_ids.nested_line_ids.nest_id")
action = self.env["ir.actions.actions"]._for_xml_id(
- "mrp_workorder_grouping_by_material.mrp_workorder_nest_action")
+ "mrp_workorder_grouping_by_material.mrp_workorder_nest_action"
+ )
action["domain"] = expression.AND(
[[("id", "in", nested.ids)], safe_eval(action.get("domain") or "[]")]
)
diff --git a/mrp_workorder_grouping_by_material/models/mrp_workorder.py b/mrp_workorder_grouping_by_material/models/mrp_workorder.py
index ea14362e4..faa983eab 100644
--- a/mrp_workorder_grouping_by_material/models/mrp_workorder.py
+++ b/mrp_workorder_grouping_by_material/models/mrp_workorder.py
@@ -148,8 +148,12 @@ def button_scrap(self):
def open_nest(self):
self.ensure_one()
action = self.env["ir.actions.actions"]._for_xml_id(
- "mrp_workorder_grouping_by_material.mrp_workorder_nest_action")
+ "mrp_workorder_grouping_by_material.mrp_workorder_nest_action"
+ )
action["domain"] = expression.AND(
- [[("id", "in", self.nested_ids.ids)], safe_eval(action.get("domain") or "[]")]
+ [
+ [("id", "in", self.nested_ids.ids)],
+ safe_eval(action.get("domain") or "[]"),
+ ]
)
return action
diff --git a/mrp_workorder_grouping_by_material/security/mrp_workorder_grouping_by_material_security.xml b/mrp_workorder_grouping_by_material/security/mrp_workorder_grouping_by_material_security.xml
index 7c95b72a4..210eff713 100644
--- a/mrp_workorder_grouping_by_material/security/mrp_workorder_grouping_by_material_security.xml
+++ b/mrp_workorder_grouping_by_material/security/mrp_workorder_grouping_by_material_security.xml
@@ -1,17 +1,15 @@
-
-
+
mrp_workorder_nest multi-company
+ name="model_id"
+ search="[('model','=','mrp.workorder.nest')]"
+ model="ir.model"
+ />
[('company_id', 'in', company_ids)]
-
diff --git a/mrp_workorder_grouping_by_material/views/mrp_workorder_nest_line_view.xml b/mrp_workorder_grouping_by_material/views/mrp_workorder_nest_line_view.xml
index 781f847a0..8c1bfe0d5 100644
--- a/mrp_workorder_grouping_by_material/views/mrp_workorder_nest_line_view.xml
+++ b/mrp_workorder_grouping_by_material/views/mrp_workorder_nest_line_view.xml
@@ -28,15 +28,17 @@
>
-
+
-
+
@@ -128,10 +130,7 @@
-
+
diff --git a/mrp_workorder_grouping_by_material/wizard/multiple_copy.py b/mrp_workorder_grouping_by_material/wizard/multiple_copy.py
index 08bef1ee4..9904bdeb0 100644
--- a/mrp_workorder_grouping_by_material/wizard/multiple_copy.py
+++ b/mrp_workorder_grouping_by_material/wizard/multiple_copy.py
@@ -13,5 +13,5 @@ def action_make_copies(self):
nest_ids = self._context.get("active_ids")
nests = self.env["mrp.workorder.nest"].browse(nest_ids)
for nest in nests:
- for i in range(self.copy_number):
+ for _cnt in range(self.copy_number):
nest.copy()
diff --git a/mrp_workorder_grouping_by_material/wizard/nested_new_line.py b/mrp_workorder_grouping_by_material/wizard/nested_new_line.py
index 9a177e3a4..682524ede 100644
--- a/mrp_workorder_grouping_by_material/wizard/nested_new_line.py
+++ b/mrp_workorder_grouping_by_material/wizard/nested_new_line.py
@@ -183,7 +183,8 @@ def _onchange_workorder_id(self):
# qty_nested = wo._get_real_uom_qty(record.qty_nested)
rounding = wo.production_id.product_uom_id.rounding
qty_remaining = float_round(
- (record.qty_production - record.qty_produced), precision_rounding=rounding
+ (record.qty_production - record.qty_produced),
+ precision_rounding=rounding,
)
qty_nested_remaining = float_round(
qty_remaining - (record.qty_nested - record.qty_produced),
diff --git a/mrp_workorder_permission/data/mrp_workorder_permission.xml b/mrp_workorder_permission/data/mrp_workorder_permission.xml
index e4b4f87c9..bce472038 100644
--- a/mrp_workorder_permission/data/mrp_workorder_permission.xml
+++ b/mrp_workorder_permission/data/mrp_workorder_permission.xml
@@ -13,9 +13,7 @@
- Workorder User: Can see only theirs work orders
+ Workorder User: Can see only theirs work orders
diff --git a/mrp_workorder_permission/views/mrp_workorder_views.xml b/mrp_workorder_permission/views/mrp_workorder_views.xml
index fae1b44ae..d3c734bdd 100644
--- a/mrp_workorder_permission/views/mrp_workorder_views.xml
+++ b/mrp_workorder_permission/views/mrp_workorder_views.xml
@@ -16,10 +16,7 @@
mrp.workorder
-
+
diff --git a/mrp_workorder_product_variant/__manifest__.py b/mrp_workorder_product_variant/__manifest__.py
index d59d07bb2..cc4eb1554 100644
--- a/mrp_workorder_product_variant/__manifest__.py
+++ b/mrp_workorder_product_variant/__manifest__.py
@@ -2,10 +2,10 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP Workorder Product Variant",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
"category": "Manufacturing",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"depends": [
"mrp",
],
@@ -13,5 +13,5 @@
"views/mrp_routing_workcenter_view.xml",
],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_workorder_product_variant/i18n/mrp_workorder_product_variant.csv b/mrp_workorder_product_variant/i18n/mrp_workorder_product_variant.csv
deleted file mode 100644
index 3fd717fb0..000000000
--- a/mrp_workorder_product_variant/i18n/mrp_workorder_product_variant.csv
+++ /dev/null
@@ -1,19 +0,0 @@
-module,type,name,res_id,src,value,comments
-mrp_workorder_product_variant,model,"ir.model,name",mrp_workorder_product_variant.model_mrp_bom,Bill of Material,,
-mrp_workorder_product_variant,model,"ir.model,name",mrp_workorder_product_variant.model_mrp_production,Production Order,,
-mrp_workorder_product_variant,model,"ir.model,name",mrp_workorder_product_variant.model_mrp_routing_workcenter,Work Center Usage,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_bom__display_name,Display Name,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_bom__id,ID,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_bom____last_update,Last Modified on,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_production__display_name,Display Name,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_production__id,ID,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_production____last_update,Last Modified on,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_routing_workcenter__bom_product_template_attribute_value_ids,Apply on Variants,,
-mrp_workorder_product_variant,model,"ir.model.fields,help",mrp_workorder_product_variant.field_mrp_routing_workcenter__bom_product_template_attribute_value_ids,BOM Product Variants needed to apply this line.,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_routing_workcenter__display_name,Display Name,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_routing_workcenter__id,ID,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_routing_workcenter____last_update,Last Modified on,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_routing_workcenter__parent_product_tmpl_id,Parent Product Template,,
-mrp_workorder_product_variant,model,"ir.model.fields,field_description",mrp_workorder_product_variant.field_mrp_routing_workcenter__possible_bom_product_template_attribute_value_ids,Possible BOM Product Attribute Value,,
-mrp_workorder_product_variant,code,addons/mrp_workorder_product_variant/models/mrp_bom.py,24,BoM cannot concern product %s and have a line with attributes (%s) at the same time.,,
-mrp_workorder_product_variant,code,addons/mrp_workorder_product_variant/models/mrp_bom.py,28,The attribute value %(attribute)s set on product %(product)s does not match the BoM product %(bom_product)s.,,
diff --git a/mrp_workorder_product_variant/models/mrp_bom.py b/mrp_workorder_product_variant/models/mrp_bom.py
index 09d77d492..03a09a8c9 100644
--- a/mrp_workorder_product_variant/models/mrp_bom.py
+++ b/mrp_workorder_product_variant/models/mrp_bom.py
@@ -1,13 +1,13 @@
# Copyright 2023 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import _, api, fields, models
+from odoo import _, api, models
from odoo.exceptions import ValidationError
class MrpBom(models.Model):
_inherit = "mrp.bom"
- @api.onchange('product_id')
+ @api.onchange("product_id")
def onchange_product_id(self):
result = super(MrpBom, self).onchange_product_id()
if self.product_id:
@@ -15,20 +15,33 @@ def onchange_product_id(self):
line.bom_product_template_attribute_value_ids = False
return result
- @api.constrains('product_id', 'product_tmpl_id', 'operation_ids')
+ @api.constrains("product_id", "product_tmpl_id", "operation_ids")
def _check_bom_lines(self):
result = super(MrpBom, self)._check_bom_lines()
for bom in self:
for operation in bom.operation_ids:
- if bom.product_id and operation.bom_product_template_attribute_value_ids:
- raise ValidationError(_("BoM cannot concern product %s and have a line with attributes (%s) at the same time.")
- % (bom.product_id.display_name, ", ".join([ptav.display_name for ptav in operation.bom_product_template_attribute_value_ids])))
+ attribute_values = operation.bom_product_template_attribute_value_ids
+ if bom.product_id and attribute_values:
+ raise ValidationError(
+ _(
+ "BoM cannot concern product %s and have a line with"
+ " attributes (%s) at the same time."
+ )
+ % (
+ bom.product_id.display_name,
+ ", ".join([ptav.display_name for ptav in attribute_values]),
+ )
+ )
for ptav in operation.bom_product_template_attribute_value_ids:
if ptav.product_tmpl_id != bom.product_tmpl_id:
- raise ValidationError(_(
- "The attribute value %(attribute)s set on product %(product)s does not match the BoM product %(bom_product)s.",
- attribute=ptav.display_name,
- product=ptav.product_tmpl_id.display_name,
- bom_product=operation.parent_product_tmpl_id.display_name
- ))
+ raise ValidationError(
+ _(
+ "The attribute value %(attribute)s set on product"
+ " %(product)s does not match the BoM product"
+ " %(bom_product)s.",
+ attribute=ptav.display_name,
+ product=ptav.product_tmpl_id.display_name,
+ bom_product=operation.parent_product_tmpl_id.display_name,
+ )
+ )
return result
diff --git a/mrp_workorder_product_variant/models/mrp_production.py b/mrp_workorder_product_variant/models/mrp_production.py
index 11a7540d3..3bf7483f8 100644
--- a/mrp_workorder_product_variant/models/mrp_production.py
+++ b/mrp_workorder_product_variant/models/mrp_production.py
@@ -6,23 +6,35 @@
class MrpProduction(models.Model):
_inherit = "mrp.production"
- @api.onchange('bom_id', 'product_id')
+ @api.onchange("bom_id", "product_id")
def _onchange_workorder_ids(self):
result = super(MrpProduction, self)._onchange_workorder_ids()
if self.bom_id and self.workorder_ids:
for workorder in self.workorder_ids:
attributes = self.product_id.product_template_attribute_value_ids
- if workorder.operation_id and (
- workorder.operation_id.bom_product_template_attribute_value_ids) and (
- not any([line in attributes for line in workorder.operation_id.bom_product_template_attribute_value_ids])):
+ op = workorder.operation_id
+ if (
+ op
+ and op.bom_product_template_attribute_value_ids
+ and (
+ not any(
+ [
+ line in attributes
+ for line in op.bom_product_template_attribute_value_ids
+ ]
+ )
+ )
+ ):
self.workorder_ids = [(3, workorder.id)]
for line in self.move_raw_ids:
routing = []
for workorder in self.workorder_ids:
if workorder.operation_id not in routing:
routing.append(workorder.operation_id)
- if line.bom_line_id and (
- line.bom_line_id.operation_id) and (
- line.bom_line_id.operation_id not in routing):
+ if (
+ line.bom_line_id
+ and line.bom_line_id.operation_id
+ and line.bom_line_id.operation_id not in routing
+ ):
self.move_raw_ids = [(3, line.id)]
return result
diff --git a/mrp_workorder_product_variant/models/mrp_routing_workcenter.py b/mrp_workorder_product_variant/models/mrp_routing_workcenter.py
index bd44d9b4c..b3ca83be2 100644
--- a/mrp_workorder_product_variant/models/mrp_routing_workcenter.py
+++ b/mrp_workorder_product_variant/models/mrp_routing_workcenter.py
@@ -9,25 +9,34 @@ class MrpRoutingWorkcenter(models.Model):
parent_product_tmpl_id = fields.Many2one(
comodel_name="product.template",
string="Parent Product Template",
- related="bom_id.product_tmpl_id")
+ related="bom_id.product_tmpl_id",
+ )
possible_bom_product_template_attribute_value_ids = fields.Many2many(
- string='Possible BOM Product Attribute Value',
- relation='rel_routing_variant',
- column1='routing_workcenter_id',
- column2='product_template_attribute_id',
- comodel_name='product.template.attribute.value',
- compute='_compute_possible_bom_product_template_attribute_value_ids',
- store=True)
+ string="Possible BOM Product Attribute Value",
+ relation="rel_routing_variant",
+ column1="routing_workcenter_id",
+ column2="product_template_attribute_id",
+ comodel_name="product.template.attribute.value",
+ compute="_compute_possible_bom_product_template_attribute_value_ids",
+ store=True,
+ )
bom_product_template_attribute_value_ids = fields.Many2many(
comodel_name="product.template.attribute.value",
string="Apply on Variants",
ondelete="restrict",
domain="[('id', 'in', possible_bom_product_template_attribute_value_ids)]",
- help="BOM Product Variants needed to apply this line.")
+ help="BOM Product Variants needed to apply this line.",
+ )
@api.depends(
"parent_product_tmpl_id",
- "parent_product_tmpl_id.valid_product_template_attribute_line_ids")
+ "parent_product_tmpl_id.valid_product_template_attribute_line_ids",
+ )
def _compute_possible_bom_product_template_attribute_value_ids(self):
for line in self:
- line.possible_bom_product_template_attribute_value_ids = line.parent_product_tmpl_id.valid_product_template_attribute_line_ids._without_no_variant_attributes().product_template_value_ids._only_active()
+ parent_tmpl_id = line.parent_product_tmpl_id
+ attr_lines = parent_tmpl_id.valid_product_template_attribute_line_ids
+ no_variant_attrs = attr_lines._without_no_variant_attributes()
+ line.possible_bom_product_template_attribute_value_ids = (
+ no_variant_attrs.product_template_value_ids._only_active()
+ )
diff --git a/mrp_workorder_product_variant/views/mrp_routing_workcenter_view.xml b/mrp_workorder_product_variant/views/mrp_routing_workcenter_view.xml
index 6ab26afe3..b817e2279 100644
--- a/mrp_workorder_product_variant/views/mrp_routing_workcenter_view.xml
+++ b/mrp_workorder_product_variant/views/mrp_routing_workcenter_view.xml
@@ -1,26 +1,41 @@
-
-
+
mrp.routing.workcenter
-
+
-
-
-
+
+
+
mrp.routing.workcenter
-
+
-
-
-
+
+
+
diff --git a/mrp_workorder_time_plate/__init__.py b/mrp_workorder_time_plate/__init__.py
index 9a7e03ede..0650744f6 100644
--- a/mrp_workorder_time_plate/__init__.py
+++ b/mrp_workorder_time_plate/__init__.py
@@ -1 +1 @@
-from . import models
\ No newline at end of file
+from . import models
diff --git a/mrp_workorder_time_plate/__manifest__.py b/mrp_workorder_time_plate/__manifest__.py
index 083f3d98b..eb8aa6ac3 100644
--- a/mrp_workorder_time_plate/__manifest__.py
+++ b/mrp_workorder_time_plate/__manifest__.py
@@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "MRP Workorder Time Plate",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"category": "Contact",
"license": "AGPL-3",
"author": "AvanzOSC",
@@ -13,5 +13,5 @@
"data": [
"views/mrp_workorder_view.xml",
],
- 'installable': True,
+ "installable": True,
}
diff --git a/mrp_workorder_time_plate/models/mrp_workcenter_productivity.py b/mrp_workorder_time_plate/models/mrp_workcenter_productivity.py
index 44d7e201e..9c1d409b2 100644
--- a/mrp_workorder_time_plate/models/mrp_workcenter_productivity.py
+++ b/mrp_workorder_time_plate/models/mrp_workcenter_productivity.py
@@ -8,17 +8,21 @@ class MrpWorkcenterProductivity(models.Model):
_inherit = "mrp.workcenter.productivity"
initial_plate = fields.Integer(
- string="Initial Plate")
+ string="Initial Plate",
+ )
final_plate = fields.Integer(
- string="Final Plate")
+ string="Final Plate",
+ )
manufactured_plate = fields.Integer(
string="Manufactured Plate",
compute="_compute_manufactured_plate",
- store=True)
+ store=True,
+ )
speed_average = fields.Float(
string="Speed Average",
compute="_compute_speed_average",
- store=True)
+ store=True,
+ )
@api.depends("initial_plate", "final_plate")
def _compute_manufactured_plate(self):
@@ -37,4 +41,5 @@ def _check_manufactured_plate(self):
for line in self:
if line.manufactured_plate < 0:
raise ValidationError(
- _("Error: Manufactured plates should be positive."))
+ _("Error: Manufactured plates should be positive.")
+ )
diff --git a/mrp_workorder_time_plate/models/mrp_workorder.py b/mrp_workorder_time_plate/models/mrp_workorder.py
index b065096bf..a6d52ee3f 100644
--- a/mrp_workorder_time_plate/models/mrp_workorder.py
+++ b/mrp_workorder_time_plate/models/mrp_workorder.py
@@ -9,10 +9,10 @@ class MrpWorkorder(models.Model):
plates_manufactured = fields.Integer(
string="Plates Manufactured",
compute="_compute_plates_manufactured",
- store=True)
+ store=True,
+ )
@api.depends("time_ids", "time_ids.manufactured_plate")
def _compute_plates_manufactured(self):
for line in self:
- line.plates_manufactured = sum(
- line.time_ids.mapped("manufactured_plate"))
+ line.plates_manufactured = sum(line.time_ids.mapped("manufactured_plate"))
diff --git a/mrp_workorder_time_plate/views/mrp_workorder_view.xml b/mrp_workorder_time_plate/views/mrp_workorder_view.xml
index 9019ac368..b0d155b13 100644
--- a/mrp_workorder_time_plate/views/mrp_workorder_view.xml
+++ b/mrp_workorder_time_plate/views/mrp_workorder_view.xml
@@ -1,24 +1,33 @@
-
+
mrp.workorder
-
+
-
-
-
-
-
+
+
+
+
+
mrp.workorder
-
+
-
+
diff --git a/quality_control_claim/__init__.py b/quality_control_claim/__init__.py
index a9e337226..0650744f6 100644
--- a/quality_control_claim/__init__.py
+++ b/quality_control_claim/__init__.py
@@ -1,2 +1 @@
-
from . import models
diff --git a/quality_control_claim/__manifest__.py b/quality_control_claim/__manifest__.py
index 5f6b0d7fc..4d4012712 100644
--- a/quality_control_claim/__manifest__.py
+++ b/quality_control_claim/__manifest__.py
@@ -3,10 +3,9 @@
{
"name": "Quality control claim",
"version": "14.0.1.0.0",
- "author": "OdooMRP team,"
- "AvanzOSC,"
- "Serv. Tecnol. Avanzados - Pedro M. Baeza",
- "website": "http://www.odoomrp.com",
+ "author": "OdooMRP team," "AvanzOSC," "Serv. Tecnol. Avanzados - Pedro M. Baeza",
+ "website": "https://github.com/avanzosc/mrp-addons",
+ "license": "AGPL-3",
"contributors": [
"Pedro M. Baeza ",
diff --git a/quality_control_claim/models/__init__.py b/quality_control_claim/models/__init__.py
index a26bedf90..de55d6a7e 100644
--- a/quality_control_claim/models/__init__.py
+++ b/quality_control_claim/models/__init__.py
@@ -1,4 +1,3 @@
-
from . import crm_claim
from . import qc_test
from . import qc_inspection
diff --git a/quality_control_claim/models/qc_inspection.py b/quality_control_claim/models/qc_inspection.py
index a141ceb76..aaf359a6b 100644
--- a/quality_control_claim/models/qc_inspection.py
+++ b/quality_control_claim/models/qc_inspection.py
@@ -1,49 +1,60 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import api, fields, models, _
+from odoo import _, fields, models
class QcInspection(models.Model):
- _inherit = 'qc.inspection'
+ _inherit = "qc.inspection"
- def _count_claims(self):
- claim_obj = self.env['crm.claim']
- cond = [('model_ref_id', '=', '%s,%d' % (self._name, self.id))]
+ def _compute_claims(self):
+ claim_obj = self.env["crm.claim"]
+ cond = [("model_ref_id", "=", "%s,%d" % (self._name, self.id))]
claims = claim_obj.search(cond)
self.claims = len(claims)
automatic_claims = fields.Boolean(
- 'Automatic Claims', default=False,
+ string="Automatic Claims",
+ default=False,
help="If you want to create one claim when the quality test status is"
- " 'Quality failed'.")
+ " 'Quality failed'.",
+ )
automatic_claims_by_line = fields.Boolean(
- 'Automatic Claims by line', default=False,
+ string="Automatic Claims by line",
+ default=False,
help="If you want to create one claim per quality test line, when the"
- " quality test line status is 'No ok'.")
- claims = fields.Integer(string="Created claims",
- compute='_count_claims', store=False)
+ " quality test line status is 'No ok'.",
+ )
+ claims = fields.Integer(
+ string="Created claims",
+ compute="_compute_claims",
+ store=False,
+ )
def _prepare_inspection_header(self, object_ref, trigger_line):
result = super(QcInspection, self)._prepare_inspection_header(
- object_ref, trigger_line)
- result.update({
- 'automatic_claims': trigger_line.test.automatic_claims,
- 'automatic_claims_by_line': trigger_line.test.automatic_claims_by_line})
+ object_ref, trigger_line
+ )
+ result.update(
+ {
+ "automatic_claims": trigger_line.test.automatic_claims,
+ "automatic_claims_by_line": trigger_line.test.automatic_claims_by_line,
+ }
+ )
return result
def action_approve(self):
- crm_claim_obj = self.env['crm.claim']
+ crm_claim_obj = self.env["crm.claim"]
super(QcInspection, self).action_approve()
for inspection in self:
- if inspection.state == 'failed' and inspection.automatic_claims:
+ if inspection.state == "failed" and inspection.automatic_claims:
vals = inspection.init_claim_vals()
if self.object_id:
- id, name = self.object_id.name_get()[0]
- vals['name'] = _('Quality test %s for object %s '
- ' unsurpassed') % (self.name, name)
+ res_id, name = self.object_id.name_get()[0]
+ vals["name"] = _(
+ "Quality test %s for object %s " " unsurpassed"
+ ) % (self.name, name)
else:
- vals['name'] = (_('Quality test %s unsurpassed') %
- (self.name))
+ vals["name"] = _("Quality test %s unsurpassed") % (self.name)
crm_claim_obj.create(vals)
elif inspection.automatic_claims_by_line:
for line in inspection.inspection_lines:
@@ -51,20 +62,24 @@ def action_approve(self):
inspection.create_claim_by_line(line)
def init_claim_vals(self):
- vals = {"date": fields.Datetime.now(),
- "model_ref_id": "%s,%d" % (self._name, self.id)
- }
+ vals = {
+ "date": fields.Datetime.now(),
+ "model_ref_id": "%s,%d" % (self._name, self.id),
+ }
return vals
def create_claim_by_line(self, line):
- crm_claim_obj = self.env['crm.claim']
+ crm_claim_obj = self.env["crm.claim"]
vals = self.init_claim_vals()
if self.object_id:
- id, name = self.object_id.name_get()[0]
- vals['name'] = _('Quality test %s for %s unsurpassed, in test'
- ' line %s') % (self.name, name, line.name)
+ res_id, name = self.object_id.name_get()[0]
+ vals["name"] = _(
+ "Quality test %s for %s unsurpassed, in test" " line %s"
+ ) % (self.name, name, line.name)
else:
- vals['name'] = (_('Quality test %s unsurpassed, in test line %s') %
- (self.name, line.name))
+ vals["name"] = _("Quality test %s unsurpassed, in test line %s") % (
+ self.name,
+ line.name,
+ )
claim = crm_claim_obj.create(vals)
return claim
diff --git a/quality_control_claim/models/qc_test.py b/quality_control_claim/models/qc_test.py
index b5b1ade80..568c8a03a 100644
--- a/quality_control_claim/models/qc_test.py
+++ b/quality_control_claim/models/qc_test.py
@@ -7,10 +7,14 @@ class QcTest(models.Model):
_inherit = "qc.test"
automatic_claims = fields.Boolean(
- string="Automatic Claims", default=False,
+ string="Automatic Claims",
+ default=False,
help="If you want to create one claim when the quality test status is"
- " 'Quality failed'.")
+ " 'Quality failed'.",
+ )
automatic_claims_by_line = fields.Boolean(
- string="Automatic Claims by line", default=False,
+ string="Automatic Claims by line",
+ default=False,
help="If you want to create one claim per quality test line, when the"
- " quality test line status is 'No ok'.")
+ " quality test line status is 'No ok'.",
+ )
diff --git a/quality_control_claim/views/qc_inspection_view.xml b/quality_control_claim/views/qc_inspection_view.xml
index a3f65d85d..181777fc6 100644
--- a/quality_control_claim/views/qc_inspection_view.xml
+++ b/quality_control_claim/views/qc_inspection_view.xml
@@ -1,17 +1,21 @@
-
+
Claims
crm.claim
tree,form
- {'default_model_ref_id': 'qc.inspection,'+str(context.get('active_id', False))}
- [('model_ref_id','=','qc.inspection,'+str(context.get('active_id',False)))]
+ {'default_model_ref_id': 'qc.inspection,'+str(context.get('active_id', False))}
+ [('model_ref_id','=','qc.inspection,'+str(context.get('active_id',False)))]
qc.inspection.claim.tree
qc.inspection
-
+
@@ -23,20 +27,22 @@
qc.inspection.claim.form
qc.inspection
-
+
-
+
-
diff --git a/quality_control_claim/views/qc_test_view.xml b/quality_control_claim/views/qc_test_view.xml
index f6ced278b..fe1e76ecc 100644
--- a/quality_control_claim/views/qc_test_view.xml
+++ b/quality_control_claim/views/qc_test_view.xml
@@ -1,9 +1,9 @@
-
+
qc.test.tree.view.inh.qualitycontroclaim
qc.test
-
+
@@ -14,7 +14,7 @@
qc.test.form.view.inh.qualitycontroclaim
qc.test
-
+
@@ -23,4 +23,3 @@
-
diff --git a/quality_control_private_test/__manifest__.py b/quality_control_private_test/__manifest__.py
index bc715b2ea..1e10788ca 100644
--- a/quality_control_private_test/__manifest__.py
+++ b/quality_control_private_test/__manifest__.py
@@ -12,7 +12,7 @@
"author": "AvanzOSC",
"license": "AGPL-3",
"summary": """Quality Control Private Test""",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"data": [
"views/quality_control_view.xml",
"views/product_template_view.xml",
diff --git a/quality_control_test_method/README.rst b/quality_control_test_method/README.rst
index 9b841e41c..f0e66e5a9 100644
--- a/quality_control_test_method/README.rst
+++ b/quality_control_test_method/README.rst
@@ -2,9 +2,9 @@
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
-==========================
+===========================
Quality Control Test Method
-==========================
+===========================
* Test method and test proof new two objects.
* Method and proof fields in quality control test question and quality control inspection lines.
diff --git a/quality_control_test_method/__manifest__.py b/quality_control_test_method/__manifest__.py
index 2afe25838..9847d590e 100644
--- a/quality_control_test_method/__manifest__.py
+++ b/quality_control_test_method/__manifest__.py
@@ -2,9 +2,9 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Quality Control Test Method",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
- "website": "https://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "MRP",
"depends": [
"quality_control_oca",
@@ -16,8 +16,8 @@
"views/qc_test_proof_views.xml",
"views/qc_inspection_line_views.xml",
"views/qc_test_question_views.xml",
- "views/qc_inspection_views.xml"
+ "views/qc_inspection_views.xml",
],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/quality_control_test_method/models/qc_inspection.py b/quality_control_test_method/models/qc_inspection.py
index 9cb045421..cb448604d 100644
--- a/quality_control_test_method/models/qc_inspection.py
+++ b/quality_control_test_method/models/qc_inspection.py
@@ -4,16 +4,22 @@
class QcInspection(models.Model):
- _inherit = 'qc.inspection'
+ _inherit = "qc.inspection"
def _prepare_inspection_lines(self, test, force_fill=False):
result = super(QcInspection, self)._prepare_inspection_lines(
- test, force_fill=False)
+ test, force_fill=False
+ )
for line in result:
- test_line = line[2]['test_line']
- line[2].update({
- 'test_method_id': self.env['qc.test.question'].search(
- [('id', '=', test_line)], limit=1).test_method_id.id,
- 'test_proof_id': self.env['qc.test.question'].search(
- [('id', '=', test_line)], limit=1).test_proof_id.id})
+ test_line = line[2]["test_line"]
+ line[2].update(
+ {
+ "test_method_id": self.env["qc.test.question"]
+ .search([("id", "=", test_line)], limit=1)
+ .test_method_id.id,
+ "test_proof_id": self.env["qc.test.question"]
+ .search([("id", "=", test_line)], limit=1)
+ .test_proof_id.id,
+ }
+ )
return result
diff --git a/quality_control_test_method/models/qc_inspection_line.py b/quality_control_test_method/models/qc_inspection_line.py
index 40ae7cd8b..5f9ef9470 100644
--- a/quality_control_test_method/models/qc_inspection_line.py
+++ b/quality_control_test_method/models/qc_inspection_line.py
@@ -1,12 +1,16 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields
+from odoo import fields, models
class QcInspectionLine(models.Model):
- _inherit = 'qc.inspection.line'
+ _inherit = "qc.inspection.line"
test_method_id = fields.Many2one(
- string='Method', comodel_name='qc.test.method')
+ string="Method",
+ comodel_name="qc.test.method",
+ )
test_proof_id = fields.Many2one(
- string='Proof', comodel_name='qc.test.proof')
+ string="Proof",
+ comodel_name="qc.test.proof",
+ )
diff --git a/quality_control_test_method/models/qc_test_method.py b/quality_control_test_method/models/qc_test_method.py
index 8b018743f..2180ce7cf 100644
--- a/quality_control_test_method/models/qc_test_method.py
+++ b/quality_control_test_method/models/qc_test_method.py
@@ -1,10 +1,10 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields
+from odoo import fields, models
class QcTestMethod(models.Model):
- _name = 'qc.test.method'
- _description = 'Method used to do the test'
+ _name = "qc.test.method"
+ _description = "Method used to do the test"
- name = fields.Char(string='Method Name')
+ name = fields.Char(string="Method Name")
diff --git a/quality_control_test_method/models/qc_test_proof.py b/quality_control_test_method/models/qc_test_proof.py
index c87a4b04a..52527ec8b 100644
--- a/quality_control_test_method/models/qc_test_proof.py
+++ b/quality_control_test_method/models/qc_test_proof.py
@@ -1,13 +1,17 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields
+from odoo import fields, models
class QcTestProof(models.Model):
- _name = 'qc.test.proof'
- _description = 'Test Proof'
+ _name = "qc.test.proof"
+ _description = "Test Proof"
- name = fields.Char(string='Name')
+ name = fields.Char(string="Name")
type = fields.Selection(
- [("qualitative", "Qualitative"), ("quantitative", "Quantitative")],
- string="Type")
+ selection=[
+ ("qualitative", "Qualitative"),
+ ("quantitative", "Quantitative"),
+ ],
+ string="Type",
+ )
diff --git a/quality_control_test_method/models/qc_test_question.py b/quality_control_test_method/models/qc_test_question.py
index 4ee49ba41..c8a8447a9 100644
--- a/quality_control_test_method/models/qc_test_question.py
+++ b/quality_control_test_method/models/qc_test_question.py
@@ -1,25 +1,29 @@
# Copyright 2021 Berezi Amubieta - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields, api
+from odoo import api, fields, models
class QcTestQuestion(models.Model):
- _inherit = 'qc.test.question'
+ _inherit = "qc.test.question"
test_method_id = fields.Many2one(
- string='Method', comodel_name='qc.test.method')
+ string="Method",
+ comodel_name="qc.test.method",
+ )
test_proof_id = fields.Many2one(
- string='Proof', comodel_name='qc.test.proof')
+ string="Proof",
+ comodel_name="qc.test.proof",
+ )
@api.onchange("test_proof_id")
def onchange_type(self):
if self.test_proof_id:
self.type = self.test_proof_id.type
- @api.onchange('type')
+ @api.onchange("type")
def onchange_test_proof_id(self):
self.ensure_one()
domain = []
if self.type:
- domain = ['|', ('type', '=', self.type), ('type', '=', False)]
- return {'domain': {'test_proof_id': domain}}
+ domain = ["|", ("type", "=", self.type), ("type", "=", False)]
+ return {"domain": {"test_proof_id": domain}}
diff --git a/quality_control_test_method/views/qc_inspection_line_views.xml b/quality_control_test_method/views/qc_inspection_line_views.xml
index 6fae04410..d3f72ccb9 100644
--- a/quality_control_test_method/views/qc_inspection_line_views.xml
+++ b/quality_control_test_method/views/qc_inspection_line_views.xml
@@ -1,13 +1,15 @@
-
-
+
qc.inspection.line
-
+
-
-
+
+
diff --git a/quality_control_test_method/views/qc_inspection_views.xml b/quality_control_test_method/views/qc_inspection_views.xml
index ee861f179..96c698cc3 100644
--- a/quality_control_test_method/views/qc_inspection_views.xml
+++ b/quality_control_test_method/views/qc_inspection_views.xml
@@ -1,13 +1,12 @@
-
-
+
qc.inspection
-
+
-
-
+
+
diff --git a/quality_control_test_method/views/qc_test_method_views.xml b/quality_control_test_method/views/qc_test_method_views.xml
index 7d87c0ef0..0f6a02b0b 100644
--- a/quality_control_test_method/views/qc_test_method_views.xml
+++ b/quality_control_test_method/views/qc_test_method_views.xml
@@ -1,13 +1,12 @@
-
-
+
qc.test.method.tree
qc.test.method
-
-
+
+
@@ -21,9 +20,12 @@
{}
-
+
diff --git a/quality_control_test_method/views/qc_test_proof_views.xml b/quality_control_test_method/views/qc_test_proof_views.xml
index 892f89f67..da48e3e46 100644
--- a/quality_control_test_method/views/qc_test_proof_views.xml
+++ b/quality_control_test_method/views/qc_test_proof_views.xml
@@ -1,14 +1,13 @@
-
-
+
qc.test.proof.tree
qc.test.proof
-
-
-
+
+
+
@@ -22,9 +21,12 @@
{}
-
+
diff --git a/quality_control_test_method/views/qc_test_question_views.xml b/quality_control_test_method/views/qc_test_question_views.xml
index ff8e591fd..e9e9a3269 100644
--- a/quality_control_test_method/views/qc_test_question_views.xml
+++ b/quality_control_test_method/views/qc_test_question_views.xml
@@ -1,12 +1,11 @@
-
-
+
qc.test.question
-
+
-
+
diff --git a/quality_control_test_method/views/qc_test_views.xml b/quality_control_test_method/views/qc_test_views.xml
index 09ef57a05..7a7df5a30 100644
--- a/quality_control_test_method/views/qc_test_views.xml
+++ b/quality_control_test_method/views/qc_test_views.xml
@@ -1,13 +1,15 @@
-
-
+
qc.test
-
+
-
-
-
+
+
+
diff --git a/quality_control_usability/__manifest__.py b/quality_control_usability/__manifest__.py
index f86353dfa..1527d4f9e 100644
--- a/quality_control_usability/__manifest__.py
+++ b/quality_control_usability/__manifest__.py
@@ -2,9 +2,9 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Quality Control Usability",
- 'version': '14.0.1.0.0',
+ "version": "14.0.1.0.0",
"author": "Avanzosc",
- "website": "https://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"category": "MRP",
"depends": [
"quality_control_oca",
@@ -14,5 +14,5 @@
"views/qc_test_view.xml",
],
"license": "AGPL-3",
- 'installable': True,
+ "installable": True,
}
diff --git a/quality_control_usability/views/qc_inspection_views.xml b/quality_control_usability/views/qc_inspection_views.xml
index 25605be9a..4f76d1a29 100644
--- a/quality_control_usability/views/qc_inspection_views.xml
+++ b/quality_control_usability/views/qc_inspection_views.xml
@@ -1,9 +1,8 @@
-
-
+
qc.inspection
-
+
0
diff --git a/quality_control_usability/views/qc_test_view.xml b/quality_control_usability/views/qc_test_view.xml
index d4e31a764..b33c851ac 100644
--- a/quality_control_usability/views/qc_test_view.xml
+++ b/quality_control_usability/views/qc_test_view.xml
@@ -1,18 +1,18 @@
-
+
qc.test.form
qc.test
-
+
-
-
-
+
+
+
@@ -22,4 +22,3 @@
-
diff --git a/sale_line_mrp_link/__manifest__.py b/sale_line_mrp_link/__manifest__.py
index 615053abf..1715527cc 100644
--- a/sale_line_mrp_link/__manifest__.py
+++ b/sale_line_mrp_link/__manifest__.py
@@ -6,11 +6,11 @@
"category": "Sales Management",
"license": "AGPL-3",
"author": "AvanzOSC",
- "website": "http://www.avanzosc.es",
+ "website": "https://github.com/avanzosc/mrp-addons",
"depends": [
"sale_order_line_menu",
"sale_mrp",
- "stock"
+ "stock",
],
"data": [
"views/mrp_production_views.xml",
diff --git a/sale_line_mrp_link/models/mrp_production.py b/sale_line_mrp_link/models/mrp_production.py
index ff5e549c3..ef9af5ad7 100644
--- a/sale_line_mrp_link/models/mrp_production.py
+++ b/sale_line_mrp_link/models/mrp_production.py
@@ -7,19 +7,29 @@ class MrpProduction(models.Model):
_inherit = "mrp.production"
sale_line_id = fields.Many2one(
- string="Sale line", comodel_name="sale.order.line",
- copy=False)
+ string="Sale line",
+ comodel_name="sale.order.line",
+ copy=False,
+ )
sale_id = fields.Many2one(
- string="Sale order", comodel_name="sale.order",
- related="sale_line_id.order_id", store=True, copy=False)
+ string="Sale order",
+ comodel_name="sale.order",
+ related="sale_line_id.order_id",
+ store=True,
+ copy=False,
+ )
sale_line_name = fields.Text(
- string="Sale line description", related="sale_line_id.name",
- store=True, copy=False)
+ string="Sale line description",
+ related="sale_line_id.name",
+ store=True,
+ copy=False,
+ )
@api.model
def create(self, values):
- if ("sale_line_id" in self.env.context and
- self.env.context.get("sale_line_id", False)):
+ if "sale_line_id" in self.env.context and self.env.context.get(
+ "sale_line_id", False
+ ):
values["sale_line_id"] = self.env.context.get("sale_line_id")
production = super(MrpProduction, self).create(values)
if production.sale_line_id:
diff --git a/sale_line_mrp_link/models/procurement_group.py b/sale_line_mrp_link/models/procurement_group.py
index 2b5510702..d021d4410 100644
--- a/sale_line_mrp_link/models/procurement_group.py
+++ b/sale_line_mrp_link/models/procurement_group.py
@@ -11,14 +11,20 @@ def run(self, procurements, raise_user_error=True):
result = False
if len(self) > 0 or not procurements:
return super(ProcurementGroup, self).run(
- procurements, raise_user_error=raise_user_error)
+ procurements, raise_user_error=raise_user_error
+ )
for procurement in procurements:
- if ("sale_line_id" not in procurement.values or not
- procurement.values.get("sale_line_id", False)):
+ if "sale_line_id" not in procurement.values or not procurement.values.get(
+ "sale_line_id", False
+ ):
result = super(ProcurementGroup, self).run(
- [procurement], raise_user_error=raise_user_error)
+ [procurement], raise_user_error=raise_user_error
+ )
else:
- result = super(ProcurementGroup, self.with_context(
- sale_line_id=procurement.values.get("sale_line_id"))).run(
- [procurement], raise_user_error=raise_user_error)
+ result = super(
+ ProcurementGroup,
+ self.with_context(
+ sale_line_id=procurement.values.get("sale_line_id")
+ ),
+ ).run([procurement], raise_user_error=raise_user_error)
return result
diff --git a/sale_line_mrp_link/models/sale_order_line.py b/sale_line_mrp_link/models/sale_order_line.py
index df3e882a7..9a15a0a07 100644
--- a/sale_line_mrp_link/models/sale_order_line.py
+++ b/sale_line_mrp_link/models/sale_order_line.py
@@ -7,4 +7,7 @@ class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
mrp_production_id = fields.Many2one(
- string="MRP Production", comodel_name="mrp.production", copy=False)
+ string="MRP Production",
+ comodel_name="mrp.production",
+ copy=False,
+ )
diff --git a/sale_line_mrp_link/views/mrp_production_views.xml b/sale_line_mrp_link/views/mrp_production_views.xml
index e54809d41..0c67a82ca 100644
--- a/sale_line_mrp_link/views/mrp_production_views.xml
+++ b/sale_line_mrp_link/views/mrp_production_views.xml
@@ -1,34 +1,34 @@
-
+
mrp.production
-
+
-
-
-
+
+
+
mrp.production
-
+
-
+
-
+
-
+
@@ -37,7 +37,7 @@
mrp.production
-
+
@@ -45,8 +45,12 @@
-
+
diff --git a/sale_line_mrp_link/views/sale_order_line_views.xml b/sale_line_mrp_link/views/sale_order_line_views.xml
index b9e670ebb..c966a2510 100644
--- a/sale_line_mrp_link/views/sale_order_line_views.xml
+++ b/sale_line_mrp_link/views/sale_order_line_views.xml
@@ -1,18 +1,18 @@
-
+
sale.order.line
-
+
-
+
sale.order.line
-
+
diff --git a/sale_line_mrp_link/views/sale_order_views.xml b/sale_line_mrp_link/views/sale_order_views.xml
index 5dea74a58..3ca911581 100644
--- a/sale_line_mrp_link/views/sale_order_views.xml
+++ b/sale_line_mrp_link/views/sale_order_views.xml
@@ -1,11 +1,14 @@
-
+
sale.order
-
+
-
-
+
+
diff --git a/setup/custom_mrp_descarga/odoo/addons/custom_mrp_descarga b/setup/custom_mrp_descarga/odoo/addons/custom_mrp_descarga
new file mode 120000
index 000000000..65aa516d3
--- /dev/null
+++ b/setup/custom_mrp_descarga/odoo/addons/custom_mrp_descarga
@@ -0,0 +1 @@
+../../../../custom_mrp_descarga
\ No newline at end of file
diff --git a/setup/custom_mrp_descarga/setup.py b/setup/custom_mrp_descarga/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/custom_mrp_descarga/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/custom_mrp_line_cost/odoo/addons/custom_mrp_line_cost b/setup/custom_mrp_line_cost/odoo/addons/custom_mrp_line_cost
new file mode 120000
index 000000000..96acccadb
--- /dev/null
+++ b/setup/custom_mrp_line_cost/odoo/addons/custom_mrp_line_cost
@@ -0,0 +1 @@
+../../../../custom_mrp_line_cost
\ No newline at end of file
diff --git a/setup/custom_mrp_line_cost/setup.py b/setup/custom_mrp_line_cost/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/custom_mrp_line_cost/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_bom_category/odoo/addons/mrp_bom_category b/setup/mrp_bom_category/odoo/addons/mrp_bom_category
new file mode 120000
index 000000000..862977e0e
--- /dev/null
+++ b/setup/mrp_bom_category/odoo/addons/mrp_bom_category
@@ -0,0 +1 @@
+../../../../mrp_bom_category
\ No newline at end of file
diff --git a/setup/mrp_bom_category/setup.py b/setup/mrp_bom_category/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_bom_category/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_bom_import_position/odoo/addons/mrp_bom_import_position b/setup/mrp_bom_import_position/odoo/addons/mrp_bom_import_position
new file mode 120000
index 000000000..55c20247c
--- /dev/null
+++ b/setup/mrp_bom_import_position/odoo/addons/mrp_bom_import_position
@@ -0,0 +1 @@
+../../../../mrp_bom_import_position
\ No newline at end of file
diff --git a/setup/mrp_bom_import_position/setup.py b/setup/mrp_bom_import_position/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_bom_import_position/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_bom_line_coef/odoo/addons/mrp_bom_line_coef b/setup/mrp_bom_line_coef/odoo/addons/mrp_bom_line_coef
new file mode 120000
index 000000000..37168b735
--- /dev/null
+++ b/setup/mrp_bom_line_coef/odoo/addons/mrp_bom_line_coef
@@ -0,0 +1 @@
+../../../../mrp_bom_line_coef
\ No newline at end of file
diff --git a/setup/mrp_bom_line_coef/setup.py b/setup/mrp_bom_line_coef/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_bom_line_coef/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_bom_line_note/odoo/addons/mrp_bom_line_note b/setup/mrp_bom_line_note/odoo/addons/mrp_bom_line_note
new file mode 120000
index 000000000..6ef490478
--- /dev/null
+++ b/setup/mrp_bom_line_note/odoo/addons/mrp_bom_line_note
@@ -0,0 +1 @@
+../../../../mrp_bom_line_note
\ No newline at end of file
diff --git a/setup/mrp_bom_line_note/setup.py b/setup/mrp_bom_line_note/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_bom_line_note/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_bom_price_and_qty/odoo/addons/mrp_bom_price_and_qty b/setup/mrp_bom_price_and_qty/odoo/addons/mrp_bom_price_and_qty
new file mode 120000
index 000000000..347d488e1
--- /dev/null
+++ b/setup/mrp_bom_price_and_qty/odoo/addons/mrp_bom_price_and_qty
@@ -0,0 +1 @@
+../../../../mrp_bom_price_and_qty
\ No newline at end of file
diff --git a/setup/mrp_bom_price_and_qty/setup.py b/setup/mrp_bom_price_and_qty/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_bom_price_and_qty/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_bom_reference/odoo/addons/mrp_bom_reference b/setup/mrp_bom_reference/odoo/addons/mrp_bom_reference
new file mode 120000
index 000000000..449badd64
--- /dev/null
+++ b/setup/mrp_bom_reference/odoo/addons/mrp_bom_reference
@@ -0,0 +1 @@
+../../../../mrp_bom_reference
\ No newline at end of file
diff --git a/setup/mrp_bom_reference/setup.py b/setup/mrp_bom_reference/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_bom_reference/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_bom_report_group/odoo/addons/mrp_bom_report_group b/setup/mrp_bom_report_group/odoo/addons/mrp_bom_report_group
new file mode 120000
index 000000000..4708f692c
--- /dev/null
+++ b/setup/mrp_bom_report_group/odoo/addons/mrp_bom_report_group
@@ -0,0 +1 @@
+../../../../mrp_bom_report_group
\ No newline at end of file
diff --git a/setup/mrp_bom_report_group/setup.py b/setup/mrp_bom_report_group/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_bom_report_group/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_cut/odoo/addons/mrp_cut b/setup/mrp_cut/odoo/addons/mrp_cut
new file mode 120000
index 000000000..74a7cc7fe
--- /dev/null
+++ b/setup/mrp_cut/odoo/addons/mrp_cut
@@ -0,0 +1 @@
+../../../../mrp_cut
\ No newline at end of file
diff --git a/setup/mrp_cut/setup.py b/setup/mrp_cut/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_cut/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_manual_sale_info/odoo/addons/mrp_manual_sale_info b/setup/mrp_manual_sale_info/odoo/addons/mrp_manual_sale_info
new file mode 120000
index 000000000..8f0d4cbae
--- /dev/null
+++ b/setup/mrp_manual_sale_info/odoo/addons/mrp_manual_sale_info
@@ -0,0 +1 @@
+../../../../mrp_manual_sale_info
\ No newline at end of file
diff --git a/setup/mrp_manual_sale_info/setup.py b/setup/mrp_manual_sale_info/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_manual_sale_info/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_product_template_lineal/odoo/addons/mrp_product_template_lineal b/setup/mrp_product_template_lineal/odoo/addons/mrp_product_template_lineal
new file mode 120000
index 000000000..e2781d833
--- /dev/null
+++ b/setup/mrp_product_template_lineal/odoo/addons/mrp_product_template_lineal
@@ -0,0 +1 @@
+../../../../mrp_product_template_lineal
\ No newline at end of file
diff --git a/setup/mrp_product_template_lineal/setup.py b/setup/mrp_product_template_lineal/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_product_template_lineal/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_product_version_to_bom/odoo/addons/mrp_product_version_to_bom b/setup/mrp_product_version_to_bom/odoo/addons/mrp_product_version_to_bom
new file mode 120000
index 000000000..74e871d1c
--- /dev/null
+++ b/setup/mrp_product_version_to_bom/odoo/addons/mrp_product_version_to_bom
@@ -0,0 +1 @@
+../../../../mrp_product_version_to_bom
\ No newline at end of file
diff --git a/setup/mrp_product_version_to_bom/setup.py b/setup/mrp_product_version_to_bom/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_product_version_to_bom/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_production_cost/odoo/addons/mrp_production_cost b/setup/mrp_production_cost/odoo/addons/mrp_production_cost
new file mode 120000
index 000000000..163f7ef00
--- /dev/null
+++ b/setup/mrp_production_cost/odoo/addons/mrp_production_cost
@@ -0,0 +1 @@
+../../../../mrp_production_cost
\ No newline at end of file
diff --git a/setup/mrp_production_cost/setup.py b/setup/mrp_production_cost/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_production_cost/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_production_deconstruction/odoo/addons/mrp_production_deconstruction b/setup/mrp_production_deconstruction/odoo/addons/mrp_production_deconstruction
new file mode 120000
index 000000000..fc7692cfb
--- /dev/null
+++ b/setup/mrp_production_deconstruction/odoo/addons/mrp_production_deconstruction
@@ -0,0 +1 @@
+../../../../mrp_production_deconstruction
\ No newline at end of file
diff --git a/setup/mrp_production_deconstruction/setup.py b/setup/mrp_production_deconstruction/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_production_deconstruction/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_production_extend_origin/odoo/addons/mrp_production_extend_origin b/setup/mrp_production_extend_origin/odoo/addons/mrp_production_extend_origin
new file mode 120000
index 000000000..643911310
--- /dev/null
+++ b/setup/mrp_production_extend_origin/odoo/addons/mrp_production_extend_origin
@@ -0,0 +1 @@
+../../../../mrp_production_extend_origin
\ No newline at end of file
diff --git a/setup/mrp_production_extend_origin/setup.py b/setup/mrp_production_extend_origin/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_production_extend_origin/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_production_quality_operator/odoo/addons/mrp_production_quality_operator b/setup/mrp_production_quality_operator/odoo/addons/mrp_production_quality_operator
new file mode 120000
index 000000000..ce9a5b937
--- /dev/null
+++ b/setup/mrp_production_quality_operator/odoo/addons/mrp_production_quality_operator
@@ -0,0 +1 @@
+../../../../mrp_production_quality_operator
\ No newline at end of file
diff --git a/setup/mrp_production_quality_operator/setup.py b/setup/mrp_production_quality_operator/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_production_quality_operator/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_production_show_button_unreserve/odoo/addons/mrp_production_show_button_unreserve b/setup/mrp_production_show_button_unreserve/odoo/addons/mrp_production_show_button_unreserve
new file mode 120000
index 000000000..4849f38d1
--- /dev/null
+++ b/setup/mrp_production_show_button_unreserve/odoo/addons/mrp_production_show_button_unreserve
@@ -0,0 +1 @@
+../../../../mrp_production_show_button_unreserve
\ No newline at end of file
diff --git a/setup/mrp_production_show_button_unreserve/setup.py b/setup/mrp_production_show_button_unreserve/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_production_show_button_unreserve/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_production_split_by_serials/odoo/addons/mrp_production_split_by_serials b/setup/mrp_production_split_by_serials/odoo/addons/mrp_production_split_by_serials
new file mode 120000
index 000000000..e668764c5
--- /dev/null
+++ b/setup/mrp_production_split_by_serials/odoo/addons/mrp_production_split_by_serials
@@ -0,0 +1 @@
+../../../../mrp_production_split_by_serials
\ No newline at end of file
diff --git a/setup/mrp_production_split_by_serials/setup.py b/setup/mrp_production_split_by_serials/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_production_split_by_serials/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_routing_workcenter_capacity/odoo/addons/mrp_routing_workcenter_capacity b/setup/mrp_routing_workcenter_capacity/odoo/addons/mrp_routing_workcenter_capacity
new file mode 120000
index 000000000..6530dde83
--- /dev/null
+++ b/setup/mrp_routing_workcenter_capacity/odoo/addons/mrp_routing_workcenter_capacity
@@ -0,0 +1 @@
+../../../../mrp_routing_workcenter_capacity
\ No newline at end of file
diff --git a/setup/mrp_routing_workcenter_capacity/setup.py b/setup/mrp_routing_workcenter_capacity/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_routing_workcenter_capacity/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_second_uom/odoo/addons/mrp_second_uom b/setup/mrp_second_uom/odoo/addons/mrp_second_uom
new file mode 120000
index 000000000..2a57db7c8
--- /dev/null
+++ b/setup/mrp_second_uom/odoo/addons/mrp_second_uom
@@ -0,0 +1 @@
+../../../../mrp_second_uom
\ No newline at end of file
diff --git a/setup/mrp_second_uom/setup.py b/setup/mrp_second_uom/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_second_uom/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_stock_picking_create_repair/odoo/addons/mrp_stock_picking_create_repair b/setup/mrp_stock_picking_create_repair/odoo/addons/mrp_stock_picking_create_repair
new file mode 120000
index 000000000..55d020ef1
--- /dev/null
+++ b/setup/mrp_stock_picking_create_repair/odoo/addons/mrp_stock_picking_create_repair
@@ -0,0 +1 @@
+../../../../mrp_stock_picking_create_repair
\ No newline at end of file
diff --git a/setup/mrp_stock_picking_create_repair/setup.py b/setup/mrp_stock_picking_create_repair/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_stock_picking_create_repair/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_workcenter_productivity_loss/odoo/addons/mrp_workcenter_productivity_loss b/setup/mrp_workcenter_productivity_loss/odoo/addons/mrp_workcenter_productivity_loss
new file mode 120000
index 000000000..640eda434
--- /dev/null
+++ b/setup/mrp_workcenter_productivity_loss/odoo/addons/mrp_workcenter_productivity_loss
@@ -0,0 +1 @@
+../../../../mrp_workcenter_productivity_loss
\ No newline at end of file
diff --git a/setup/mrp_workcenter_productivity_loss/setup.py b/setup/mrp_workcenter_productivity_loss/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_workcenter_productivity_loss/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_workorder_availability/odoo/addons/mrp_workorder_availability b/setup/mrp_workorder_availability/odoo/addons/mrp_workorder_availability
new file mode 120000
index 000000000..861970b31
--- /dev/null
+++ b/setup/mrp_workorder_availability/odoo/addons/mrp_workorder_availability
@@ -0,0 +1 @@
+../../../../mrp_workorder_availability
\ No newline at end of file
diff --git a/setup/mrp_workorder_availability/setup.py b/setup/mrp_workorder_availability/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_workorder_availability/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_workorder_extra_time/odoo/addons/mrp_workorder_extra_time b/setup/mrp_workorder_extra_time/odoo/addons/mrp_workorder_extra_time
new file mode 120000
index 000000000..fced47756
--- /dev/null
+++ b/setup/mrp_workorder_extra_time/odoo/addons/mrp_workorder_extra_time
@@ -0,0 +1 @@
+../../../../mrp_workorder_extra_time
\ No newline at end of file
diff --git a/setup/mrp_workorder_extra_time/setup.py b/setup/mrp_workorder_extra_time/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_workorder_extra_time/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_workorder_permission/odoo/addons/mrp_workorder_permission b/setup/mrp_workorder_permission/odoo/addons/mrp_workorder_permission
new file mode 120000
index 000000000..5f94ffde6
--- /dev/null
+++ b/setup/mrp_workorder_permission/odoo/addons/mrp_workorder_permission
@@ -0,0 +1 @@
+../../../../mrp_workorder_permission
\ No newline at end of file
diff --git a/setup/mrp_workorder_permission/setup.py b/setup/mrp_workorder_permission/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_workorder_permission/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_workorder_product_variant/odoo/addons/mrp_workorder_product_variant b/setup/mrp_workorder_product_variant/odoo/addons/mrp_workorder_product_variant
new file mode 120000
index 000000000..154e6f950
--- /dev/null
+++ b/setup/mrp_workorder_product_variant/odoo/addons/mrp_workorder_product_variant
@@ -0,0 +1 @@
+../../../../mrp_workorder_product_variant
\ No newline at end of file
diff --git a/setup/mrp_workorder_product_variant/setup.py b/setup/mrp_workorder_product_variant/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_workorder_product_variant/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/mrp_workorder_time_plate/odoo/addons/mrp_workorder_time_plate b/setup/mrp_workorder_time_plate/odoo/addons/mrp_workorder_time_plate
new file mode 120000
index 000000000..dcd65eebd
--- /dev/null
+++ b/setup/mrp_workorder_time_plate/odoo/addons/mrp_workorder_time_plate
@@ -0,0 +1 @@
+../../../../mrp_workorder_time_plate
\ No newline at end of file
diff --git a/setup/mrp_workorder_time_plate/setup.py b/setup/mrp_workorder_time_plate/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/mrp_workorder_time_plate/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/quality_control_claim/odoo/addons/quality_control_claim b/setup/quality_control_claim/odoo/addons/quality_control_claim
new file mode 120000
index 000000000..f9d8077e3
--- /dev/null
+++ b/setup/quality_control_claim/odoo/addons/quality_control_claim
@@ -0,0 +1 @@
+../../../../quality_control_claim
\ No newline at end of file
diff --git a/setup/quality_control_claim/setup.py b/setup/quality_control_claim/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/quality_control_claim/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/quality_control_test_method/odoo/addons/quality_control_test_method b/setup/quality_control_test_method/odoo/addons/quality_control_test_method
new file mode 120000
index 000000000..049103c33
--- /dev/null
+++ b/setup/quality_control_test_method/odoo/addons/quality_control_test_method
@@ -0,0 +1 @@
+../../../../quality_control_test_method
\ No newline at end of file
diff --git a/setup/quality_control_test_method/setup.py b/setup/quality_control_test_method/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/quality_control_test_method/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/quality_control_usability/odoo/addons/quality_control_usability b/setup/quality_control_usability/odoo/addons/quality_control_usability
new file mode 120000
index 000000000..f782d3b1d
--- /dev/null
+++ b/setup/quality_control_usability/odoo/addons/quality_control_usability
@@ -0,0 +1 @@
+../../../../quality_control_usability
\ No newline at end of file
diff --git a/setup/quality_control_usability/setup.py b/setup/quality_control_usability/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/quality_control_usability/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/sale_line_mrp_link/odoo/addons/sale_line_mrp_link b/setup/sale_line_mrp_link/odoo/addons/sale_line_mrp_link
new file mode 120000
index 000000000..01f122909
--- /dev/null
+++ b/setup/sale_line_mrp_link/odoo/addons/sale_line_mrp_link
@@ -0,0 +1 @@
+../../../../sale_line_mrp_link
\ No newline at end of file
diff --git a/setup/sale_line_mrp_link/setup.py b/setup/sale_line_mrp_link/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/sale_line_mrp_link/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
|