mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] mrp_warehouse_calendar: Migration to 12.0
This commit is contained in:
committed by
RicardCForgeFlow
parent
09ceb343ff
commit
08c1313fb6
@@ -14,13 +14,13 @@ MRP Warehouse Calendar
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/manufacture/tree/11.0/mrp_warehouse_calendar
|
||||
:target: https://github.com/OCA/manufacture/tree/12.0/mrp_warehouse_calendar
|
||||
:alt: OCA/manufacture
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/manufacture-11-0/manufacture-11-0-mrp_warehouse_calendar
|
||||
:target: https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_warehouse_calendar
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/129/11.0
|
||||
:target: https://runbot.odoo-community.org/runbot/129/12.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -69,7 +69,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/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 <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_warehouse_calendar%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_warehouse_calendar%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -103,10 +103,10 @@ promote its widespread use.
|
||||
:target: https://github.com/jbeficent
|
||||
:alt: jbeficent
|
||||
|
||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`_:
|
||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-jbeficent|
|
||||
|
||||
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/11.0/mrp_warehouse_calendar>`_ project on GitHub.
|
||||
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/12.0/mrp_warehouse_calendar>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"name": "MRP Warehouse Calendar",
|
||||
"summary": "Considers the warehouse calendars in manufacturing",
|
||||
"version": "11.0.1.0.0",
|
||||
"version": "12.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"website": "https://github.com/stock-logistics-warehouse",
|
||||
"author": "Eficent, "
|
||||
|
||||
32
mrp_warehouse_calendar/i18n/de.po
Normal file
32
mrp_warehouse_calendar/i18n/de.po
Normal file
@@ -0,0 +1,32 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * mrp_warehouse_calendar
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2018-12-09 10:43+0000\n"
|
||||
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 3.3\n"
|
||||
|
||||
#. module: mrp_warehouse_calendar
|
||||
#: model:ir.model,name:mrp_warehouse_calendar.model_mrp_production
|
||||
#, fuzzy
|
||||
#| msgid "Manufacturing Order"
|
||||
msgid "Production Order"
|
||||
msgstr "Fertigungsauftrag"
|
||||
|
||||
#. module: mrp_warehouse_calendar
|
||||
#: model:ir.model,name:mrp_warehouse_calendar.model_stock_rule
|
||||
msgid "Stock Rule"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement Rule"
|
||||
#~ msgstr "Beschaffungsregel"
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
@@ -15,11 +15,11 @@ msgstr ""
|
||||
|
||||
#. module: mrp_warehouse_calendar
|
||||
#: model:ir.model,name:mrp_warehouse_calendar.model_mrp_production
|
||||
msgid "Manufacturing Order"
|
||||
msgid "Production Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_warehouse_calendar
|
||||
#: model:ir.model,name:mrp_warehouse_calendar.model_procurement_rule
|
||||
msgid "Procurement Rule"
|
||||
#: model:ir.model,name:mrp_warehouse_calendar.model_stock_rule
|
||||
msgid "Stock Rule"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
from . import mrp_production
|
||||
from . import procurement_rule
|
||||
from . import stock_rule
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2018 Eficent Business and IT Consulting Services, S.L.
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import api, models
|
||||
|
||||
|
||||
class MrpProduction(models.Model):
|
||||
@@ -9,7 +9,7 @@ class MrpProduction(models.Model):
|
||||
|
||||
@api.onchange('date_planned_start', 'product_id')
|
||||
def onchange_date_planned(self):
|
||||
dt_planned = fields.Datetime.from_string(self.date_planned_start)
|
||||
dt_planned = self.date_planned_start
|
||||
warehouse = self.picking_type_id.warehouse_id
|
||||
if warehouse.calendar_id and self.product_id.produce_delay:
|
||||
date_expected_finished = warehouse.calendar_id.plan_days(
|
||||
@@ -19,7 +19,7 @@ class MrpProduction(models.Model):
|
||||
@api.multi
|
||||
def copy(self, default=None):
|
||||
mo = super(MrpProduction, self).copy(default=default)
|
||||
dt_planned = fields.Datetime.from_string(mo.date_planned_start)
|
||||
dt_planned = mo.date_planned_start
|
||||
warehouse = mo.picking_type_id.warehouse_id
|
||||
if warehouse.calendar_id and mo.product_id.produce_delay:
|
||||
date_expected = warehouse.calendar_id.plan_days(
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ProcurementRule(models.Model):
|
||||
_inherit = 'procurement.rule'
|
||||
class StockRule(models.Model):
|
||||
_inherit = 'stock.rule'
|
||||
|
||||
def _get_date_planned(self, product_id, values):
|
||||
date_planned = super(ProcurementRule, self)._get_date_planned(
|
||||
date_planned = super(StockRule, self)._get_date_planned(
|
||||
product_id, values)
|
||||
picking_type = self.picking_type_id or \
|
||||
values['warehouse_id'].manu_type_id
|
||||
dt_planned = fields.Datetime.from_string(values['date_planned'])
|
||||
dt_planned = fields.Datetime.to_datetime(values['date_planned'])
|
||||
warehouse = picking_type.warehouse_id
|
||||
if warehouse.calendar_id and product_id.produce_delay:
|
||||
lead_days = values['company_id'].manufacturing_lead + \
|
||||
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<title>MRP Warehouse Calendar</title>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/manufacture/tree/11.0/mrp_warehouse_calendar"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-11-0/manufacture-11-0-mrp_warehouse_calendar"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/129/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/manufacture/tree/12.0/mrp_warehouse_calendar"><img alt="OCA/manufacture" src="https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/manufacture-12-0/manufacture-12-0-mrp_warehouse_calendar"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/129/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>With this module the manufacturing orders created from procurements consider
|
||||
the calendar assigned to the warehouse of the picking type of the
|
||||
manufacturing order to determine, based on the product’s manufacturing
|
||||
@@ -414,7 +414,7 @@ calendar.</p>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/manufacture/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_warehouse_calendar%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_warehouse_calendar%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -440,7 +440,7 @@ mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/jbeficent"><img alt="jbeficent" src="https://github.com/jbeficent.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/11.0/mrp_warehouse_calendar">OCA/manufacture</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/manufacture/tree/12.0/mrp_warehouse_calendar">OCA/manufacture</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,10 +64,9 @@ class TestMrpWarehouseCalendar(TransactionCase):
|
||||
'Test', values)
|
||||
mo = self.env['mrp.production'].search(
|
||||
[('product_id', '=', self.product.id)], limit=1)
|
||||
date_plan_start = fields.Datetime.from_string(
|
||||
mo.date_planned_start).date()
|
||||
date_plan_start = fields.Date.to_date(mo.date_planned_start)
|
||||
# Friday 4th Jan 2097
|
||||
friday = fields.Datetime.from_string('2097-01-04 09:00:00').date()
|
||||
friday = fields.Date.to_date('2097-01-04 09:00:00')
|
||||
|
||||
self.assertEqual(date_plan_start, friday)
|
||||
|
||||
@@ -81,7 +80,6 @@ class TestMrpWarehouseCalendar(TransactionCase):
|
||||
})
|
||||
mo.date_planned_start = '2097-01-04 09:00:00'
|
||||
mo.onchange_date_planned()
|
||||
date_plan_finished = fields.Datetime.from_string(
|
||||
mo.date_planned_finished).date()
|
||||
monday = fields.Datetime.from_string('2097-01-07 09:00:00').date()
|
||||
date_plan_finished = fields.Date.to_date(mo.date_planned_finished)
|
||||
monday = fields.Date.to_date('2097-01-07 09:00:00')
|
||||
self.assertEqual(date_plan_finished, monday)
|
||||
|
||||
Reference in New Issue
Block a user