-
+
+
+
+
+
+
+
+
diff --git a/ddmrp_mrp_production_request/README.rst b/ddmrp_mrp_production_request/README.rst
index be24759ea..7d0408165 100644
--- a/ddmrp_mrp_production_request/README.rst
+++ b/ddmrp_mrp_production_request/README.rst
@@ -8,17 +8,24 @@ DDMRP Manufacturing Request
Allows to prioritize Manufacturing Requests in a DDMRP strategy.
-Configuration
-=============
-
-WIP
-
Usage
=====
-To use this module, you need to:
+To use this module go to *Manufacturing > Manufacturing Requests*. Find the
+following changes:
+
+* *Buffer On-Hand Alert Level* and *On Hand/TOR (%)* are shown in the tree
+ view.
+* New filters for the different executions alerts (Red, Yellow, Green) are
+ available.
+
+Bug Tracker
+===========
-#. WIP
+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 smashing it by providing a detailed and welcomed feedback.
Credits
=======
@@ -26,5 +33,5 @@ Credits
Contributors
------------
-* Lois Rilo
+* Lois Rilo
* Jordi Ballester
diff --git a/ddmrp_mrp_production_request/__init__.py b/ddmrp_mrp_production_request/__init__.py
index 7201c0805..84830dc8e 100644
--- a/ddmrp_mrp_production_request/__init__.py
+++ b/ddmrp_mrp_production_request/__init__.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
+from . import wizards
diff --git a/ddmrp_mrp_production_request/__openerp__.py b/ddmrp_mrp_production_request/__manifest__.py
similarity index 82%
rename from ddmrp_mrp_production_request/__openerp__.py
rename to ddmrp_mrp_production_request/__manifest__.py
index 893fef66f..a7464648f 100644
--- a/ddmrp_mrp_production_request/__openerp__.py
+++ b/ddmrp_mrp_production_request/__manifest__.py
@@ -1,14 +1,15 @@
# -*- coding: utf-8 -*-
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017-18 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
{
"name": "DDMRP Manufacturing Request",
"summary": "Allows to prioritize Manufacturing Requests in a DDMRP "
"strategy.",
- "version": "9.0.1.0.0",
+ "version": "10.0.1.0.0",
"category": "Manufacturing",
"website": "https://github.com/OCA/manufacture",
- "author": "Eficent,"
+ "author": "Eficent, "
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
diff --git a/ddmrp_mrp_production_request/models/__init__.py b/ddmrp_mrp_production_request/models/__init__.py
index 68a7ab536..00bd67f01 100644
--- a/ddmrp_mrp_production_request/models/__init__.py
+++ b/ddmrp_mrp_production_request/models/__init__.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import mrp_production_request
from . import mrp_production
+from . import procurement_order
+from . import stock_warehouse_orderpoint
diff --git a/ddmrp_mrp_production_request/models/mrp_production.py b/ddmrp_mrp_production_request/models/mrp_production.py
index 308bfe6e5..8412f15fd 100644
--- a/ddmrp_mrp_production_request/models/mrp_production.py
+++ b/ddmrp_mrp_production_request/models/mrp_production.py
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017-18 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from openerp import api, fields, models
+from odoo import api, models
class MrpProduction(models.Model):
_inherit = 'mrp.production'
@api.multi
- @api.depends('move_prod_id', 'mrp_production_request_id')
+ @api.depends('move_finished_ids', 'mrp_production_request_id')
def _compute_orderpoint_id(self):
from_request = self.filtered(lambda mo: mo.mrp_production_request_id)
super(MrpProduction, self - from_request)._compute_orderpoint_id()
diff --git a/ddmrp_mrp_production_request/models/mrp_production_request.py b/ddmrp_mrp_production_request/models/mrp_production_request.py
index 5948e96bf..e16f97c75 100644
--- a/ddmrp_mrp_production_request/models/mrp_production_request.py
+++ b/ddmrp_mrp_production_request/models/mrp_production_request.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# Copyright 2017-18 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from openerp import api, fields, models
+from odoo import api, fields, models
_PRIORITY_LEVEL = [
('1_red', 'Red'),
@@ -44,48 +44,26 @@ def _compute_orderpoint_id(self):
break
@api.multi
- @api.depends("orderpoint_id")
- def _compute_execution_priority(self):
- for rec in self.filtered(lambda r: r.orderpoint_id):
- if rec.state in ['done', 'cancel']:
- rec.execution_priority_level = None
- rec.on_hand_percent = None
- else:
- rec.execution_priority_level = \
- rec.orderpoint_id.execution_priority_level
- rec.on_hand_percent = rec.orderpoint_id.on_hand_percent
-
- def _search_execution_priority(self, operator, value):
- """Search on the execution priority by evaluating on all
- open manufacturing orders."""
- all_records = self.search([('state', 'not in', ['done', 'cancel'])])
- if operator == '=':
- found_ids = [a.id for a in all_records
- if a.execution_priority_level == value]
- elif operator == 'in' and isinstance(value, list):
- found_ids = [a.id for a in all_records
- if a.execution_priority_level in value]
- elif operator in ("!=", "<>"):
- found_ids = [a.id for a in all_records
- if a.execution_priority_level != value]
- elif operator == 'not in' and isinstance(value, list):
- found_ids = [a.id for a in all_records
- if a.execution_priority_level not in value]
- else:
- raise NotImplementedError(
- 'Search operator %s not implemented for value %s'
- % (operator, value)
- )
- return [('id', 'in', found_ids)]
-
+ def _calc_execution_priority(self):
+ prods = self.filtered(
+ lambda r: r.orderpoint_id and r.state not in ['done', 'cancel'])
+ for rec in prods:
+ rec.execution_priority_level = \
+ rec.orderpoint_id.execution_priority_level
+ rec.on_hand_percent = rec.orderpoint_id.on_hand_percent
+ (self - prods).write({
+ 'execution_priority_level': None,
+ 'on_hand_percent': None,
+ })
orderpoint_id = fields.Many2one(
comodel_name='stock.warehouse.orderpoint', store=True, index=True,
- string="Reordering rule", compute='_compute_orderpoint_id')
+ string="Reordering rule", compute='_compute_orderpoint_id',
+ )
execution_priority_level = fields.Selection(
string="Buffer On-Hand Alert Level", selection=_PRIORITY_LEVEL,
- compute="_compute_execution_priority",
- search="_search_execution_priority", store=True)
+ readonly=True,
+ )
on_hand_percent = fields.Float(
- string="On Hand/TOG (%)", compute="_compute_execution_priority",
- store=True)
+ string="On Hand/TOR (%)",
+ )
diff --git a/ddmrp_mrp_production_request/models/procurement_order.py b/ddmrp_mrp_production_request/models/procurement_order.py
new file mode 100644
index 000000000..ec82e9e31
--- /dev/null
+++ b/ddmrp_mrp_production_request/models/procurement_order.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017-18 Eficent Business and IT Consulting Services S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import api, models
+
+
+class ProcurementOrder(models.Model):
+ _inherit = 'procurement.order'
+
+ @api.multi
+ def write(self, vals):
+ """Needed to calculate the execution priority of MOs originated from
+ a DDMRP buffer just after the creation."""
+ res = super(ProcurementOrder, self).write(vals)
+ mr_id = vals.get('mrp_production_request_id')
+ if mr_id:
+ self.env['mrp.production.request'].browse(
+ mr_id)._calc_execution_priority()
+ return res
diff --git a/ddmrp_mrp_production_request/models/stock_warehouse_orderpoint.py b/ddmrp_mrp_production_request/models/stock_warehouse_orderpoint.py
index a47cf1374..ee0175774 100644
--- a/ddmrp_mrp_production_request/models/stock_warehouse_orderpoint.py
+++ b/ddmrp_mrp_production_request/models/stock_warehouse_orderpoint.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-# Copyright 2017 Eficent Business and IT Consulting Services S.L.
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+# Copyright 2017-18 Eficent Business and IT Consulting Services S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from openerp import api, fields, models
+from odoo import api, fields, models
class StockWarehouseOrderpoint(models.Model):
@@ -10,10 +10,11 @@ class StockWarehouseOrderpoint(models.Model):
mrp_production_request_ids = fields.One2many(
string='Manufacturing Requests', comodel_name='mrp.production.request',
- inverse_name='orderpoint_id')
+ inverse_name='orderpoint_id',
+ )
@api.multi
def cron_actions(self):
res = super(StockWarehouseOrderpoint, self).cron_actions()
- self.mrp_production_request_ids._compute_execution_priority()
+ self.mrp_production_request_ids._calc_execution_priority()
return res
diff --git a/ddmrp_mrp_production_request/static/description/icon.png b/ddmrp_mrp_production_request/static/description/icon.png
new file mode 100644
index 000000000..a0b0ed73a
Binary files /dev/null and b/ddmrp_mrp_production_request/static/description/icon.png differ
diff --git a/ddmrp_mrp_production_request/views/mrp_production_request_view.xml b/ddmrp_mrp_production_request/views/mrp_production_request_view.xml
index 72a20ef80..79cba7c63 100644
--- a/ddmrp_mrp_production_request/views/mrp_production_request_view.xml
+++ b/ddmrp_mrp_production_request/views/mrp_production_request_view.xml
@@ -44,5 +44,4 @@
-
diff --git a/stock_warehouse_orderpoint_stock_info_unreserved/__init__.py b/ddmrp_mrp_production_request/wizards/__init__.py
similarity index 50%
rename from stock_warehouse_orderpoint_stock_info_unreserved/__init__.py
rename to ddmrp_mrp_production_request/wizards/__init__.py
index f3ca9f7be..247bc71ec 100644
--- a/stock_warehouse_orderpoint_stock_info_unreserved/__init__.py
+++ b/ddmrp_mrp_production_request/wizards/__init__.py
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from . import models
+from . import mrp_production_request_create_mo
diff --git a/ddmrp_mrp_production_request/wizards/mrp_production_request_create_mo.py b/ddmrp_mrp_production_request/wizards/mrp_production_request_create_mo.py
new file mode 100644
index 000000000..52bacfe30
--- /dev/null
+++ b/ddmrp_mrp_production_request/wizards/mrp_production_request_create_mo.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+# Copyright 2018 Eficent Business and IT Consulting Services S.L.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import api, models
+
+
+class MrpProductionRequestCreateMo(models.TransientModel):
+ _inherit = "mrp.production.request.create.mo"
+
+ @api.multi
+ def _prepare_manufacturing_order(self):
+ res = super(
+ MrpProductionRequestCreateMo, self)._prepare_manufacturing_order()
+ request_id = self.mrp_production_request_id
+ if request_id.orderpoint_id:
+ res['orderpoint_id'] = request_id.orderpoint_id.id
+ res['execution_priority_level'] = \
+ request_id.orderpoint_id.execution_priority_level
+ res['on_hand_percent'] = \
+ request_id.orderpoint_id.on_hand_percent
+ return res
diff --git a/ddmrp_product_replace/README.rst b/ddmrp_product_replace/README.rst
new file mode 100644
index 000000000..f8ef71dd6
--- /dev/null
+++ b/ddmrp_product_replace/README.rst
@@ -0,0 +1,41 @@
+.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
+ :alt: License AGPL-3
+
+=====================
+DDMRP Product Replace
+=====================
+
+Provides a tool for product replacement.
+
+Usage
+=====
+
+Go to *Inventory > Configuration > DDMRP > Product Replacement Tool*.
+
+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 smashing it by providing a detailed and welcomed feedback.
+
+Roadmap
+=======
+
+* Option to create new buffer and make old ones inactive.
+* Consider Demand estimates in the replacement.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Lois Rilo
+* Jordi Ballester
+
+Maintainer
+----------
+
+This module is maintained by the Eficent.
diff --git a/mrp_production_service/__init__.py b/ddmrp_product_replace/__init__.py
similarity index 54%
rename from mrp_production_service/__init__.py
rename to ddmrp_product_replace/__init__.py
index 08f93b3a4..fbe944470 100644
--- a/mrp_production_service/__init__.py
+++ b/ddmrp_product_replace/__init__.py
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models
+from . import wizards
diff --git a/ddmrp_product_replace/__manifest__.py b/ddmrp_product_replace/__manifest__.py
new file mode 100644
index 000000000..153a844ab
--- /dev/null
+++ b/ddmrp_product_replace/__manifest__.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017-18 Eficent Business and IT Consulting Services S.L.
+# (http://www.eficent.com)
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
+{
+ "name": "DDMRP Product Replace",
+ "summary": "Provides a assisting tool for product replacement.",
+ "version": "10.0.1.0.0",
+ "author": "Eficent",
+ "website": "http://www.eficent.com",
+ "category": "Warehouse Management",
+ "depends": [
+ "ddmrp",
+ "stock_putaway_product",
+ ],
+ "data": [
+ "wizards/ddmrp_product_replace_view.xml",
+ ],
+ "license": "AGPL-3",
+ 'installable': True,
+}
diff --git a/ddmrp_product_replace/models/__init__.py b/ddmrp_product_replace/models/__init__.py
new file mode 100644
index 000000000..6654fecb0
--- /dev/null
+++ b/ddmrp_product_replace/models/__init__.py
@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
+from . import stock_warehouse_orderpoint
diff --git a/ddmrp_product_replace/models/stock_warehouse_orderpoint.py b/ddmrp_product_replace/models/stock_warehouse_orderpoint.py
new file mode 100644
index 000000000..f0a29645e
--- /dev/null
+++ b/ddmrp_product_replace/models/stock_warehouse_orderpoint.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# (http://www.eficent.com)
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
+
+from odoo import api, fields, models
+
+
+class StockWarehouseOrderpoint(models.Model):
+ _inherit = 'stock.warehouse.orderpoint'
+
+ demand_product_ids = fields.Many2many(
+ comodel_name="product.product", string="Considered As Demand",
+ help="This field is used for a correct product replacement within a "
+ "DDMRP buffer.", readonly=True,
+ )
+
+ @api.multi
+ def _past_moves_domain(self, date_from, locations):
+ if not self.demand_product_ids:
+ return super(StockWarehouseOrderpoint, self)._past_moves_domain(
+ date_from, locations)
+ return [('state', '=', 'done'), ('location_id', 'in', locations.ids),
+ ('location_dest_id', 'not in', locations.ids),
+ ('product_id', 'in', self.demand_product_ids.ids),
+ ('date', '>=', date_from)]
diff --git a/ddmrp_product_replace/static/description/icon.png b/ddmrp_product_replace/static/description/icon.png
new file mode 100644
index 000000000..a0b0ed73a
Binary files /dev/null and b/ddmrp_product_replace/static/description/icon.png differ
diff --git a/ddmrp_product_replace/wizards/__init__.py b/ddmrp_product_replace/wizards/__init__.py
new file mode 100644
index 000000000..9a50a45a1
--- /dev/null
+++ b/ddmrp_product_replace/wizards/__init__.py
@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
+from . import ddmrp_product_replace
diff --git a/ddmrp_product_replace/wizards/ddmrp_product_replace.py b/ddmrp_product_replace/wizards/ddmrp_product_replace.py
new file mode 100644
index 000000000..2247b065a
--- /dev/null
+++ b/ddmrp_product_replace/wizards/ddmrp_product_replace.py
@@ -0,0 +1,95 @@
+# -*- coding: utf-8 -*-
+# Copyright 2017 Eficent Business and IT Consulting Services S.L.
+# (http://www.eficent.com)
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
+from odoo import api, fields, models, _
+
+
+class DdmrpProductReplace(models.TransientModel):
+ _name = "ddmrp.product.replace"
+
+ @api.multi
+ @api.depends("old_product_id")
+ def _compute_orderpoint_ids(self):
+ for rec in self:
+ rec.orderpoint_ids = self.env['stock.warehouse.orderpoint'].search(
+ [('product_id', '=', rec.old_product_id.id)])
+
+ old_product_id = fields.Many2one(
+ comodel_name="product.product", string="Replaced Product",
+ help="Product to be replaced.", required=True, ondelete="cascade",
+ )
+ orderpoint_ids = fields.Many2many(
+ comodel_name="stock.warehouse.orderpoint",
+ string="Affected Buffers",
+ readonly=True, compute="_compute_orderpoint_ids",
+ )
+ new_product_id = fields.Many2one(
+ comodel_name="product.product", string="Substitute Product",
+ help="Product that is going to replace the other one.",
+ )
+ use_existing = fields.Selection(
+ string="Use Existing/New Product", required=True,
+ selection=[("existing", "Use Existing Product"),
+ ("new", "Create New Product")],
+ )
+ new_product_name = fields.Char(string="New Product Name")
+ new_product_default_code = fields.Char(string="New Product Internal Ref.")
+ copy_route = fields.Boolean(string="Copy Routes")
+ copy_putaway = fields.Boolean(string="Copy Put Away Strategy")
+ consider_past_demand = fields.Boolean(
+ string="Consider Old Product Demand",
+ help="Consider Old product moves as demand for new product",
+ default=True,
+ )
+
+ @api.multi
+ def button_validate(self):
+ self.ensure_one()
+ if self.use_existing == 'new':
+ default = dict(
+ name=self.new_product_name,
+ default_code=self.new_product_default_code,
+ )
+ if not self.copy_route:
+ default['route_ids'] = None
+ if (self.copy_putaway and (
+ self.old_product_id.product_putaway_ids or
+ self.old_product_id.product_tmpl_id.product_putaway_ids)):
+ default['product_putaway_ids'] = [
+ (6, 0, self.old_product_id.product_putaway_ids.ids or
+ self.old_product_id.product_tmpl_id.
+ product_putaway_ids.ids)]
+ self.new_product_id = self.old_product_id.copy(
+ default=default)
+ elif self.use_existing == 'existing':
+ if self.copy_route:
+ self.new_product_id.write({
+ 'route_ids': [(6, 0, self.old_product_id.route_ids.ids)],
+ })
+ if (self.copy_putaway and (
+ self.old_product_id.product_putaway_ids or
+ self.old_product_id.product_tmpl_id.product_putaway_ids)):
+ self.new_product_id.write({
+ 'product_putaway_ids': [
+ (6, 0, self.old_product_id.product_putaway_ids.ids or
+ self.old_product_id.product_tmpl_id.
+ product_putaway_ids.ids)],
+ })
+ if self.orderpoint_ids:
+ vals = {
+ 'product_id': self.new_product_id.id,
+ }
+ if self.consider_past_demand:
+ vals['demand_product_ids'] = [
+ (6, 0, (self.old_product_id + self.new_product_id).ids)]
+ self.orderpoint_ids.write(vals)
+ return {
+ 'name': _('Replacing Product'),
+ 'res_id': self.new_product_id.id,
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'product.product',
+ 'type': 'ir.actions.act_window'
+ }
diff --git a/ddmrp_product_replace/wizards/ddmrp_product_replace_view.xml b/ddmrp_product_replace/wizards/ddmrp_product_replace_view.xml
new file mode 100644
index 000000000..6a7d3703e
--- /dev/null
+++ b/ddmrp_product_replace/wizards/ddmrp_product_replace_view.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+ ddmrp.product.replace.form
+ ddmrp.product.replace
+
+
+
+
+
+
+
+
+
+
diff --git a/mrp_production_service/README.rst b/mrp_production_service/README.rst
deleted file mode 100644
index 3a9d5719f..000000000
--- a/mrp_production_service/README.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-.. 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 Service
-======================
-
-Creates procurement orders from manufacturing orders, for services included
-in the Bill of Materials.
-
-This allows users to include additional services that are to be procured as
-part of the manufacturing process.
-
-
-Usage
-=====
-
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/129/8.0
-
-
-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 smashing it by providing a detailed and welcomed feedback.
-
-Credits
-=======
-
-Images
-------
-
-* Odoo Community Association: `Icon `_.
-
-Contributors
-------------
-
-* Jordi Ballester Alomar
-
-
-Maintainer
-----------
-
-.. image:: https://odoo-community.org/logo.png
- :alt: Odoo Community Association
- :target: https://odoo-community.org
-
-This module is maintained by the OCA.
-
-OCA, or the Odoo Community Association, is a nonprofit organization whose
-mission is to support the collaborative development of Odoo features and
-promote its widespread use.
-
-To contribute to this module, please visit https://odoo-community.org.
diff --git a/mrp_production_service/__openerp__.py b/mrp_production_service/__openerp__.py
deleted file mode 100644
index ecc34e8b8..000000000
--- a/mrp_production_service/__openerp__.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-{
- "name": "MRP Production Service",
- "summary": "Creates procurement orders from manufacturing orders, for "
- "services included in the Bill of Materials",
- "version": "8.0.1.0.0",
- "author": "Eficent,"
- "Odoo Community Association (OCA)",
- "website": "https://www.odoo-community.org",
- "category": "Warehouse Management",
- "depends": ["stock", "mrp", "procurement_service"],
- "license": "AGPL-3",
- 'installable': True,
- 'application': False,
-}
diff --git a/mrp_production_service/models/__init__.py b/mrp_production_service/models/__init__.py
deleted file mode 100644
index 11ef31c2a..000000000
--- a/mrp_production_service/models/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from . import mrp_production
diff --git a/mrp_production_service/models/mrp_production.py b/mrp_production_service/models/mrp_production.py
deleted file mode 100644
index 5cb95f82c..000000000
--- a/mrp_production_service/models/mrp_production.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from openerp import api, fields, models, _
-
-
-class MrpProduction(models.Model):
- _inherit = "mrp.production"
-
- @api.model
- def _prepare_service_procurement(self, line):
- location = line.production_id.location_src_id
- return {
- 'name': '%s for %s' % (line.product_id.name,
- line.production_id.name),
- 'origin': line.production_id.name,
- 'company_id': line.production_id.company_id.id,
- 'date_planned': line.production_id.date_planned,
- 'product_id': line.product_id.id,
- 'product_qty': line.product_qty,
- 'product_uom': line.product_uom.id,
- 'product_uos_qty': line.product_uos_qty,
- 'product_uos': line.product_uos.id,
- 'location_id': location.id,
- 'warehouse_id': location.get_warehouse(location)
- }
-
- @api.model
- def _create_service_procurement(self, line):
- data = self._prepare_service_procurement(line)
- return self.env['procurement.order'].create(data)
-
- @api.model
- def _make_service_procurement(self, line):
- """Override standard method"""
- if line.product_id.need_procurement():
- proc = self._create_service_procurement(line)
- proc.run()
diff --git a/mrp_production_service/static/description/icon.png b/mrp_production_service/static/description/icon.png
deleted file mode 100644
index 3a0328b51..000000000
Binary files a/mrp_production_service/static/description/icon.png and /dev/null differ
diff --git a/oca_dependencies.txt b/oca_dependencies.txt
new file mode 100644
index 000000000..90d3b69cc
--- /dev/null
+++ b/oca_dependencies.txt
@@ -0,0 +1,4 @@
+stock-logistics-warehouse
+web
+manufacture
+server-tools
diff --git a/procurement_service/models/procurement_order.py b/procurement_service/models/procurement_order.py
index 9818c2df6..64ab00aa5 100644
--- a/procurement_service/models/procurement_order.py
+++ b/procurement_service/models/procurement_order.py
@@ -3,7 +3,7 @@
# Copyright 2015 Tecnativa (http://www.tecnativa.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from openerp import models, api
+from odoo import models, api
class ProcurementOrder(models.Model):
diff --git a/procurement_service/models/product.py b/procurement_service/models/product.py
index 98b0e3218..e4a4f443d 100644
--- a/procurement_service/models/product.py
+++ b/procurement_service/models/product.py
@@ -3,7 +3,7 @@
# Copyright 2015 Tecnativa (http://www.tecnativa.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from openerp import models, api
+from odoo import models, api
class Product(models.Model):
diff --git a/procurement_service/models/sale_order.py b/procurement_service/models/sale_order.py
index 873afee37..6b4869353 100644
--- a/procurement_service/models/sale_order.py
+++ b/procurement_service/models/sale_order.py
@@ -3,7 +3,7 @@
# Copyright 2015 Tecnativa (http://www.tecnativa.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from openerp import models, api
+from odoo import models, api
class SaleOrder(models.Model):
diff --git a/setup/ddmrp/odoo/__init__.py b/setup/ddmrp/odoo/__init__.py
new file mode 100644
index 000000000..b0d643371
--- /dev/null
+++ b/setup/ddmrp/odoo/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
\ No newline at end of file
diff --git a/setup/ddmrp/odoo/addons/__init__.py b/setup/ddmrp/odoo/addons/__init__.py
new file mode 100644
index 000000000..b0d643371
--- /dev/null
+++ b/setup/ddmrp/odoo/addons/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
\ No newline at end of file
diff --git a/setup/ddmrp/odoo/addons/ddmrp b/setup/ddmrp/odoo/addons/ddmrp
new file mode 120000
index 000000000..77c88a664
--- /dev/null
+++ b/setup/ddmrp/odoo/addons/ddmrp
@@ -0,0 +1 @@
+../../../../ddmrp
\ No newline at end of file
diff --git a/setup/ddmrp/setup.py b/setup/ddmrp/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/ddmrp/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/ddmrp_adjustment/odoo/__init__.py b/setup/ddmrp_adjustment/odoo/__init__.py
new file mode 100644
index 000000000..b0d643371
--- /dev/null
+++ b/setup/ddmrp_adjustment/odoo/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
\ No newline at end of file
diff --git a/setup/ddmrp_adjustment/odoo/addons/__init__.py b/setup/ddmrp_adjustment/odoo/addons/__init__.py
new file mode 100644
index 000000000..b0d643371
--- /dev/null
+++ b/setup/ddmrp_adjustment/odoo/addons/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
\ No newline at end of file
diff --git a/setup/ddmrp_adjustment/odoo/addons/ddmrp_adjustment b/setup/ddmrp_adjustment/odoo/addons/ddmrp_adjustment
new file mode 120000
index 000000000..df63cf34a
--- /dev/null
+++ b/setup/ddmrp_adjustment/odoo/addons/ddmrp_adjustment
@@ -0,0 +1 @@
+../../../../ddmrp_adjustment/
\ No newline at end of file
diff --git a/setup/ddmrp_adjustment/setup.py b/setup/ddmrp_adjustment/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/ddmrp_adjustment/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/ddmrp_exclude_moves_adu_calc/odoo/addons/__init__.py b/setup/ddmrp_exclude_moves_adu_calc/odoo/addons/__init__.py
new file mode 100644
index 000000000..b0d643371
--- /dev/null
+++ b/setup/ddmrp_exclude_moves_adu_calc/odoo/addons/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
\ No newline at end of file
diff --git a/setup/ddmrp_exclude_moves_adu_calc/odoo/addons/ddmrp_exclude_moves_adu_calc b/setup/ddmrp_exclude_moves_adu_calc/odoo/addons/ddmrp_exclude_moves_adu_calc
new file mode 120000
index 000000000..4ee1b8482
--- /dev/null
+++ b/setup/ddmrp_exclude_moves_adu_calc/odoo/addons/ddmrp_exclude_moves_adu_calc
@@ -0,0 +1 @@
+../../../../ddmrp_exclude_moves_adu_calc
\ No newline at end of file
diff --git a/setup/ddmrp_exclude_moves_adu_calc/setup.py b/setup/ddmrp_exclude_moves_adu_calc/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/ddmrp_exclude_moves_adu_calc/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/ddmrp_history/odoo/addons/__init__.py b/setup/ddmrp_history/odoo/addons/__init__.py
new file mode 100644
index 000000000..de40ea7ca
--- /dev/null
+++ b/setup/ddmrp_history/odoo/addons/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/setup/ddmrp_history/odoo/addons/ddmrp_history b/setup/ddmrp_history/odoo/addons/ddmrp_history
new file mode 120000
index 000000000..f2a2e6a86
--- /dev/null
+++ b/setup/ddmrp_history/odoo/addons/ddmrp_history
@@ -0,0 +1 @@
+../../../../ddmrp_history/
\ No newline at end of file
diff --git a/setup/ddmrp_history/setup.py b/setup/ddmrp_history/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/ddmrp_history/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/ddmrp_mrp_production_request/odoo/addons/__init__.py b/setup/ddmrp_mrp_production_request/odoo/addons/__init__.py
new file mode 100644
index 000000000..de40ea7ca
--- /dev/null
+++ b/setup/ddmrp_mrp_production_request/odoo/addons/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/setup/ddmrp_mrp_production_request/odoo/addons/ddmrp_mrp_production_request b/setup/ddmrp_mrp_production_request/odoo/addons/ddmrp_mrp_production_request
new file mode 120000
index 000000000..95746af7b
--- /dev/null
+++ b/setup/ddmrp_mrp_production_request/odoo/addons/ddmrp_mrp_production_request
@@ -0,0 +1 @@
+../../../../ddmrp_mrp_production_request/
\ No newline at end of file
diff --git a/setup/ddmrp_mrp_production_request/setup.py b/setup/ddmrp_mrp_production_request/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/ddmrp_mrp_production_request/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/ddmrp_product_replace/odoo/addons/__init__.py b/setup/ddmrp_product_replace/odoo/addons/__init__.py
new file mode 100644
index 000000000..de40ea7ca
--- /dev/null
+++ b/setup/ddmrp_product_replace/odoo/addons/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/setup/ddmrp_product_replace/odoo/addons/ddmrp_product_replace b/setup/ddmrp_product_replace/odoo/addons/ddmrp_product_replace
new file mode 120000
index 000000000..dd03278f9
--- /dev/null
+++ b/setup/ddmrp_product_replace/odoo/addons/ddmrp_product_replace
@@ -0,0 +1 @@
+../../../../ddmrp_product_replace/
\ No newline at end of file
diff --git a/setup/ddmrp_product_replace/setup.py b/setup/ddmrp_product_replace/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/ddmrp_product_replace/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/stock_demand_estimate/README.rst b/stock_demand_estimate/README.rst
deleted file mode 100644
index d3ca4b1c8..000000000
--- a/stock_demand_estimate/README.rst
+++ /dev/null
@@ -1,76 +0,0 @@
-.. 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
-
-=====================
-Stock Demand Estimate
-=====================
-
-This module allows to create demand estimates for a given product and
-location, on configurable time periods.
-
-The module does not provide in itself any specific usage of the estimates.
-
-Installation
-============
-
-This module relies on the OCA module '2D matrix for x2many fields', and can
-be downloaded from:
-* Github: https://github.com/OCA/web/tree/8.0/web_widget_x2many_2d_matrix
-
-
-Usage
-=====
-
-Go to 'Warehouse / Configuration / Demand Estimate Periods' and define your
-estimating periods (monthly or weekly).
-
-
-Go to 'Warehouse / Demand Planning / Create Demand Estimates' to create or
-update your demand estimates.
-
-Go to 'Warehouse / Demand Planning / Demand Estimates' to review the
-estimates created.
-
-
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/153/8.0
-
-
-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 smashing it by providing a detailed and welcomed feedback.
-
-Credits
-=======
-
-Images
-------
-
-* Odoo Community Association: `Icon `_.
-
-Contributors
-------------
-
-* Jordi Ballester Alomar
-
-
-Maintainer
-----------
-
-.. image:: https://odoo-community.org/logo.png
- :alt: Odoo Community Association
- :target: https://odoo-community.org
-
-This module is maintained by the OCA.
-
-OCA, or the Odoo Community Association, is a nonprofit organization whose
-mission is to support the collaborative development of Odoo features and
-promote its widespread use.
-
-To contribute to this module, please visit https://odoo-community.org.
diff --git a/stock_demand_estimate/__openerp__.py b/stock_demand_estimate/__openerp__.py
deleted file mode 100644
index 3d838b25f..000000000
--- a/stock_demand_estimate/__openerp__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-{
- "name": "Stock Demand Estimate",
- "summary": "Allows to create demand estimates.",
- "version": "8.0.1.0.0",
- "author": "Eficent Business and IT Consulting Services S.L,"
- "Odoo Community Association (OCA)",
- "website": "https://www.odoo-community.org",
- "category": "Warehouse Management",
- "depends": ["stock",
- "web_widget_x2many_2d_matrix"
- ],
- "data": ["security/ir.model.access.csv",
- "security/stock_security.xml",
- "views/stock_demand_estimate_period_view.xml",
- "views/stock_demand_estimate_view.xml",
- "wizards/stock_demand_estimate_wizard_view.xml",
- ],
- "license": "AGPL-3",
- 'installable': True,
- 'application': True,
-}
diff --git a/stock_demand_estimate/models/__init__.py b/stock_demand_estimate/models/__init__.py
deleted file mode 100644
index 7e93e257a..000000000
--- a/stock_demand_estimate/models/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from . import stock_demand_estimate_period
-from . import stock_demand_estimate
diff --git a/stock_demand_estimate/models/stock_demand_estimate.py b/stock_demand_estimate/models/stock_demand_estimate.py
deleted file mode 100644
index d4dc48091..000000000
--- a/stock_demand_estimate/models/stock_demand_estimate.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# -*- coding: utf-8 -*-
-# © 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# © 2016 Aleph Objects, Inc. (https://www.alephobjects.com/)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from openerp import api, fields, models, _
-import openerp.addons.decimal_precision as dp
-from openerp.exceptions import Warning as UserError
-
-
-class StockDemandEstimate(models.Model):
- _name = 'stock.demand.estimate'
- _description = 'Stock Demand Estimate Line'
-
- @api.multi
- @api.depends('product_id', 'product_uom', 'product_uom_qty')
- def _compute_product_qty(self):
- for rec in self:
- if rec.product_uom:
- rec.product_qty = rec.product_uom._compute_qty(
- rec.product_id.uom_id.id, rec.product_uom_qty,
- rec.product_uom.id)
-
- def _set_product_qty(self):
- raise UserError(_('The requested operation cannot be '
- 'processed because of a programming error '
- 'setting the `product_qty` field instead '
- 'of the `product_uom_qty`.'))
-
- @api.multi
- def _compute_daily_qty(self):
- for rec in self:
- rec.daily_qty = rec.product_qty / rec.period_id.days
-
- period_id = fields.Many2one(
- comodel_name="stock.demand.estimate.period",
- string="Estimating Period",
- required=True)
- product_id = fields.Many2one(comodel_name="product.product",
- string="Product", required=True)
- product_uom = fields.Many2one(comodel_name="product.uom",
- string="Unit of measure")
- location_id = fields.Many2one(comodel_name="stock.location",
- string="Location", required=True)
- product_uom_qty = fields.Float(
- string="Quantity",
- digits_compute=dp.get_precision('Product Unit of Measure'))
- product_qty = fields.Float('Real Quantity', compute='_compute_product_qty',
- inverse='_set_product_qty', digits=0,
- store=True,
- help='Quantity in the default UoM of the '
- 'product', readonly=True)
- daily_qty = fields.Float(string='Quantity / Day',
- compute='_compute_daily_qty')
- company_id = fields.Many2one(
- comodel_name='res.company', string='Company', required=True,
- default=lambda self: self.env['res.company']._company_default_get(
- 'stock.demand.estimate'))
-
- @api.multi
- def name_get(self):
- res = []
- for rec in self:
- name = "%s - %s - %s" % (rec.period_id.name, rec.product_id.name,
- rec.location_id.name)
- res.append((rec.id, name))
- return res
-
- @api.model
- def get_quantity_by_date_range(self, date_from, date_to):
- # Check if the dates overlap with the period
- period_date_from = fields.Date.from_string(self.period_id.date_from)
- period_date_to = fields.Date.from_string(self.period_id.date_to)
-
- if date_from <= period_date_to and period_date_from <= date_to:
- overlap_date_from = max(period_date_from, date_from)
- overlap_date_to = min(period_date_to, date_to)
- days = (abs(overlap_date_to-overlap_date_from)).days + 1
- return days * self.daily_qty
- return 0.0
-
diff --git a/stock_demand_estimate/models/stock_demand_estimate_period.py b/stock_demand_estimate/models/stock_demand_estimate_period.py
deleted file mode 100644
index cb62e6285..000000000
--- a/stock_demand_estimate/models/stock_demand_estimate_period.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-# © 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# © 2016 Aleph Objects, Inc. (https://www.alephobjects.com/)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from openerp import api, fields, models, _
-from openerp.exceptions import Warning as UserError
-
-
-class StockDemandEstimatePeriod(models.Model):
- _name = 'stock.demand.estimate.period'
- _description = 'Stock Demand Estimate Period'
- _order = 'date_from'
-
- @api.multi
- @api.depends('date_from', 'date_to')
- def _compute_days(self):
- for rec in self:
- if rec.date_from and rec.date_to:
- rec.days = (fields.Date.from_string(rec.date_to) -
- fields.Date.from_string(rec.date_from)).days + 1
-
- name = fields.Char(string="Name", required=True)
- date_from = fields.Date(string="Date From", required=True)
- date_to = fields.Date(string="Date To", required=True)
- days = fields.Float(string="Days between dates",
- compute='_compute_days', store=True, readonly=True)
-
- estimate_ids = fields.One2many(
- comodel_name="stock.demand.estimate",
- inverse_name="period_id")
-
- company_id = fields.Many2one(
- comodel_name='res.company', string='Company', required=True,
- default=lambda self: self.env['res.company']._company_default_get(
- 'stock.demand.estimate.period'))
-
- @api.multi
- @api.constrains('name', 'date_from', 'date_to')
- def _check_period(self):
- for period in self:
- self.env.cr.execute('SELECT id, date_from, date_to \
- FROM stock_demand_estimate_period \
- WHERE (date_from <= %s and %s <= date_to) \
- AND id <> %s', (period.date_to, period.date_from, period.id))
- res = self.env.cr.fetchall()
- if res:
- raise UserError(_('Two periods cannot overlap.'))
diff --git a/stock_demand_estimate/security/ir.model.access.csv b/stock_demand_estimate/security/ir.model.access.csv
deleted file mode 100644
index 715896e64..000000000
--- a/stock_demand_estimate/security/ir.model.access.csv
+++ /dev/null
@@ -1,5 +0,0 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_stock_demand_estimate,stock.orderpoint.demand.estimate,model_stock_demand_estimate,stock.group_stock_user,1,0,0,0
-access_stock_demand_estimate_system,stock.orderpoint.demand.estimate system,model_stock_demand_estimate,stock.group_stock_manager,1,1,1,1
-access_stock_demand_estimate_period,stock.orderpoint.demand.estimate.period,model_stock_demand_estimate_period,stock.group_stock_user,1,0,0,0
-access_stock_demand_estimate_period_system,stock.orderpoint.demand.estimate.period system,model_stock_demand_estimate_period,stock.group_stock_manager,1,1,1,1
diff --git a/stock_demand_estimate/security/stock_security.xml b/stock_demand_estimate/security/stock_security.xml
deleted file mode 100644
index c447a085c..000000000
--- a/stock_demand_estimate/security/stock_security.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
- Stock demand estimate multi-company
-
-
- ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
-
-
-
- Stock demand estimate multi-company
-
-
- ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
-
-
-
-
diff --git a/stock_demand_estimate/static/description/icon.png b/stock_demand_estimate/static/description/icon.png
deleted file mode 100644
index 3a0328b51..000000000
Binary files a/stock_demand_estimate/static/description/icon.png and /dev/null differ
diff --git a/stock_demand_estimate/views/stock_demand_estimate_period_view.xml b/stock_demand_estimate/views/stock_demand_estimate_period_view.xml
deleted file mode 100644
index d32933cee..000000000
--- a/stock_demand_estimate/views/stock_demand_estimate_period_view.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
- stock.demand.estimate.period.tree
- stock.demand.estimate.period
-
-
-
-
-
-
-
-
-
-
-
- stock.demand.estimate.period.search
- stock.demand.estimate.period
-
-
-
-
-
-
-
-
-
-
- Stock Demand Estimate Periods
- ir.actions.act_window
- stock.demand.estimate.period
- form
- tree,form
-
-
-
-
-
-
-
diff --git a/stock_demand_estimate/views/stock_demand_estimate_view.xml b/stock_demand_estimate/views/stock_demand_estimate_view.xml
deleted file mode 100644
index 2b2f0f981..000000000
--- a/stock_demand_estimate/views/stock_demand_estimate_view.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
- stock.demand.estimate.tree
- stock.demand.estimate
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- stock.demand.estimate.search
- stock.demand.estimate
-
-
-
-
-
-
-
-
-
-
- Stock Demand Estimates
- ir.actions.act_window
- stock.demand.estimate
- form
- tree,form
-
-
-
-
-
-
-
-
-
diff --git a/stock_demand_estimate/wizards/__init__.py b/stock_demand_estimate/wizards/__init__.py
deleted file mode 100644
index 05c5fae45..000000000
--- a/stock_demand_estimate/wizards/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from . import stock_demand_estimate_wizard
diff --git a/stock_demand_estimate/wizards/stock_demand_estimate_wizard.py b/stock_demand_estimate/wizards/stock_demand_estimate_wizard.py
deleted file mode 100644
index 8d97c95d2..000000000
--- a/stock_demand_estimate/wizards/stock_demand_estimate_wizard.py
+++ /dev/null
@@ -1,189 +0,0 @@
-# -*- coding: utf-8 -*-
-# © 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# © 2016 Aleph Objects, Inc. (https://www.alephobjects.com/)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from openerp import api, fields, models, _
-import openerp.addons.decimal_precision as dp
-from openerp.exceptions import Warning as UserError
-
-_PERIOD_SELECTION = [
- ('monthly', 'Monthly'),
- ('weekly', 'Weekly')
-]
-
-
-class StockDemandEstimateSheet(models.TransientModel):
- _name = 'stock.demand.estimate.sheet'
- _description = 'Stock Demand Estimate Sheet'
-
- def _default_date_from(self):
- return self.env.context.get('date_from', False)
-
- def _default_date_to(self):
- return self.env.context.get('date_to', False)
-
- def _default_location_id(self):
- location_id = self.env.context.get('location_id', False)
- if location_id:
- return self.env['stock.location'].browse(location_id)
- else:
- return False
-
- def _default_estimate_ids(self):
- date_from = self.env.context.get('date_from', False)
- date_to = self.env.context.get('date_to', False)
- location_id = self.env.context.get('location_id', False)
- product_ids = self.env.context.get('product_ids', False)
- domain = [('date_from', '>=', date_from),
- ('date_to', '<=', date_to)]
- periods = self.env['stock.demand.estimate.period'].search(
- domain)
- products = self.env['product.product'].browse(product_ids)
-
- lines = []
- for product in products:
- name_y = ''
- if product.default_code:
- name_y += '[%s] ' % product.default_code
- name_y += product.name
- name_y += ' - %s' % product.uom_id.name
- for period in periods:
- estimates = self.env['stock.demand.estimate'].search(
- [('product_id', '=', product.id),
- ('period_id', '=', period.id),
- ('location_id', '=', location_id)])
- if estimates:
- lines.append((0, 0, {
- 'value_x': period.name,
- 'value_y': name_y,
- 'period_id': period.id,
- 'product_id': product.id,
- 'product_uom': estimates[0].product_uom.id,
- 'location_id': location_id,
- 'estimate_id': estimates[0].id,
- 'product_uom_qty': estimates[0].product_uom_qty
- }))
- else:
- lines.append((0, 0, {
- 'value_x': period.name,
- 'value_y': name_y,
- 'period_id': period.id,
- 'product_id': product.id,
- 'product_uom': product.uom_id.id,
- 'location_id': location_id,
- 'product_uom_qty': 0.0
- }))
- return lines
-
- date_from = fields.Date(string="Date From", readonly=True,
- default=_default_date_from)
- date_to = fields.Date(string="Date From", readonly=True,
- default=_default_date_to)
- location_id = fields.Many2one(comodel_name="stock.location",
- string="Location", readonly=True,
- default=_default_location_id)
- line_ids = fields.Many2many(
- string="Estimates",
- comodel_name='stock.demand.estimate.sheet.line',
- rel='stock_demand_estimate_line_rel',
- default=_default_estimate_ids)
-
- @api.model
- def _prepare_estimate_data(self, line):
- return {
- 'period_id': line.period_id.id,
- 'product_id': line.product_id.id,
- 'location_id': line.location_id.id,
- 'product_uom_qty': line.product_uom_qty,
- 'product_uom': line.product_id.uom_id.id,
- }
-
- @api.multi
- def button_validate(self):
- res = []
- for line in self.line_ids:
- if line.estimate_id:
- line.estimate_id.product_uom_qty = line.product_uom_qty
- res.append(line.estimate_id.id)
- else:
- data = self._prepare_estimate_data(line)
- estimate = self.env['stock.demand.estimate'].create(
- data)
- res.append(estimate.id)
- res = {
- 'domain': [('id', 'in', res)],
- 'name': _('Stock Demand Estimates'),
- 'src_model': 'stock.demand.estimate.wizard',
- 'view_type': 'form',
- 'view_mode': 'tree',
- 'res_model': 'stock.demand.estimate',
- 'type': 'ir.actions.act_window'
- }
- return res
-
-
-class StockDemandEstimateSheetLine(models.TransientModel):
- _name = 'stock.demand.estimate.sheet.line'
- _description = 'Stock Demand Estimate Sheet Line'
-
- estimate_id = fields.Many2one(comodel_name='stock.demand.estimate')
- period_id = fields.Many2one(
- comodel_name='stock.demand.estimate.period',
- string='Period')
- location_id = fields.Many2one(comodel_name='stock.location',
- string="Stock Location")
- product_id = fields.Many2one(comodel_name='product.product',
- string='Product')
- value_x = fields.Char(string='Period')
- value_y = fields.Char(string='Product')
- product_uom_qty = fields.Float(
- string="Quantity", digits_compute=dp.get_precision('Product UoM'))
-
-
-class DemandEstimateWizard(models.TransientModel):
- _name = 'stock.demand.estimate.wizard'
- _description = 'Stock Demand Estimate Wizard'
-
- date_from = fields.Date(string="Date From", required=True)
- date_to = fields.Date(string="Date To", required=True)
- location_id = fields.Many2one(comodel_name="stock.location",
- string="Location", required=True)
- product_ids = fields.Many2many(
- comodel_name="product.product",
- string="Products")
-
- @api.multi
- def _prepare_demand_estimate_sheet(self):
- self.ensure_one()
- return {
- 'date_from': self.date_from,
- 'date_to': self.date_to,
- 'location_id': self.location_id.id,
- }
-
- @api.multi
- def create_sheet(self):
- self.ensure_one()
- if not self.product_ids:
- raise UserError(_('You must select at lease one product.'))
-
- context = {
- 'date_from': self.date_from,
- 'date_to': self.date_to,
- 'location_id': self.location_id.id,
- 'product_ids': self.product_ids.ids
- }
- res = {
- 'context': context,
- 'name': _('Estimate Sheet'),
- 'src_model': 'stock.demand.estimate.wizard',
- 'view_type': 'form',
- 'view_mode': 'form',
- 'target': 'new',
- 'res_model': 'stock.demand.estimate.sheet',
- 'type': 'ir.actions.act_window'
- }
-
- return res
diff --git a/stock_demand_estimate/wizards/stock_demand_estimate_wizard_view.xml b/stock_demand_estimate/wizards/stock_demand_estimate_wizard_view.xml
deleted file mode 100644
index af5926770..000000000
--- a/stock_demand_estimate/wizards/stock_demand_estimate_wizard_view.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
- stock.demand.estimate.sheet.form
- stock.demand.estimate.sheet
-
-
-
-
-
-
- stock.demand.estimate.wizard.form
- stock.demand.estimate.wizard
-
-
-
-
-
-
-
-
-
-
-
diff --git a/stock_orderpoint_uom/README.rst b/stock_orderpoint_uom/README.rst
deleted file mode 100644
index 4bb323ca3..000000000
--- a/stock_orderpoint_uom/README.rst
+++ /dev/null
@@ -1,65 +0,0 @@
-.. 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
-
-====================
-Stock Orderpoint UoM
-====================
-
-This module allows users users to define what unit of measure should be used
-in procurements created from minimum stock rules.
-
-A typical use case would be a product that is stocked in centimeters, and
-needs to be restocked in meters from another warehouse. When the picking is
-created, the quantity to be transferred will be expressed in meters, making
-it easier for the people responsible for the transfers to understand the
-requirement.
-
-
-Usage
-=====
-
-Go to 'Configuration / Reordering Rules' and indicate a Procurement UoM.
-
-
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/153/8.0
-
-
-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 smashing it by providing a detailed and welcomed feedback.
-
-Credits
-=======
-
-Images
-------
-
-* Odoo Community Association: `Icon `_.
-
-Contributors
-------------
-
-* Jordi Ballester Alomar
-
-
-Maintainer
-----------
-
-.. image:: https://odoo-community.org/logo.png
- :alt: Odoo Community Association
- :target: https://odoo-community.org
-
-This module is maintained by the OCA.
-
-OCA, or the Odoo Community Association, is a nonprofit organization whose
-mission is to support the collaborative development of Odoo features and
-promote its widespread use.
-
-To contribute to this module, please visit https://odoo-community.org.
diff --git a/stock_orderpoint_uom/__init__.py b/stock_orderpoint_uom/__init__.py
deleted file mode 100644
index 08f93b3a4..000000000
--- a/stock_orderpoint_uom/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from . import models
diff --git a/stock_orderpoint_uom/__openerp__.py b/stock_orderpoint_uom/__openerp__.py
deleted file mode 100644
index 10708378f..000000000
--- a/stock_orderpoint_uom/__openerp__.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-{
- "name": "Stock Orderpoint UoM",
- "summary": "Allows to create procurement orders in the UoM indicated in "
- "the orderpoint",
- "version": "8.0.1.0.0",
- "author": "Eficent Business and IT Consulting Services S.L,"
- "Odoo Community Association (OCA)",
- "website": "https://www.odoo-community.org",
- "category": "Warehouse Management",
- "depends": ["stock"],
- "data": ["views/stock_warehouse_orderpoint_view.xml"],
- "license": "AGPL-3",
- 'installable': True,
- 'application': False,
-}
diff --git a/stock_orderpoint_uom/models/procurement_order.py b/stock_orderpoint_uom/models/procurement_order.py
deleted file mode 100644
index 250faf038..000000000
--- a/stock_orderpoint_uom/models/procurement_order.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from openerp import api, models
-
-
-class ProcurementOrder(models.Model):
- _inherit = "procurement.order"
-
- @api.model
- def _prepare_orderpoint_procurement(self, orderpoint, product_qty):
- res = super(ProcurementOrder, self)._prepare_orderpoint_procurement(
- orderpoint, product_qty)
- if orderpoint.procure_uom_id:
- res['product_qty'] = orderpoint.procure_uom_id._compute_qty(
- orderpoint.product_id.uom_id.id, product_qty,
- orderpoint.procure_uom_id.id)
- res['product_uom'] = orderpoint.procure_uom_id.id
- return res
diff --git a/stock_orderpoint_uom/models/stock_warehouse_orderpoint.py b/stock_orderpoint_uom/models/stock_warehouse_orderpoint.py
deleted file mode 100644
index a4ca61052..000000000
--- a/stock_orderpoint_uom/models/stock_warehouse_orderpoint.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from openerp import api, fields, models, _
-from openerp.exceptions import Warning as UserError
-
-
-class StockWarehouseOrderpoint(models.Model):
- _inherit = "stock.warehouse.orderpoint"
-
- procure_uom_id = fields.Many2one(comodel_name='product.uom',
- string="Procurement UoM")
-
- @api.constrains('product_uom', 'procure_uom_id')
- def _check_procure_uom(self):
- if any(orderpoint.product_uom and
- orderpoint.procure_uom_id and
- orderpoint.product_uom.category_id !=
- orderpoint.procure_uom_id.category_id
- for orderpoint in self):
- raise UserError(
- _('Error: The product default Unit of Measure and '
- 'the procurement Unit of Measure must be in the '
- 'same category.'))
- return True
diff --git a/stock_orderpoint_uom/static/description/icon.png b/stock_orderpoint_uom/static/description/icon.png
deleted file mode 100644
index 3a0328b51..000000000
Binary files a/stock_orderpoint_uom/static/description/icon.png and /dev/null differ
diff --git a/stock_orderpoint_uom/tests/__init__.py b/stock_orderpoint_uom/tests/__init__.py
deleted file mode 100644
index 8ab7b3f74..000000000
--- a/stock_orderpoint_uom/tests/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-from . import test_stock_orderpoint_procure_uom
diff --git a/stock_orderpoint_uom/tests/test_stock_orderpoint_procure_uom.py b/stock_orderpoint_uom/tests/test_stock_orderpoint_procure_uom.py
deleted file mode 100644
index b59453679..000000000
--- a/stock_orderpoint_uom/tests/test_stock_orderpoint_procure_uom.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services S.L.
-# (http://www.eficent.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-
-import openerp.tests.common as common
-from openerp.tools import mute_logger
-from openerp.exceptions import ValidationError
-
-
-class TestStockOrderpointProcureUom(common.TransactionCase):
-
- def setUp(self):
- super(TestStockOrderpointProcureUom, self).setUp()
- productObj = self.env['product.product']
- self.warehouse = self.env.ref('stock.warehouse0')
- self.location_stock = self.env.ref('stock.stock_location_stock')
- self.uom_unit = self.env.ref('product.product_uom_unit')
- self.uom_dozen = self.env.ref('product.product_uom_dozen')
- self.uom_kg = self.env.ref('product.product_uom_kgm')
-
- self.productA = productObj.create(
- {'name': 'product A',
- 'standard_price': 1,
- 'type': 'product',
- 'uom_id': self.uom_unit.id,
- 'default_code': 'A',
- })
-
- def test_stock_orderpoint_procure_uom(self):
-
- self.env['stock.warehouse.orderpoint'].create({
- 'warehouse_id': self.warehouse.id,
- 'location_id': self.location_stock.id,
- 'product_id': self.productA.id,
- 'product_max_qty': 24,
- 'product_min_qty': 12,
- 'procure_uom_id': self.uom_dozen.id,
- })
-
- sched = self.env['procurement.order']
- sched.run_scheduler()
- proc = sched.search([('product_id', '=', self.productA.id)])
- self.assertEqual(proc.product_uom, self.uom_dozen)
- self.assertEqual(proc.product_qty, 2)
-
- def test_stock_orderpoint_wrong_uom(self):
-
- with mute_logger('openerp.sql_db'):
- with self.assertRaises(ValidationError):
- self.env['stock.warehouse.orderpoint'].create({
- 'warehouse_id': self.warehouse.id,
- 'location_id': self.location_stock.id,
- 'product_id': self.productA.id,
- 'product_max_qty': 24,
- 'product_min_qty': 12,
- 'procure_uom_id': self.uom_kg.id,
- })
diff --git a/stock_orderpoint_uom/views/stock_warehouse_orderpoint_view.xml b/stock_orderpoint_uom/views/stock_warehouse_orderpoint_view.xml
deleted file mode 100644
index ae41f7756..000000000
--- a/stock_orderpoint_uom/views/stock_warehouse_orderpoint_view.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
- stock.warehouse.orderpoint.tree
- stock.warehouse.orderpoint
-
-
-
-
-
-
-
-
-
- stock.warehouse.orderpoint.form
- stock.warehouse.orderpoint
-
-
-
-
-
-
-
-
-
-
diff --git a/stock_warehouse_orderpoint_stock_info/README.rst b/stock_warehouse_orderpoint_stock_info/README.rst
deleted file mode 100644
index c0895a440..000000000
--- a/stock_warehouse_orderpoint_stock_info/README.rst
+++ /dev/null
@@ -1,54 +0,0 @@
-.. 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
-
-===========================
-Reordering Rules stock info
-===========================
-
-This modules allows to know the product availability directly in the reordering
-rules.
-
-Usage
-=====
-
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/153/9.0
-
-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 smashing it by providing a detailed and welcomed
-feedback.
-
-
-Credits
-=======
-
-Contributors
-------------
-* Oihane Crucelaegui
-* Pedro M. Baeza
-* Ana Juaristi
-* Jordi Ballester Alomar
-* Serpent Consulting Services Pvt. Ltd.
-
-
-Maintainer
-----------
-
-.. image:: https://odoo-community.org/logo.png
- :alt: Odoo Community Association
- :target: https://odoo-community.org
-
-This module is maintained by the OCA.
-
-OCA, or the Odoo Community Association, is a nonprofit organization whose
-mission is to support the collaborative development of Odoo features and
-promote its widespread use.
-
-To contribute to this module, please visit https://odoo-community.org.
diff --git a/stock_warehouse_orderpoint_stock_info/__init__.py b/stock_warehouse_orderpoint_stock_info/__init__.py
deleted file mode 100644
index c7f4154ff..000000000
--- a/stock_warehouse_orderpoint_stock_info/__init__.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 OdooMRP Team
-# Copyright 2016 AvanzOSC
-# Copyright 2016 Pedro M. Baeza
-# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from . import models
diff --git a/stock_warehouse_orderpoint_stock_info/__openerp__.py b/stock_warehouse_orderpoint_stock_info/__openerp__.py
deleted file mode 100644
index 0e0ef6a53..000000000
--- a/stock_warehouse_orderpoint_stock_info/__openerp__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 OdooMRP Team
-# Copyright 2016 AvanzOSC
-# Copyright 2016 Pedro M. Baeza
-# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-{
- "name": "Reordering rules stock info",
- "version": "9.0.1.0.0",
- "depends": [
- "stock",
- ],
- "author": "OdooMRP team, "
- "AvanzOSC, "
- "Tecnativa, "
- "Odoo Community Association (OCA)",
- "website": "http://www.odoomrp.com",
- "category": "Warehouse",
- "license": "AGPL-3",
- "data": [
- "views/stock_warehouse_orderpoint_view.xml",
- ],
- "installable": True,
- "auto_install": False,
-}
diff --git a/stock_warehouse_orderpoint_stock_info/i18n/es.po b/stock_warehouse_orderpoint_stock_info/i18n/es.po
deleted file mode 100644
index b88c82083..000000000
--- a/stock_warehouse_orderpoint_stock_info/i18n/es.po
+++ /dev/null
@@ -1,47 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * stock_warehouse_orderpoint_stock_info
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-03-04 11:41+0000\n"
-"PO-Revision-Date: 2015-03-04 11:41+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
-msgid "Availability under minimum"
-msgstr "Disponibilidad por debajo del mínimo"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
-msgid "Group By"
-msgstr "Agrupar por"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: field:stock.warehouse.orderpoint,available:0
-msgid "Is enough product available?"
-msgstr "Hay producto suficiente?"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: model:ir.model,name:stock_warehouse_orderpoint_stock_info.model_stock_warehouse_orderpoint
-msgid "Minimum Inventory Rule"
-msgstr "Regla de inventario mínimo"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
-msgid "Rules"
-msgstr "Reglas"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
-msgid "Stock Info"
-msgstr "Info. de Stock"
-
diff --git a/stock_warehouse_orderpoint_stock_info/i18n/pt_BR.po b/stock_warehouse_orderpoint_stock_info/i18n/pt_BR.po
deleted file mode 100644
index dad15851b..000000000
--- a/stock_warehouse_orderpoint_stock_info/i18n/pt_BR.po
+++ /dev/null
@@ -1,49 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * stock_warehouse_orderpoint_stock_info
-#
-# Translators:
-# Armando Vulcano Junior , 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: odoomrp-utils (8.0)\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-10-08 08:45+0000\n"
-"PO-Revision-Date: 2015-10-09 01:01+0000\n"
-"Last-Translator: danimaribeiro \n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/odoomrp-utils-8-0/language/pt_BR/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Language: pt_BR\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
-msgid "Availability under minimum"
-msgstr "Disponibilidade menor que mínimo"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
-msgid "Group By"
-msgstr "Agrupado por"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: field:stock.warehouse.orderpoint,available:0
-msgid "Is enough product available?"
-msgstr "Produto disponível é suficiente ?"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: model:ir.model,name:stock_warehouse_orderpoint_stock_info.model_stock_warehouse_orderpoint
-msgid "Minimum Inventory Rule"
-msgstr "Regra minima de inventário"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
-msgid "Rules"
-msgstr "Regras"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
-msgid "Stock Info"
-msgstr "Informação de estoque"
diff --git a/stock_warehouse_orderpoint_stock_info/i18n/sl.po b/stock_warehouse_orderpoint_stock_info/i18n/sl.po
deleted file mode 100644
index 9ffba9caa..000000000
--- a/stock_warehouse_orderpoint_stock_info/i18n/sl.po
+++ /dev/null
@@ -1,49 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * stock_warehouse_orderpoint_stock_info
-#
-# Translators:
-# Matjaž Mozetič , 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: odoomrp-utils (8.0)\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-10-08 08:45+0000\n"
-"PO-Revision-Date: 2015-09-28 13:15+0000\n"
-"Last-Translator: Matjaž Mozetič \n"
-"Language-Team: Slovenian (http://www.transifex.com/oca/odoomrp-utils-8-0/language/sl/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Language: sl\n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
-msgid "Availability under minimum"
-msgstr "Razpoložljivost pod minimumom"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_search_view
-msgid "Group By"
-msgstr "Združi po..."
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: field:stock.warehouse.orderpoint,available:0
-msgid "Is enough product available?"
-msgstr "Je na voljo dovolj proizvodov?"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: model:ir.model,name:stock_warehouse_orderpoint_stock_info.model_stock_warehouse_orderpoint
-msgid "Minimum Inventory Rule"
-msgstr "Pravilo minimalne zaloge"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
-msgid "Rules"
-msgstr "Pravila"
-
-#. module: stock_warehouse_orderpoint_stock_info
-#: view:stock.warehouse.orderpoint:stock_warehouse_orderpoint_stock_info.stock_warehouse_orderpoint_form_view
-msgid "Stock Info"
-msgstr "Podatki o zalogi"
diff --git a/stock_warehouse_orderpoint_stock_info/models/__init__.py b/stock_warehouse_orderpoint_stock_info/models/__init__.py
deleted file mode 100644
index c21daf9b7..000000000
--- a/stock_warehouse_orderpoint_stock_info/models/__init__.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 OdooMRP Team
-# Copyright 2016 AvanzOSC
-# Copyright 2016 Pedro M. Baeza
-# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from . import stock_warehouse_orderpoint
diff --git a/stock_warehouse_orderpoint_stock_info/models/stock_warehouse_orderpoint.py b/stock_warehouse_orderpoint_stock_info/models/stock_warehouse_orderpoint.py
deleted file mode 100644
index c0eaf9a85..000000000
--- a/stock_warehouse_orderpoint_stock_info/models/stock_warehouse_orderpoint.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 OdooMRP Team
-# Copyright 2016 AvanzOSC
-# Copyright 2016 Pedro M. Baeza
-# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from openerp import models, fields, api
-
-
-class StockWarehouseOrderpoint(models.Model):
- _inherit = 'stock.warehouse.orderpoint'
-
- @api.multi
- def _compute_product_available_qty(self):
- for rec in self:
- product_available = rec.product_id.with_context(
- location=rec.location_id.id
- )._product_available()[rec.product_id.id]
- rec.product_location_qty = product_available['qty_available']
- rec.incoming_location_qty = product_available['incoming_qty']
- rec.outgoing_location_qty = product_available['outgoing_qty']
- rec.virtual_location_qty = product_available['virtual_available']
-
- product_location_qty = fields.Float(
- string='Quantity On Location',
- compute='_compute_product_available_qty')
- incoming_location_qty = fields.Float(
- string='Incoming On Location',
- compute='_compute_product_available_qty')
- outgoing_location_qty = fields.Float(
- string='Outgoing On Location',
- compute='_compute_product_available_qty')
- virtual_location_qty = fields.Float(
- string='Forecast On Location',
- compute='_compute_product_available_qty')
- product_category = fields.Many2one(string='Product Category',
- related='product_id.categ_id',
- store=True)
diff --git a/stock_warehouse_orderpoint_stock_info/tests/__init__.py b/stock_warehouse_orderpoint_stock_info/tests/__init__.py
deleted file mode 100644
index a9f167c7a..000000000
--- a/stock_warehouse_orderpoint_stock_info/tests/__init__.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 OdooMRP Team
-# Copyright 2016 AvanzOSC
-# Copyright 2016 Pedro M. Baeza
-# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from . import test_stock_warehouse_orderpoint
diff --git a/stock_warehouse_orderpoint_stock_info/tests/test_stock_warehouse_orderpoint.py b/stock_warehouse_orderpoint_stock_info/tests/test_stock_warehouse_orderpoint.py
deleted file mode 100644
index 6a6880bf3..000000000
--- a/stock_warehouse_orderpoint_stock_info/tests/test_stock_warehouse_orderpoint.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 OdooMRP Team
-# Copyright 2016 AvanzOSC
-# Copyright 2016 Pedro M. Baeza
-# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from openerp.tests import common
-
-
-class TestStockWarehouseOrderpoint(common.TransactionCase):
-
- def setUp(self):
- super(TestStockWarehouseOrderpoint, self).setUp()
- # Get required Model
- self.reordering_rule_model = self.env['stock.warehouse.orderpoint']
- self.stock_move_model = self.env['stock.move']
- self.product_model = self.env['product.product']
- self.product_ctg_model = self.env['product.category']
-
- # Get required Model data
- self.product_uom = self.env.ref('product.product_uom_unit')
- self.dest_location = self.env.ref('stock.stock_location_stock')
- self.location = self.env.ref('stock.stock_location_locations_partner')
- self.picking = self.env.ref('stock.picking_type_in')
-
- # Create product category and product
- self.product_ctg = self._create_product_category()
- self.product = self._create_product()
-
- # Create Reordering Rule
- self.reordering_record = self.create_orderpoint()
-
- def _create_product_category(self):
- """Create a Product Category."""
- product_ctg = self.product_ctg_model.create({
- 'name': 'test_product_ctg',
- 'type': 'normal',
- })
- return product_ctg
-
- def _create_product(self):
- """Create a Stockable Product."""
- product = self.product_model.create({
- 'name': 'Test Product',
- 'categ_id': self.product_ctg.id,
- 'type': 'product',
- 'uom_id': self.product_uom.id,
- })
- return product
-
- def create_orderpoint(self):
- """Create a Reordering rule for the product."""
- record = self.reordering_rule_model.create({
- 'name': 'Reordering Rule',
- 'product_id': self.product.id,
- 'product_min_qty': '1',
- 'product_max_qty': '5',
- 'qty_multiple': '1',
- 'location_id': self.dest_location.id,
- })
- return record
-
- def create_stock_move(self):
- """Create a Stock Move."""
- move = self.stock_move_model.create({
- 'name': 'Reordering Product',
- 'product_id': self.product.id,
- 'product_uom': self.product_uom.id,
- 'product_uom_qty': '10.0',
- 'picking_type_id': self.picking.id,
- 'location_id': self.location.id,
- 'location_dest_id': self.dest_location.id
- })
- move.action_confirm()
- return move
-
- def test_product_qty(self):
- """Tests the product quantity in the Reordering rules"""
- # Create & process moves to test the product quantity
- move = self.create_stock_move()
- self.reordering_record.refresh()
- self.assertEqual(self.reordering_record.incoming_location_qty,
- self.product.incoming_qty,
- 'Incoming Qty does not match')
- self.assertEqual(self.reordering_record.virtual_location_qty,
- self.product.virtual_available,
- 'Virtual Qty does not match')
- move.action_done()
- self.reordering_record.refresh()
- self.assertEqual(self.reordering_record.product_location_qty,
- self.product.qty_available,
- 'Available Qty does not match')
- self.assertEqual(self.reordering_record.virtual_location_qty,
- self.product.virtual_available,
- 'Virtual Qty does not match')
diff --git a/stock_warehouse_orderpoint_stock_info/views/stock_warehouse_orderpoint_view.xml b/stock_warehouse_orderpoint_stock_info/views/stock_warehouse_orderpoint_view.xml
deleted file mode 100644
index e1daa13e0..000000000
--- a/stock_warehouse_orderpoint_stock_info/views/stock_warehouse_orderpoint_view.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
- stock.warehouse.orderpoint.tree
- stock.warehouse.orderpoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- stock.warehouse.orderpoint.form
- stock.warehouse.orderpoint
-
-
-
-
-
-
-
-
-
-
-
-
- stock.warehouser.orderpoint.search
- stock.warehouse.orderpoint
-
-
-
-
-
-
-
-
-
-
diff --git a/stock_warehouse_orderpoint_stock_info_unreserved/README.rst b/stock_warehouse_orderpoint_stock_info_unreserved/README.rst
deleted file mode 100644
index 8a6e23476..000000000
--- a/stock_warehouse_orderpoint_stock_info_unreserved/README.rst
+++ /dev/null
@@ -1,51 +0,0 @@
-.. 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
-
-======================================
-Reordering Rules stock info unreserved
-======================================
-
-This modules allows to display the availability of stock on hand and
-unreserved on a reordering rule.
-
-Usage
-=====
-
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/153/9.0
-
-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 smashing it by providing a detailed and welcomed
-feedback.
-
-
-Credits
-=======
-
-Contributors
-------------
-* Jordi Ballester Alomar
-
-
-
-Maintainer
-----------
-
-.. image:: https://odoo-community.org/logo.png
- :alt: Odoo Community Association
- :target: https://odoo-community.org
-
-This module is maintained by the OCA.
-
-OCA, or the Odoo Community Association, is a nonprofit organization whose
-mission is to support the collaborative development of Odoo features and
-promote its widespread use.
-
-To contribute to this module, please visit https://odoo-community.org.
diff --git a/stock_warehouse_orderpoint_stock_info_unreserved/__openerp__.py b/stock_warehouse_orderpoint_stock_info_unreserved/__openerp__.py
deleted file mode 100644
index 0e053289f..000000000
--- a/stock_warehouse_orderpoint_stock_info_unreserved/__openerp__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-{
- "name": "Reordering rules stock info unreserved",
- "version": "9.0.1.0.0",
- "depends": [
- "stock_warehouse_orderpoint_stock_info",
- "stock_available_unreserved"
- ],
- "author": "Eficent, "
- "Odoo Community Association (OCA)",
- "website": "http://www.eficent.com",
- "category": "Warehouse",
- "license": "AGPL-3",
- "data": [
- "views/stock_warehouse_orderpoint_view.xml",
- ],
- "installable": True,
- "auto_install": False,
-}
diff --git a/stock_warehouse_orderpoint_stock_info_unreserved/models/__init__.py b/stock_warehouse_orderpoint_stock_info_unreserved/models/__init__.py
deleted file mode 100644
index e25cf0d19..000000000
--- a/stock_warehouse_orderpoint_stock_info_unreserved/models/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from . import stock_warehouse_orderpoint
diff --git a/stock_warehouse_orderpoint_stock_info_unreserved/models/stock_warehouse_orderpoint.py b/stock_warehouse_orderpoint_stock_info_unreserved/models/stock_warehouse_orderpoint.py
deleted file mode 100644
index 6739d8f37..000000000
--- a/stock_warehouse_orderpoint_stock_info_unreserved/models/stock_warehouse_orderpoint.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from openerp import models, fields, api
-
-
-class StockWarehouseOrderpoint(models.Model):
- _inherit = 'stock.warehouse.orderpoint'
-
- @api.multi
- def _compute_product_available_qty(self):
- super(StockWarehouseOrderpoint, self)._compute_product_available_qty()
- for rec in self:
- product_available = rec.product_id.with_context(
- location=rec.location_id.id
- )._product_available()[rec.product_id.id]
- rec.product_location_qty_available_not_res = \
- product_available['qty_available_not_res']
-
- product_location_qty_available_not_res = fields.Float(
- string='Quantity On Location (Unreserved)',
- compute='_compute_product_available_qty')
diff --git a/stock_warehouse_orderpoint_stock_info_unreserved/tests/__init__.py b/stock_warehouse_orderpoint_stock_info_unreserved/tests/__init__.py
deleted file mode 100644
index bf747c324..000000000
--- a/stock_warehouse_orderpoint_stock_info_unreserved/tests/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from . import test_stock_warehouse_orderpoint
diff --git a/stock_warehouse_orderpoint_stock_info_unreserved/tests/test_stock_warehouse_orderpoint.py b/stock_warehouse_orderpoint_stock_info_unreserved/tests/test_stock_warehouse_orderpoint.py
deleted file mode 100644
index d2edc8f95..000000000
--- a/stock_warehouse_orderpoint_stock_info_unreserved/tests/test_stock_warehouse_orderpoint.py
+++ /dev/null
@@ -1,112 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from openerp.tests import common
-
-
-class TestStockWarehouseOrderpoint(common.TransactionCase):
-
- def setUp(self):
- super(TestStockWarehouseOrderpoint, self).setUp()
- # Get required Model
- self.reordering_rule_model = self.env['stock.warehouse.orderpoint']
- self.stock_move_model = self.env['stock.move']
- self.product_model = self.env['product.product']
- self.product_ctg_model = self.env['product.category']
-
- # Get required Model data
- self.product_uom = self.env.ref('product.product_uom_unit')
- self.location_stock = self.env.ref('stock.stock_location_stock')
- self.location_shelf1 = self.env.ref('stock.stock_location_components')
- self.location_customer = self.env.ref('stock.stock_location_customers')
- self.location_supplier = self.env.ref('stock.stock_location_suppliers')
-
- # Create product category and product
- self.product_ctg = self._create_product_category()
- self.product = self._create_product()
-
- # Create Reordering Rule
- self.reordering_record = self.create_orderpoint()
-
- def _create_product_category(self):
- """Create a Product Category."""
- product_ctg = self.product_ctg_model.create({
- 'name': 'test_product_ctg',
- 'type': 'normal',
- })
- return product_ctg
-
- def _create_product(self):
- """Create a Stockable Product."""
- product = self.product_model.create({
- 'name': 'Test Product',
- 'categ_id': self.product_ctg.id,
- 'type': 'product',
- 'uom_id': self.product_uom.id,
- })
- return product
-
- def create_orderpoint(self):
- """Create a Reordering rule for the product."""
- record = self.reordering_rule_model.create({
- 'name': 'Reordering Rule',
- 'product_id': self.product.id,
- 'product_min_qty': '1',
- 'product_max_qty': '5',
- 'qty_multiple': '1',
- 'location_id': self.location_stock.id,
- })
- return record
-
- def create_move(self, source_location, destination_location):
- move = self.env['stock.move'].create({
- 'name': 'Test move',
- 'product_id': self.product.id,
- 'product_uom': self.product_uom.id,
- 'product_uom_qty': 10,
- 'location_id': source_location.id,
- 'location_dest_id': destination_location.id}
- )
-
- move.action_confirm()
- return move
-
- def test_product_qty(self):
- """Tests the product quantity in the Reordering rules"""
- # Create & process moves to test the product quantity
- move_in = self.create_move(self.location_supplier, self.location_stock)
- move_out = self.create_move(self.location_stock,
- self.location_customer)
- self.reordering_record.refresh()
- self.assertEqual(self.reordering_record.
- product_location_qty_available_not_res,
- 0.0,
- 'Quantity On Hand (Unreserved) does not match')
- self.assertEqual(self.reordering_record.
- product_location_qty_available_not_res,
- self.product.qty_available_not_res,
- 'Quantity On Hand (Unreserved) in the orderpoint '
- 'does not match with the product.')
- move_in.action_done()
- self.reordering_record.refresh()
- self.assertEqual(self.reordering_record.
- product_location_qty_available_not_res,
- 10.0,
- 'Quantity On Hand (Unreserved) does not match')
- self.assertEqual(self.reordering_record.
- product_location_qty_available_not_res,
- self.product.qty_available_not_res,
- 'Quantity On Hand (Unreserved) in the orderpoint '
- 'does not match with the product.')
- move_out.action_assign()
- self.reordering_record.refresh()
- self.assertEqual(self.reordering_record.
- product_location_qty_available_not_res,
- 0.0,
- 'Quantity On Hand (Unreserved) does not match')
- self.assertEqual(self.reordering_record.
- product_location_qty_available_not_res,
- self.product.qty_available_not_res,
- 'Quantity On Hand (Unreserved) in the orderpoint '
- 'does not match with the product.')
diff --git a/stock_warehouse_orderpoint_stock_info_unreserved/views/stock_warehouse_orderpoint_view.xml b/stock_warehouse_orderpoint_stock_info_unreserved/views/stock_warehouse_orderpoint_view.xml
deleted file mode 100644
index 2b7c27b7c..000000000
--- a/stock_warehouse_orderpoint_stock_info_unreserved/views/stock_warehouse_orderpoint_view.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- stock.warehouse.orderpoint.tree
- stock.warehouse.orderpoint
-
-
-
-
-
-
-
-
-
- stock.warehouse.orderpoint.form
- stock.warehouse.orderpoint
-
-
-
-
-
-
-
-
-
-