From e9d28ac3f44fc78c944f2c05f1ad5dfd75442bd8 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 30 Dec 2017 14:34:12 +0100 Subject: [PATCH 01/49] OCA Transbot updated translations from Transifex --- stock_request_purchase/i18n/de.po | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 stock_request_purchase/i18n/de.po diff --git a/stock_request_purchase/i18n/de.po b/stock_request_purchase/i18n/de.po new file mode 100644 index 00000000..6cdd24aa --- /dev/null +++ b/stock_request_purchase/i18n/de.po @@ -0,0 +1,59 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_request_purchase +# +# Translators: +# Rudolf Schnapka , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-21 21:59+0000\n" +"PO-Revision-Date: 2017-11-21 21:59+0000\n" +"Last-Translator: Rudolf Schnapka , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids +msgid "Pickings" +msgstr "Kommissionierungen" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_procurement_rule +msgid "Procurement Rule" +msgstr "Beschaffungsregel" + +#. module: stock_request_purchase +#: model:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form +msgid "Purchase" +msgstr "Einkauf" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Bestellposition" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_line_ids +msgid "Purchase Order Lines" +msgstr "Bestellpositionen" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count +msgid "Purchase count" +msgstr "Bestellhäufigkeit" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_request +msgid "Stock Request" +msgstr "Bestandsanforderung" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids +msgid "Stock Requests" +msgstr "Bestandsanforderungen" From 96cda628ee1d98932957505cbb9ccf627f5bcf4a Mon Sep 17 00:00:00 2001 From: Jordi Ballester Date: Mon, 13 Nov 2017 13:15:41 +0100 Subject: [PATCH 02/49] add stock_request in 11.0 --- stock_request_purchase/README.rst | 63 ++++++ stock_request_purchase/__init__.py | 2 + stock_request_purchase/__manifest__.py | 24 +++ stock_request_purchase/models/__init__.py | 5 + .../models/procurement_rule.py | 27 +++ .../models/purchase_order.py | 37 ++++ .../models/purchase_order_line.py | 23 ++ .../models/stock_request.py | 38 ++++ .../security/ir.model.access.csv | 3 + .../static/description/icon.png | Bin 0 -> 4857 bytes stock_request_purchase/tests/__init__.py | 2 + .../tests/test_stock_request_purchase.py | 199 ++++++++++++++++++ .../views/purchase_order_views.xml | 43 ++++ .../views/stock_request_views.xml | 26 +++ 14 files changed, 492 insertions(+) create mode 100644 stock_request_purchase/README.rst create mode 100644 stock_request_purchase/__init__.py create mode 100644 stock_request_purchase/__manifest__.py create mode 100644 stock_request_purchase/models/__init__.py create mode 100644 stock_request_purchase/models/procurement_rule.py create mode 100644 stock_request_purchase/models/purchase_order.py create mode 100644 stock_request_purchase/models/purchase_order_line.py create mode 100644 stock_request_purchase/models/stock_request.py create mode 100644 stock_request_purchase/security/ir.model.access.csv create mode 100644 stock_request_purchase/static/description/icon.png create mode 100644 stock_request_purchase/tests/__init__.py create mode 100644 stock_request_purchase/tests/test_stock_request_purchase.py create mode 100644 stock_request_purchase/views/purchase_order_views.xml create mode 100644 stock_request_purchase/views/stock_request_views.xml diff --git a/stock_request_purchase/README.rst b/stock_request_purchase/README.rst new file mode 100644 index 00000000..045fcb5e --- /dev/null +++ b/stock_request_purchase/README.rst @@ -0,0 +1,63 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +====================== +Stock Request Purchase +====================== + +This module allows for users to be able to display purchase orders that have +been created as a consequence of Stock Requests. + + +Usage +===== + +In case that the confirmation of the Stock Request results in an immediate +Purchase Order, the user will be able to display the PO's from the Stock +Request form view. + + +.. 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/11.0 + + +Known issues / Roadmap +====================== + +* When a Stock Request is cancelled, it does not cancel the quantity included + in the Purchase Order. + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of +trouble, please check there if your issue has already been reported. If you +spotted it first, help us smash it by providing detailed and welcomed feedback. + + +Credits +======= + +Contributors +------------ + +* Jordi Ballester . + +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_request_purchase/__init__.py b/stock_request_purchase/__init__.py new file mode 100644 index 00000000..a9e33722 --- /dev/null +++ b/stock_request_purchase/__init__.py @@ -0,0 +1,2 @@ + +from . import models diff --git a/stock_request_purchase/__manifest__.py b/stock_request_purchase/__manifest__.py new file mode 100644 index 00000000..e1ea7e73 --- /dev/null +++ b/stock_request_purchase/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +{ + "name": "Stock Request Purchase", + "summary": "Internal request for stock", + "version": "11.0.1.0.0", + "license": "LGPL-3", + "website": "https://github.com/stock-logistics-warehouse", + "author": "Eficent, " + "Odoo Community Association (OCA)", + "category": "Warehouse Management", + "depends": [ + "stock_request", + "purchase", + "purchase_procurement_run_buy_hook" + ], + "data": [ + "security/ir.model.access.csv", + "views/stock_request_views.xml", + "views/purchase_order_views.xml", + ], + "installable": True, +} diff --git a/stock_request_purchase/models/__init__.py b/stock_request_purchase/models/__init__.py new file mode 100644 index 00000000..ad901b8c --- /dev/null +++ b/stock_request_purchase/models/__init__.py @@ -0,0 +1,5 @@ + +from . import purchase_order +from . import purchase_order_line +from . import procurement_rule +from . import stock_request diff --git a/stock_request_purchase/models/procurement_rule.py b/stock_request_purchase/models/procurement_rule.py new file mode 100644 index 00000000..56a141a5 --- /dev/null +++ b/stock_request_purchase/models/procurement_rule.py @@ -0,0 +1,27 @@ +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import models + + +class ProcurementRule(models.Model): + _inherit = 'procurement.rule' + + def _prepare_purchase_order_line(self, product_id, product_qty, + product_uom, values, po, supplier): + vals = super(ProcurementRule, self)._prepare_purchase_order_line( + product_id, product_qty, product_uom, values, po, supplier) + if 'stock_request_id' in values: + vals['stock_request_ids'] = [(4, values['stock_request_id'])] + return vals + + def _prepare_purchase_order_line_update(self, line, + procurement_uom_po_qty, + price_unit, values): + vals = super(ProcurementRule, + self)._prepare_purchase_order_line_update( + line, procurement_uom_po_qty, price_unit, values + ) + if 'stock_request_id' in values: + vals['stock_request_ids'] = [(4, values['stock_request_id'])] + return vals diff --git a/stock_request_purchase/models/purchase_order.py b/stock_request_purchase/models/purchase_order.py new file mode 100644 index 00000000..38be3f17 --- /dev/null +++ b/stock_request_purchase/models/purchase_order.py @@ -0,0 +1,37 @@ +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import api, fields, models + + +class PurchaseOrder(models.Model): + _inherit = 'purchase.order' + + stock_request_ids = fields.Many2many(comodel_name='stock.request', + string='Stock Requests', + compute='_compute_stock_request_ids') + stock_request_count = fields.Integer('Stock Request #', + compute='_compute_stock_request_ids') + + @api.depends('order_line') + def _compute_stock_request_ids(self): + for rec in self: + rec.stock_request_ids = rec.order_line.mapped('stock_request_ids') + rec.stock_request_count = len(rec.stock_request_ids) + + def action_view_stock_request(self): + """ + :return dict: dictionary value for created view + """ + action = self.env.ref( + 'stock_request.action_stock_request_form').read()[0] + + requests = self.mapped('stock_request_ids') + if len(requests) > 1: + action['domain'] = [('id', 'in', requests.ids)] + elif requests: + action['views'] = [ + (self.env.ref('stock_request.view_stock_request_form').id, + 'form')] + action['res_id'] = requests.id + return action diff --git a/stock_request_purchase/models/purchase_order_line.py b/stock_request_purchase/models/purchase_order_line.py new file mode 100644 index 00000000..26ec9948 --- /dev/null +++ b/stock_request_purchase/models/purchase_order_line.py @@ -0,0 +1,23 @@ +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import api, fields, models + + +class PurchaseOrderLine(models.Model): + _inherit = 'purchase.order.line' + + stock_request_ids = fields.Many2many(comodel_name='stock.request', + string='Stock Requests', copy=False) + + @api.multi + def _prepare_stock_moves(self, picking): + res = super(PurchaseOrderLine, self)._prepare_stock_moves(picking) + + for re in res: + re['allocation_ids'] = [ + (0, 0, { + 'stock_request_id': request.id, + 'requested_product_uom_qty': request.product_qty, + }) for request in self.stock_request_ids] + return res diff --git a/stock_request_purchase/models/stock_request.py b/stock_request_purchase/models/stock_request.py new file mode 100644 index 00000000..e6f82feb --- /dev/null +++ b/stock_request_purchase/models/stock_request.py @@ -0,0 +1,38 @@ +# Copyright 2017 Eficent Business and IT Consulting Services, S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import api, fields, models + + +class StockRequest(models.Model): + _inherit = "stock.request" + + purchase_ids = fields.One2many('purchase.order', + compute='_compute_purchase_ids', + string='Pickings', readonly=True) + purchase_count = fields.Integer(string='Purchase count', + compute='_compute_purchase_ids', + readonly=True) + purchase_line_ids = fields.Many2many('purchase.order.line', + string='Purchase Order Lines', + readonly=True, copy=False) + + @api.depends('purchase_line_ids') + def _compute_purchase_ids(self): + for request in self.sudo(): + request.purchase_ids = request.purchase_line_ids.mapped('order_id') + request.purchase_count = len(request.purchase_ids) + + @api.multi + def action_view_purchase(self): + action = self.env.ref( + 'purchase.purchase_order_action_generic').read()[0] + + purchases = self.mapped('purchase_ids') + if len(purchases) > 1: + action['domain'] = [('id', 'in', purchases.ids)] + elif purchases: + action['views'] = [ + (self.env.ref('purchase.purchase_order_form').id, 'form')] + action['res_id'] = purchases.id + return action diff --git a/stock_request_purchase/security/ir.model.access.csv b/stock_request_purchase/security/ir.model.access.csv new file mode 100644 index 00000000..4aaccb8c --- /dev/null +++ b/stock_request_purchase/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_stock_request_purchase_user,stock.request purchase user,stock_request.model_stock_request,purchase.group_purchase_user,1,0,0,0 +access_stock_request_allocation_purchase_user,stock request allocation purchase user,stock_request.model_stock_request_allocation,purchase.group_purchase_user,1,0,0,0 diff --git a/stock_request_purchase/static/description/icon.png b/stock_request_purchase/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a7c11c7a1e3df3654b45284d5b92ca7c86e56b4e GIT binary patch literal 4857 zcmbVQc{tR4*Pj_ZWn`H!_N74*vXsi!FeuB|!XP7r zP}v3*V+~odGxlZX`RRV%_j%s;{o}o^=elOD-)2fU$QJ(|5OXcD(6m=Mdoe z+3^wxbSz!}GSb9#SA*d;h7cjD~I7Nz5{r%p*qwnRoF^$5o~Njj-~ zCYxDXeyDJ1zolU{?=E$QclQj_IN9};_soN(gN(7AOyFah?kjvL!;xyif-sO~bo>E& zt&d=0LxZ4j9F7I?PZ0zW0z@$a7zzhO5SSAXc_{xb0vcdWKm%C)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IyY@C|sR~mc|rqT6808V^_Iq8+x;F);P!rl14A;+Dwq% zso&Hn@9WYJVEn{7%R+}@j+GsQum1)(~nUt0q1eySc&ICG@;ocCkL5%?r%uqMd0J^>1^mPwwhc|O3sb*W<%KB;Lx=lG0`DWd^R8C9-759|ZA5yo!|nk)3px(`o8-a_$k zE`ltJT}FY=6A{#$B_1 zT~=7~CjVYuN212c{u7{Bq+QS^KVg@xGWXp!L8eafjR#Bi#EXJa?jQFt4-utWs!h|F zO}c@ypI~ntSx;anHlpf2KSk0+pYhGe=G-OdM3ec$&i8MOYPo-9)|vWmb#6rD#a6l0 zE_OARwF#AKKg!mq-<>n+yd8J9vfN+8CL`fai~?O#cpJ5;(4amt%+-FJm2y|~Rd>A_ z_DTtNe;m^XP1FH>-W6hQeOzyNfrwJ$62a^@rCydDG5lnSxCpOT)OQxQ1(P6YC$iH-#_HY(Lh+XZ$hW3CGcXy_>0eIUnDo}_ zMx`6MCxno`rW(EK{HUSoGySaKC>W*5vI+Fc+h%tmDsdld7K++Na0k4U!Z`4v-1**% z%LwWg*7HBO5%~`Nw*PWH4SKdlXK + + + + purchase.order.form + purchase.order + + + + + + + + + + + + + + + purchase.order.line.form2 + purchase.order.line + + + + + + + + + + diff --git a/stock_request_purchase/views/stock_request_views.xml b/stock_request_purchase/views/stock_request_views.xml new file mode 100644 index 00000000..a8a62e40 --- /dev/null +++ b/stock_request_purchase/views/stock_request_views.xml @@ -0,0 +1,26 @@ + + + + + + stock.request.form + stock.request + + +
+ + +
+
+
+ +
From 28b48a512bc390d50bb9610a5c8f33d1fd251005 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 3 Mar 2018 15:44:11 +0100 Subject: [PATCH 03/49] OCA Transbot updated translations from Transifex --- stock_request_purchase/i18n/de.po | 17 +++++++- stock_request_purchase/i18n/es.po | 72 +++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 stock_request_purchase/i18n/es.po diff --git a/stock_request_purchase/i18n/de.po b/stock_request_purchase/i18n/de.po index 6cdd24aa..2f5b9a39 100644 --- a/stock_request_purchase/i18n/de.po +++ b/stock_request_purchase/i18n/de.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-11-21 21:59+0000\n" -"PO-Revision-Date: 2017-11-21 21:59+0000\n" +"POT-Creation-Date: 2018-03-02 03:44+0000\n" +"PO-Revision-Date: 2018-03-02 03:44+0000\n" "Last-Translator: Rudolf Schnapka , 2017\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "MIME-Version: 1.0\n" @@ -33,6 +33,11 @@ msgstr "Beschaffungsregel" msgid "Purchase" msgstr "Einkauf" +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_purchase_order +msgid "Purchase Order" +msgstr "" + #. module: stock_request_purchase #: model:ir.model,name:stock_request_purchase.model_purchase_order_line msgid "Purchase Order Line" @@ -53,7 +58,15 @@ msgstr "Bestellhäufigkeit" msgid "Stock Request" msgstr "Bestandsanforderung" +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_count +msgid "Stock Request #" +msgstr "" + #. module: stock_request_purchase #: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_ids +#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form +#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 msgid "Stock Requests" msgstr "Bestandsanforderungen" diff --git a/stock_request_purchase/i18n/es.po b/stock_request_purchase/i18n/es.po new file mode 100644 index 00000000..b8582c32 --- /dev/null +++ b/stock_request_purchase/i18n/es.po @@ -0,0 +1,72 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_request_purchase +# +# Translators: +# enjolras , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-02 03:44+0000\n" +"PO-Revision-Date: 2018-03-02 03:44+0000\n" +"Last-Translator: enjolras , 2018\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids +msgid "Pickings" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_procurement_rule +msgid "Procurement Rule" +msgstr "Regla de abastecimiento" + +#. module: stock_request_purchase +#: model:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form +msgid "Purchase" +msgstr "Compra" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_purchase_order +msgid "Purchase Order" +msgstr "Pedido de compra" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "Línea de pedido de compra" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_line_ids +msgid "Purchase Order Lines" +msgstr "Líneas de pedido de compra" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count +msgid "Purchase count" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_request +msgid "Stock Request" +msgstr "Solicitud de existencias" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_count +msgid "Stock Request #" +msgstr "Solicitud de existencias #" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_ids +#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form +#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 +msgid "Stock Requests" +msgstr "Solicitudes de existencias" From eedae0841802823e08d040b3e7fa4349c0faace3 Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 19 Mar 2018 16:23:58 +0100 Subject: [PATCH 04/49] [IMP] stock_request_purchase: Remove hook --- stock_request_purchase/__manifest__.py | 3 +-- stock_request_purchase/models/procurement_rule.py | 11 ++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/stock_request_purchase/__manifest__.py b/stock_request_purchase/__manifest__.py index e1ea7e73..f4f4d166 100644 --- a/stock_request_purchase/__manifest__.py +++ b/stock_request_purchase/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Request Purchase", "summary": "Internal request for stock", - "version": "11.0.1.0.0", + "version": "11.0.1.1.0", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", "author": "Eficent, " @@ -13,7 +13,6 @@ "depends": [ "stock_request", "purchase", - "purchase_procurement_run_buy_hook" ], "data": [ "security/ir.model.access.csv", diff --git a/stock_request_purchase/models/procurement_rule.py b/stock_request_purchase/models/procurement_rule.py index 56a141a5..6e85f28e 100644 --- a/stock_request_purchase/models/procurement_rule.py +++ b/stock_request_purchase/models/procurement_rule.py @@ -15,13 +15,10 @@ def _prepare_purchase_order_line(self, product_id, product_qty, vals['stock_request_ids'] = [(4, values['stock_request_id'])] return vals - def _prepare_purchase_order_line_update(self, line, - procurement_uom_po_qty, - price_unit, values): - vals = super(ProcurementRule, - self)._prepare_purchase_order_line_update( - line, procurement_uom_po_qty, price_unit, values - ) + def _update_purchase_order_line(self, product_id, product_qty, product_uom, + values, line, partner): + vals = super(ProcurementRule, self)._update_purchase_order_line( + product_id, product_qty, product_uom, values, line, partner) if 'stock_request_id' in values: vals['stock_request_ids'] = [(4, values['stock_request_id'])] return vals From 8b6290ce302b8f28ff666a4415fdc0f2146ce386 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Tue, 10 Apr 2018 17:54:27 +0200 Subject: [PATCH 05/49] [IMP] stock_request_purchase: Add Stock request orders. Change logo --- stock_request_purchase/README.rst | 1 + stock_request_purchase/__manifest__.py | 3 +- stock_request_purchase/models/__init__.py | 1 + .../models/stock_request.py | 2 +- .../models/stock_request_order.py | 40 ++++++++++ .../static/description/icon.png | Bin 4857 -> 7510 bytes .../tests/test_stock_request_purchase.py | 70 ++++++++++++------ .../views/stock_request_order_views.xml | 26 +++++++ 8 files changed, 118 insertions(+), 25 deletions(-) create mode 100644 stock_request_purchase/models/stock_request_order.py create mode 100644 stock_request_purchase/views/stock_request_order_views.xml diff --git a/stock_request_purchase/README.rst b/stock_request_purchase/README.rst index 045fcb5e..a5552942 100644 --- a/stock_request_purchase/README.rst +++ b/stock_request_purchase/README.rst @@ -46,6 +46,7 @@ Contributors ------------ * Jordi Ballester . +* Enric Tobella Maintainer ---------- diff --git a/stock_request_purchase/__manifest__.py b/stock_request_purchase/__manifest__.py index f4f4d166..f3b2619e 100644 --- a/stock_request_purchase/__manifest__.py +++ b/stock_request_purchase/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Request Purchase", "summary": "Internal request for stock", - "version": "11.0.1.1.0", + "version": "11.0.2.0.0", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", "author": "Eficent, " @@ -17,6 +17,7 @@ "data": [ "security/ir.model.access.csv", "views/stock_request_views.xml", + "views/stock_request_order_views.xml", "views/purchase_order_views.xml", ], "installable": True, diff --git a/stock_request_purchase/models/__init__.py b/stock_request_purchase/models/__init__.py index ad901b8c..b516de04 100644 --- a/stock_request_purchase/models/__init__.py +++ b/stock_request_purchase/models/__init__.py @@ -3,3 +3,4 @@ from . import purchase_order_line from . import procurement_rule from . import stock_request +from . import stock_request_order diff --git a/stock_request_purchase/models/stock_request.py b/stock_request_purchase/models/stock_request.py index e6f82feb..27548e1b 100644 --- a/stock_request_purchase/models/stock_request.py +++ b/stock_request_purchase/models/stock_request.py @@ -9,7 +9,7 @@ class StockRequest(models.Model): purchase_ids = fields.One2many('purchase.order', compute='_compute_purchase_ids', - string='Pickings', readonly=True) + string='Purchase Orders', readonly=True) purchase_count = fields.Integer(string='Purchase count', compute='_compute_purchase_ids', readonly=True) diff --git a/stock_request_purchase/models/stock_request_order.py b/stock_request_purchase/models/stock_request_order.py new file mode 100644 index 00000000..c752e77d --- /dev/null +++ b/stock_request_purchase/models/stock_request_order.py @@ -0,0 +1,40 @@ +# Copyright 2018 Creu Blanca +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import api, fields, models + + +class StockRequestOrder(models.Model): + _inherit = 'stock.request.order' + + purchase_ids = fields.One2many('purchase.order', + compute='_compute_purchase_ids', + string='Purchase Orders', readonly=True) + purchase_count = fields.Integer(string='Purchase count', + compute='_compute_purchase_ids', + readonly=True) + purchase_line_ids = fields.Many2many('purchase.order.line', + compute='_compute_purchase_ids', + string='Purchase Order Lines', + readonly=True, copy=False) + + @api.depends('stock_request_ids') + def _compute_purchase_ids(self): + for req in self.sudo(): + req.purchase_ids = req.stock_request_ids.mapped('purchase_ids') + req.purchase_line_ids = req.stock_request_ids.mapped( + 'purchase_line_ids') + req.purchase_count = len(req.purchase_ids) + + @api.multi + def action_view_purchase(self): + action = self.env.ref( + 'purchase.purchase_order_action_generic').read()[0] + purchases = self.mapped('purchase_ids') + if len(purchases) > 1: + action['domain'] = [('id', 'in', purchases.ids)] + elif purchases: + action['views'] = [ + (self.env.ref('purchase.purchase_order_form').id, 'form')] + action['res_id'] = purchases.id + return action diff --git a/stock_request_purchase/static/description/icon.png b/stock_request_purchase/static/description/icon.png index a7c11c7a1e3df3654b45284d5b92ca7c86e56b4e..c31ecfd9f58e3ab7e0ede0f1d56185d51074099c 100644 GIT binary patch literal 7510 zcmc(EWmJ@1^e>%52uPRGih$(MgCO0ggp`5|B{d@mNQ_8#3k>ywA}tIxq)OKSQUU@3 z!VD!6gEaTS_r2?X@2C6mu359rv(Da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l0 zE_OARwF#AKKg!mq-<>n+yd8J9vfN+8CL`fai~?O#cpJ5;(4amt%+-FJm2y|~Rd>A_ z_DTtNe;m^XP1FH>-W6hQeOzyNfrwJ$62a^@rCydDG5lnSxCpOT)OQxQ1(P6YC$iH-#_HY(Lh+XZ$hW3CGcXy_>0eIUnDo}_ zMx`6MCxno`rW(EK{HUSoGySaKC>W*5vI+Fc+h%tmDsdld7K++Na0k4U!Z`4v-1**% z%LwWg*7HBO5%~`Nw*PWH4SKdlXK + + + + + stock.request.order.form + stock.request.order + + +
+ + +
+
+
+ +
From ac2847858460ff59f9ea98edc933b0d5c4ae1ec1 Mon Sep 17 00:00:00 2001 From: mreficent Date: Wed, 11 Apr 2018 17:21:15 +0200 Subject: [PATCH 06/49] [FIX] Various fixes: - Error with the sequence number. - Visible texts that should be in uppercases. - order_id should only be visible if group_stock_request_order option is enabled. - adds more tests - adds consistency between models company-wise --- stock_request_purchase/models/purchase_order_line.py | 12 +++++++++++- stock_request_purchase/models/stock_request.py | 11 ++++++++++- .../tests/test_stock_request_purchase.py | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/stock_request_purchase/models/purchase_order_line.py b/stock_request_purchase/models/purchase_order_line.py index 26ec9948..d5ab0dca 100644 --- a/stock_request_purchase/models/purchase_order_line.py +++ b/stock_request_purchase/models/purchase_order_line.py @@ -1,7 +1,8 @@ # Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -from odoo import api, fields, models +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError class PurchaseOrderLine(models.Model): @@ -21,3 +22,12 @@ def _prepare_stock_moves(self, picking): 'requested_product_uom_qty': request.product_qty, }) for request in self.stock_request_ids] return res + + @api.constrains('stock_request_ids') + def _check_purchase_company_constrains(self): + if any(any(req.company_id != pol.company_id for + req in pol.stock_request_ids) for pol in self): + raise ValidationError( + _('You cannot link a purchase order line ' + 'to a stock request that belongs to ' + 'another company.')) diff --git a/stock_request_purchase/models/stock_request.py b/stock_request_purchase/models/stock_request.py index 27548e1b..b162cf1e 100644 --- a/stock_request_purchase/models/stock_request.py +++ b/stock_request_purchase/models/stock_request.py @@ -1,7 +1,8 @@ # Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -from odoo import api, fields, models +from odoo import api, fields, models, _ +from odoo.exceptions import ValidationError class StockRequest(models.Model): @@ -23,6 +24,14 @@ def _compute_purchase_ids(self): request.purchase_ids = request.purchase_line_ids.mapped('order_id') request.purchase_count = len(request.purchase_ids) + @api.constrains('purchase_line_ids', 'company_id') + def _check_purchase_company_constrains(self): + if any(any(line.company_id != req.company_id for + line in req.purchase_line_ids) for req in self): + raise ValidationError( + _('You have linked to a purchase order line ' + 'that belongs to another company.')) + @api.multi def action_view_purchase(self): action = self.env.ref( diff --git a/stock_request_purchase/tests/test_stock_request_purchase.py b/stock_request_purchase/tests/test_stock_request_purchase.py index 1e7d6f4b..809fd0b9 100644 --- a/stock_request_purchase/tests/test_stock_request_purchase.py +++ b/stock_request_purchase/tests/test_stock_request_purchase.py @@ -105,6 +105,8 @@ def test_create_request_01(self): self.assertEqual(order.stock_request_ids.qty_in_progress, 0.0) purchase = order.sudo().purchase_ids[0] + self.assertEqual(purchase.company_id, + order.stock_request_ids[0].company_id) purchase.button_confirm() picking = purchase.picking_ids[0] picking.action_confirm() From f9074f458d8a384778d09600ac034d6cc6b914d3 Mon Sep 17 00:00:00 2001 From: Jordi Ballester Alomar Date: Wed, 25 Apr 2018 19:22:17 +0200 Subject: [PATCH 07/49] various fixes --- stock_request_purchase/__manifest__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/stock_request_purchase/__manifest__.py b/stock_request_purchase/__manifest__.py index f3b2619e..6f1ea386 100644 --- a/stock_request_purchase/__manifest__.py +++ b/stock_request_purchase/__manifest__.py @@ -21,4 +21,5 @@ "views/purchase_order_views.xml", ], "installable": True, + 'auto_install': True, } From 3e5a63cd0401a8012cf08852e802286b52ca1f01 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Fri, 27 Apr 2018 10:04:26 +0200 Subject: [PATCH 08/49] [IMP] simplify queries --- stock_request_purchase/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_request_purchase/__manifest__.py b/stock_request_purchase/__manifest__.py index 6f1ea386..97f317d8 100644 --- a/stock_request_purchase/__manifest__.py +++ b/stock_request_purchase/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Request Purchase", "summary": "Internal request for stock", - "version": "11.0.2.0.0", + "version": "11.0.2.0.1", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", "author": "Eficent, " From fec51143ff332e0437bdb257677bf8ae5c567b90 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Thu, 21 Jun 2018 13:48:24 +0000 Subject: [PATCH 09/49] [UPD] Update stock_request_purchase.pot --- stock_request_purchase/i18n/de.po | 43 +++++++-- stock_request_purchase/i18n/es.po | 40 +++++++-- .../i18n/stock_request_purchase.pot | 89 +++++++++++++++++++ 3 files changed, 158 insertions(+), 14 deletions(-) create mode 100644 stock_request_purchase/i18n/stock_request_purchase.pot diff --git a/stock_request_purchase/i18n/de.po b/stock_request_purchase/i18n/de.po index 2f5b9a39..bb9910e2 100644 --- a/stock_request_purchase/i18n/de.po +++ b/stock_request_purchase/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_request_purchase -# +# # Translators: # Rudolf Schnapka , 2017 msgid "" @@ -12,23 +12,19 @@ msgstr "" "PO-Revision-Date: 2018-03-02 03:44+0000\n" "Last-Translator: Rudolf Schnapka , 2017\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids -msgid "Pickings" -msgstr "Kommissionierungen" - #. module: stock_request_purchase #: model:ir.model,name:stock_request_purchase.model_procurement_rule msgid "Procurement Rule" msgstr "Beschaffungsregel" #. module: stock_request_purchase +#: model:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form #: model:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form msgid "Purchase" msgstr "Einkauf" @@ -44,11 +40,20 @@ msgid "Purchase Order Line" msgstr "Bestellposition" #. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_line_ids #: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_line_ids msgid "Purchase Order Lines" msgstr "Bestellpositionen" #. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids +#, fuzzy +msgid "Purchase Orders" +msgstr "Bestellpositionen" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_count #: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count msgid "Purchase count" msgstr "Bestellhäufigkeit" @@ -63,6 +68,12 @@ msgstr "Bestandsanforderung" msgid "Stock Request #" msgstr "" +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_request_order +#, fuzzy +msgid "Stock Request Order" +msgstr "Bestandsanforderung" + #. module: stock_request_purchase #: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids #: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_ids @@ -70,3 +81,21 @@ msgstr "" #: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 msgid "Stock Requests" msgstr "Bestandsanforderungen" + +#. module: stock_request_purchase +#: code:addons/stock_request_purchase/models/purchase_order_line.py:31 +#, python-format +msgid "" +"You cannot link a purchase order line to a stock request that belongs to " +"another company." +msgstr "" + +#. module: stock_request_purchase +#: code:addons/stock_request_purchase/models/stock_request.py:32 +#, python-format +msgid "" +"You have linked to a purchase order line that belongs to another company." +msgstr "" + +#~ msgid "Pickings" +#~ msgstr "Kommissionierungen" diff --git a/stock_request_purchase/i18n/es.po b/stock_request_purchase/i18n/es.po index b8582c32..916f77ba 100644 --- a/stock_request_purchase/i18n/es.po +++ b/stock_request_purchase/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_request_purchase -# +# # Translators: # enjolras , 2018 msgid "" @@ -12,23 +12,19 @@ msgstr "" "PO-Revision-Date: 2018-03-02 03:44+0000\n" "Last-Translator: enjolras , 2018\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids -msgid "Pickings" -msgstr "" - #. module: stock_request_purchase #: model:ir.model,name:stock_request_purchase.model_procurement_rule msgid "Procurement Rule" msgstr "Regla de abastecimiento" #. module: stock_request_purchase +#: model:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form #: model:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form msgid "Purchase" msgstr "Compra" @@ -44,11 +40,20 @@ msgid "Purchase Order Line" msgstr "Línea de pedido de compra" #. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_line_ids #: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_line_ids msgid "Purchase Order Lines" msgstr "Líneas de pedido de compra" #. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids +#, fuzzy +msgid "Purchase Orders" +msgstr "Pedido de compra" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_count #: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count msgid "Purchase count" msgstr "" @@ -63,6 +68,12 @@ msgstr "Solicitud de existencias" msgid "Stock Request #" msgstr "Solicitud de existencias #" +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_request_order +#, fuzzy +msgid "Stock Request Order" +msgstr "Solicitud de existencias #" + #. module: stock_request_purchase #: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids #: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_ids @@ -70,3 +81,18 @@ msgstr "Solicitud de existencias #" #: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 msgid "Stock Requests" msgstr "Solicitudes de existencias" + +#. module: stock_request_purchase +#: code:addons/stock_request_purchase/models/purchase_order_line.py:31 +#, python-format +msgid "" +"You cannot link a purchase order line to a stock request that belongs to " +"another company." +msgstr "" + +#. module: stock_request_purchase +#: code:addons/stock_request_purchase/models/stock_request.py:32 +#, python-format +msgid "" +"You have linked to a purchase order line that belongs to another company." +msgstr "" diff --git a/stock_request_purchase/i18n/stock_request_purchase.pot b/stock_request_purchase/i18n/stock_request_purchase.pot new file mode 100644 index 00000000..d874b204 --- /dev/null +++ b/stock_request_purchase/i18n/stock_request_purchase.pot @@ -0,0 +1,89 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_request_purchase +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \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_request_purchase +#: model:ir.model,name:stock_request_purchase.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form +#: model:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form +msgid "Purchase" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_line_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_line_ids +msgid "Purchase Order Lines" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids +msgid "Purchase Orders" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count +msgid "Purchase count" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_request +msgid "Stock Request" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_count +msgid "Stock Request #" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_request_order +msgid "Stock Request Order" +msgstr "" + +#. module: stock_request_purchase +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_ids +#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form +#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 +msgid "Stock Requests" +msgstr "" + +#. module: stock_request_purchase +#: code:addons/stock_request_purchase/models/purchase_order_line.py:31 +#, python-format +msgid "You cannot link a purchase order line to a stock request that belongs to another company." +msgstr "" + +#. module: stock_request_purchase +#: code:addons/stock_request_purchase/models/stock_request.py:32 +#, python-format +msgid "You have linked to a purchase order line that belongs to another company." +msgstr "" + From 1ac5fb2feafa42253da1675efcfd3145fcadee6e Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 5 Sep 2018 11:30:08 +0000 Subject: [PATCH 10/49] Translated using Weblate (Spanish) Currently translated at 100,0% (13 of 13 strings) Translation: stock-logistics-warehouse-11.0/stock-logistics-warehouse-11.0-stock_request_purchase Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_request_purchase/es/ --- stock_request_purchase/i18n/es.po | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/stock_request_purchase/i18n/es.po b/stock_request_purchase/i18n/es.po index 916f77ba..a56cffc9 100644 --- a/stock_request_purchase/i18n/es.po +++ b/stock_request_purchase/i18n/es.po @@ -9,14 +9,15 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-03-02 03:44+0000\n" -"PO-Revision-Date: 2018-03-02 03:44+0000\n" -"Last-Translator: enjolras , 2018\n" +"PO-Revision-Date: 2018-09-05 11:32+0000\n" +"Last-Translator: Enric Tobella \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\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" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.1.1\n" #. module: stock_request_purchase #: model:ir.model,name:stock_request_purchase.model_procurement_rule @@ -48,15 +49,14 @@ msgstr "Líneas de pedido de compra" #. module: stock_request_purchase #: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_ids #: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids -#, fuzzy msgid "Purchase Orders" -msgstr "Pedido de compra" +msgstr "Pedidos de compras" #. module: stock_request_purchase #: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_count #: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count msgid "Purchase count" -msgstr "" +msgstr "# de Compras" #. module: stock_request_purchase #: model:ir.model,name:stock_request_purchase.model_stock_request @@ -70,9 +70,8 @@ msgstr "Solicitud de existencias #" #. module: stock_request_purchase #: model:ir.model,name:stock_request_purchase.model_stock_request_order -#, fuzzy msgid "Stock Request Order" -msgstr "Solicitud de existencias #" +msgstr "Pedido de existencias" #. module: stock_request_purchase #: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids @@ -89,6 +88,8 @@ msgid "" "You cannot link a purchase order line to a stock request that belongs to " "another company." msgstr "" +"No puede unir una línea de un pedido de compras a una solicitud de " +"existencias que pertenece a otra compañía." #. module: stock_request_purchase #: code:addons/stock_request_purchase/models/stock_request.py:32 @@ -96,3 +97,4 @@ msgstr "" msgid "" "You have linked to a purchase order line that belongs to another company." msgstr "" +"Ha seleccionada una línea de pedido de compras que pertenece a otra compañía." From e3407f69848287fc5331826c2642d2c81fe66536 Mon Sep 17 00:00:00 2001 From: Kitti U Date: Wed, 26 Jun 2019 17:39:08 +0700 Subject: [PATCH 11/49] [12.0][MIG] stock_request_purchase --- stock_request_purchase/README.rst | 64 ------------------- stock_request_purchase/__manifest__.py | 2 +- stock_request_purchase/models/__init__.py | 2 +- .../models/purchase_order_line.py | 8 +-- .../{procurement_rule.py => stock_rule.py} | 8 +-- .../readme/CONTRIBUTORS.rst | 3 + stock_request_purchase/readme/DESCRIPTION.rst | 2 + stock_request_purchase/readme/ROADMAP.rst | 2 + stock_request_purchase/readme/USAGE.rst | 3 + .../tests/test_stock_request_purchase.py | 6 +- 10 files changed, 23 insertions(+), 77 deletions(-) delete mode 100644 stock_request_purchase/README.rst rename stock_request_purchase/models/{procurement_rule.py => stock_rule.py} (79%) create mode 100644 stock_request_purchase/readme/CONTRIBUTORS.rst create mode 100644 stock_request_purchase/readme/DESCRIPTION.rst create mode 100644 stock_request_purchase/readme/ROADMAP.rst create mode 100644 stock_request_purchase/readme/USAGE.rst diff --git a/stock_request_purchase/README.rst b/stock_request_purchase/README.rst deleted file mode 100644 index a5552942..00000000 --- a/stock_request_purchase/README.rst +++ /dev/null @@ -1,64 +0,0 @@ -.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg - :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html - :alt: License: LGPL-3 - -====================== -Stock Request Purchase -====================== - -This module allows for users to be able to display purchase orders that have -been created as a consequence of Stock Requests. - - -Usage -===== - -In case that the confirmation of the Stock Request results in an immediate -Purchase Order, the user will be able to display the PO's from the Stock -Request form view. - - -.. 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/11.0 - - -Known issues / Roadmap -====================== - -* When a Stock Request is cancelled, it does not cancel the quantity included - in the Purchase Order. - - -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues -`_. In case of -trouble, please check there if your issue has already been reported. If you -spotted it first, help us smash it by providing detailed and welcomed feedback. - - -Credits -======= - -Contributors ------------- - -* Jordi Ballester . -* Enric Tobella - -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_request_purchase/__manifest__.py b/stock_request_purchase/__manifest__.py index 97f317d8..d5e35fff 100644 --- a/stock_request_purchase/__manifest__.py +++ b/stock_request_purchase/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Request Purchase", "summary": "Internal request for stock", - "version": "11.0.2.0.1", + "version": "12.0.1.0.0", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", "author": "Eficent, " diff --git a/stock_request_purchase/models/__init__.py b/stock_request_purchase/models/__init__.py index b516de04..c7cdbaa7 100644 --- a/stock_request_purchase/models/__init__.py +++ b/stock_request_purchase/models/__init__.py @@ -1,6 +1,6 @@ from . import purchase_order from . import purchase_order_line -from . import procurement_rule +from . import stock_rule from . import stock_request from . import stock_request_order diff --git a/stock_request_purchase/models/purchase_order_line.py b/stock_request_purchase/models/purchase_order_line.py index d5ab0dca..6c419346 100644 --- a/stock_request_purchase/models/purchase_order_line.py +++ b/stock_request_purchase/models/purchase_order_line.py @@ -27,7 +27,7 @@ def _prepare_stock_moves(self, picking): def _check_purchase_company_constrains(self): if any(any(req.company_id != pol.company_id for req in pol.stock_request_ids) for pol in self): - raise ValidationError( - _('You cannot link a purchase order line ' - 'to a stock request that belongs to ' - 'another company.')) + raise ValidationError( + _('You cannot link a purchase order line ' + 'to a stock request that belongs to ' + 'another company.')) diff --git a/stock_request_purchase/models/procurement_rule.py b/stock_request_purchase/models/stock_rule.py similarity index 79% rename from stock_request_purchase/models/procurement_rule.py rename to stock_request_purchase/models/stock_rule.py index 6e85f28e..182428fd 100644 --- a/stock_request_purchase/models/procurement_rule.py +++ b/stock_request_purchase/models/stock_rule.py @@ -4,12 +4,12 @@ from odoo import models -class ProcurementRule(models.Model): - _inherit = 'procurement.rule' +class StockRule(models.Model): + _inherit = 'stock.rule' def _prepare_purchase_order_line(self, product_id, product_qty, product_uom, values, po, supplier): - vals = super(ProcurementRule, self)._prepare_purchase_order_line( + vals = super(StockRule, self)._prepare_purchase_order_line( product_id, product_qty, product_uom, values, po, supplier) if 'stock_request_id' in values: vals['stock_request_ids'] = [(4, values['stock_request_id'])] @@ -17,7 +17,7 @@ def _prepare_purchase_order_line(self, product_id, product_qty, def _update_purchase_order_line(self, product_id, product_qty, product_uom, values, line, partner): - vals = super(ProcurementRule, self)._update_purchase_order_line( + vals = super(StockRule, self)._update_purchase_order_line( product_id, product_qty, product_uom, values, line, partner) if 'stock_request_id' in values: vals['stock_request_ids'] = [(4, values['stock_request_id'])] diff --git a/stock_request_purchase/readme/CONTRIBUTORS.rst b/stock_request_purchase/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..f8eb686a --- /dev/null +++ b/stock_request_purchase/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Jordi Ballester . +* Enric Tobella +* Kitti Upariphutthiphong diff --git a/stock_request_purchase/readme/DESCRIPTION.rst b/stock_request_purchase/readme/DESCRIPTION.rst new file mode 100644 index 00000000..19deddba --- /dev/null +++ b/stock_request_purchase/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows for users to be able to display purchase orders that have +been created as a consequence of Stock Requests. diff --git a/stock_request_purchase/readme/ROADMAP.rst b/stock_request_purchase/readme/ROADMAP.rst new file mode 100644 index 00000000..24b3106d --- /dev/null +++ b/stock_request_purchase/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +* When a Stock Request is cancelled, it does not cancel the quantity included + in the Purchase Order. diff --git a/stock_request_purchase/readme/USAGE.rst b/stock_request_purchase/readme/USAGE.rst new file mode 100644 index 00000000..290342f5 --- /dev/null +++ b/stock_request_purchase/readme/USAGE.rst @@ -0,0 +1,3 @@ +In case that the confirmation of the Stock Request results in an immediate +Purchase Order, the user will be able to display the PO's from the Stock +Request form view. diff --git a/stock_request_purchase/tests/test_stock_request_purchase.py b/stock_request_purchase/tests/test_stock_request_purchase.py index 809fd0b9..e79bffbe 100644 --- a/stock_request_purchase/tests/test_stock_request_purchase.py +++ b/stock_request_purchase/tests/test_stock_request_purchase.py @@ -19,7 +19,7 @@ def setUp(self): self.env.ref('stock_request.group_stock_request_manager') self.main_company = self.env.ref('base.main_company') self.warehouse = self.env.ref('stock.warehouse0') - self.categ_unit = self.env.ref('product.product_uom_categ_unit') + self.categ_unit = self.env.ref('uom.product_uom_categ_unit') # common data self.company_2 = self.env['res.company'].create({ @@ -42,7 +42,7 @@ def setUp(self): }) self.product = self._create_product('SH', 'Shoes', False) - self.uom_dozen = self.env['product.uom'].create({ + self.uom_dozen = self.env['uom.uom'].create({ 'name': 'Test-DozenA', 'category_id': self.categ_unit.id, 'factor_inv': 12, @@ -64,7 +64,7 @@ def _create_product(self, default_code, name, company_id): return self.env['product.product'].create({ 'name': name, 'default_code': default_code, - 'uom_id': self.env.ref('product.product_uom_unit').id, + 'uom_id': self.env.ref('uom.product_uom_unit').id, 'company_id': company_id, 'type': 'product', 'route_ids': [(6, 0, self.route_buy.ids)], From 537d222137c51aa206ed4eefaa43835378f4eb40 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Mon, 1 Jul 2019 16:10:02 +0000 Subject: [PATCH 12/49] [UPD] Update stock_request_purchase.pot --- .../i18n/stock_request_purchase.pot | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/stock_request_purchase/i18n/stock_request_purchase.pot b/stock_request_purchase/i18n/stock_request_purchase.pot index d874b204..acff5e75 100644 --- a/stock_request_purchase/i18n/stock_request_purchase.pot +++ b/stock_request_purchase/i18n/stock_request_purchase.pot @@ -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" @@ -14,13 +14,8 @@ msgstr "" "Plural-Forms: \n" #. module: stock_request_purchase -#: model:ir.model,name:stock_request_purchase.model_procurement_rule -msgid "Procurement Rule" -msgstr "" - -#. module: stock_request_purchase -#: model:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form -#: model:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form msgid "Purchase" msgstr "" @@ -35,20 +30,20 @@ msgid "Purchase Order Line" msgstr "" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_line_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_line_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_line_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_line_ids msgid "Purchase Order Lines" msgstr "" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_ids msgid "Purchase Orders" msgstr "" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_count -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_count msgid "Purchase count" msgstr "" @@ -58,7 +53,7 @@ msgid "Stock Request" msgstr "" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order__stock_request_count msgid "Stock Request #" msgstr "" @@ -68,13 +63,18 @@ msgid "Stock Request Order" msgstr "" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_ids -#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form -#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order__stock_request_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line__stock_request_ids +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 msgid "Stock Requests" msgstr "" +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_rule +msgid "Stock Rule" +msgstr "" + #. module: stock_request_purchase #: code:addons/stock_request_purchase/models/purchase_order_line.py:31 #, python-format From 9fee1ea5abf14827ac81411d2add911a42b67160 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 1 Jul 2019 16:53:56 +0000 Subject: [PATCH 13/49] [UPD] README.rst --- stock_request_purchase/README.rst | 89 ++++ .../static/description/index.html | 437 ++++++++++++++++++ 2 files changed, 526 insertions(+) create mode 100644 stock_request_purchase/README.rst create mode 100644 stock_request_purchase/static/description/index.html diff --git a/stock_request_purchase/README.rst b/stock_request_purchase/README.rst new file mode 100644 index 00000000..9cead3e7 --- /dev/null +++ b/stock_request_purchase/README.rst @@ -0,0 +1,89 @@ +====================== +Stock Request Purchase +====================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_request_purchase + :alt: OCA/stock-logistics-warehouse +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_purchase + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/153/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows for users to be able to display purchase orders that have +been created as a consequence of Stock Requests. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +In case that the confirmation of the Stock Request results in an immediate +Purchase Order, the user will be able to display the PO's from the Stock +Request form view. + +Known issues / Roadmap +====================== + +* When a Stock Request is cancelled, it does not cancel the quantity included + in the Purchase Order. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Eficent + +Contributors +~~~~~~~~~~~~ + +* Jordi Ballester . +* Enric Tobella +* Kitti Upariphutthiphong + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_request_purchase/static/description/index.html b/stock_request_purchase/static/description/index.html new file mode 100644 index 00000000..19471859 --- /dev/null +++ b/stock_request_purchase/static/description/index.html @@ -0,0 +1,437 @@ + + + + + + +Stock Request Purchase + + + +
+

Stock Request Purchase

+ + +

Beta License: LGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

+

This module allows for users to be able to display purchase orders that have +been created as a consequence of Stock Requests.

+

Table of contents

+ +
+

Usage

+

In case that the confirmation of the Stock Request results in an immediate +Purchase Order, the user will be able to display the PO’s from the Stock +Request form view.

+
+
+

Known issues / Roadmap

+
    +
  • When a Stock Request is cancelled, it does not cancel the quantity included +in the Purchase Order.
  • +
+
+
+

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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Eficent
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

This module is part of the OCA/stock-logistics-warehouse project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + From a20482f3843ea97ac51f29ca31641ade38b762c0 Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Mon, 15 Jul 2019 13:40:02 +0200 Subject: [PATCH 14/49] [FIX] stock_request_purchase: remove sudo --- stock_request_purchase/models/stock_request.py | 2 +- stock_request_purchase/models/stock_request_order.py | 2 +- stock_request_purchase/views/purchase_order_views.xml | 5 +++-- stock_request_purchase/views/stock_request_order_views.xml | 3 ++- stock_request_purchase/views/stock_request_views.xml | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/stock_request_purchase/models/stock_request.py b/stock_request_purchase/models/stock_request.py index b162cf1e..a3c58888 100644 --- a/stock_request_purchase/models/stock_request.py +++ b/stock_request_purchase/models/stock_request.py @@ -20,7 +20,7 @@ class StockRequest(models.Model): @api.depends('purchase_line_ids') def _compute_purchase_ids(self): - for request in self.sudo(): + for request in self: request.purchase_ids = request.purchase_line_ids.mapped('order_id') request.purchase_count = len(request.purchase_ids) diff --git a/stock_request_purchase/models/stock_request_order.py b/stock_request_purchase/models/stock_request_order.py index c752e77d..74fc2512 100644 --- a/stock_request_purchase/models/stock_request_order.py +++ b/stock_request_purchase/models/stock_request_order.py @@ -20,7 +20,7 @@ class StockRequestOrder(models.Model): @api.depends('stock_request_ids') def _compute_purchase_ids(self): - for req in self.sudo(): + for req in self: req.purchase_ids = req.stock_request_ids.mapped('purchase_ids') req.purchase_line_ids = req.stock_request_ids.mapped( 'purchase_line_ids') diff --git a/stock_request_purchase/views/purchase_order_views.xml b/stock_request_purchase/views/purchase_order_views.xml index 9a64dcf3..1c088548 100644 --- a/stock_request_purchase/views/purchase_order_views.xml +++ b/stock_request_purchase/views/purchase_order_views.xml @@ -6,6 +6,7 @@ purchase.order.form purchase.order + diff --git a/stock_request_purchase/views/stock_request_views.xml b/stock_request_purchase/views/stock_request_views.xml index a8a62e40..00704ffa 100644 --- a/stock_request_purchase/views/stock_request_views.xml +++ b/stock_request_purchase/views/stock_request_views.xml @@ -7,6 +7,7 @@ stock.request.form stock.request +
@@ -14,8 +15,7 @@ name="action_view_purchase" class="oe_stat_button" icon="fa-truck" - attrs="{'invisible': [('purchase_count', '=', 0)]}" - groups="purchase.group_purchase_user"> + attrs="{'invisible': [('purchase_count', '=', 0)]}"> From 62d82486e1f924d7be634a5dbf7108c25ad49ba9 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 16 Jul 2019 11:13:05 +0000 Subject: [PATCH 15/49] stock_request_purchase 12.0.1.1.0 --- stock_request_purchase/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_request_purchase/__manifest__.py b/stock_request_purchase/__manifest__.py index d5e35fff..e0a1b1f1 100644 --- a/stock_request_purchase/__manifest__.py +++ b/stock_request_purchase/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Request Purchase", "summary": "Internal request for stock", - "version": "12.0.1.0.0", + "version": "12.0.1.1.0", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", "author": "Eficent, " From 7d6b285f79abce4917513f8eb5cd1ea738443923 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 20 Jul 2019 12:02:02 +0000 Subject: [PATCH 16/49] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-12.0/stock-logistics-warehouse-12.0-stock_request_purchase Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_purchase/ --- stock_request_purchase/i18n/de.po | 41 +++++++++++++++++-------------- stock_request_purchase/i18n/es.po | 41 +++++++++++++++++-------------- 2 files changed, 46 insertions(+), 36 deletions(-) diff --git a/stock_request_purchase/i18n/de.po b/stock_request_purchase/i18n/de.po index bb9910e2..441ee146 100644 --- a/stock_request_purchase/i18n/de.po +++ b/stock_request_purchase/i18n/de.po @@ -19,13 +19,8 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_request_purchase -#: model:ir.model,name:stock_request_purchase.model_procurement_rule -msgid "Procurement Rule" -msgstr "Beschaffungsregel" - -#. module: stock_request_purchase -#: model:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form -#: model:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form msgid "Purchase" msgstr "Einkauf" @@ -40,21 +35,21 @@ msgid "Purchase Order Line" msgstr "Bestellposition" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_line_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_line_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_line_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_line_ids msgid "Purchase Order Lines" msgstr "Bestellpositionen" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_ids #, fuzzy msgid "Purchase Orders" msgstr "Bestellpositionen" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_count -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_count msgid "Purchase count" msgstr "Bestellhäufigkeit" @@ -64,7 +59,7 @@ msgid "Stock Request" msgstr "Bestandsanforderung" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order__stock_request_count msgid "Stock Request #" msgstr "" @@ -75,13 +70,20 @@ msgid "Stock Request Order" msgstr "Bestandsanforderung" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_ids -#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form -#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order__stock_request_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line__stock_request_ids +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 msgid "Stock Requests" msgstr "Bestandsanforderungen" +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_rule +#, fuzzy +#| msgid "Stock Request" +msgid "Stock Rule" +msgstr "Bestandsanforderung" + #. module: stock_request_purchase #: code:addons/stock_request_purchase/models/purchase_order_line.py:31 #, python-format @@ -97,5 +99,8 @@ msgid "" "You have linked to a purchase order line that belongs to another company." msgstr "" +#~ msgid "Procurement Rule" +#~ msgstr "Beschaffungsregel" + #~ msgid "Pickings" #~ msgstr "Kommissionierungen" diff --git a/stock_request_purchase/i18n/es.po b/stock_request_purchase/i18n/es.po index a56cffc9..f7a5df8e 100644 --- a/stock_request_purchase/i18n/es.po +++ b/stock_request_purchase/i18n/es.po @@ -20,13 +20,8 @@ msgstr "" "X-Generator: Weblate 3.1.1\n" #. module: stock_request_purchase -#: model:ir.model,name:stock_request_purchase.model_procurement_rule -msgid "Procurement Rule" -msgstr "Regla de abastecimiento" - -#. module: stock_request_purchase -#: model:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form -#: model:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.stock_request_order_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.view_stock_request_form msgid "Purchase" msgstr "Compra" @@ -41,20 +36,20 @@ msgid "Purchase Order Line" msgstr "Línea de pedido de compra" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_line_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_line_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_line_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_line_ids msgid "Purchase Order Lines" msgstr "Líneas de pedido de compra" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_ids msgid "Purchase Orders" msgstr "Pedidos de compras" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order_purchase_count -#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_purchase_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request__purchase_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_stock_request_order__purchase_count msgid "Purchase count" msgstr "# de Compras" @@ -64,7 +59,7 @@ msgid "Stock Request" msgstr "Solicitud de existencias" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_count +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order__stock_request_count msgid "Stock Request #" msgstr "Solicitud de existencias #" @@ -74,13 +69,20 @@ msgid "Stock Request Order" msgstr "Pedido de existencias" #. module: stock_request_purchase -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line_stock_request_ids -#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_stock_request_ids -#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form -#: model:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order__stock_request_ids +#: model:ir.model.fields,field_description:stock_request_purchase.field_purchase_order_line__stock_request_ids +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.purchase_order_form +#: model_terms:ir.ui.view,arch_db:stock_request_purchase.purchase_order_line_form2 msgid "Stock Requests" msgstr "Solicitudes de existencias" +#. module: stock_request_purchase +#: model:ir.model,name:stock_request_purchase.model_stock_rule +#, fuzzy +#| msgid "Stock Request" +msgid "Stock Rule" +msgstr "Solicitud de existencias" + #. module: stock_request_purchase #: code:addons/stock_request_purchase/models/purchase_order_line.py:31 #, python-format @@ -98,3 +100,6 @@ msgid "" "You have linked to a purchase order line that belongs to another company." msgstr "" "Ha seleccionada una línea de pedido de compras que pertenece a otra compañía." + +#~ msgid "Procurement Rule" +#~ msgstr "Regla de abastecimiento" From 511752420d9e6fd708f1818c8188189570b93980 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 29 Jul 2019 03:43:10 +0000 Subject: [PATCH 17/49] [UPD] README.rst --- stock_request_purchase/static/description/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_request_purchase/static/description/index.html b/stock_request_purchase/static/description/index.html index 19471859..5213302f 100644 --- a/stock_request_purchase/static/description/index.html +++ b/stock_request_purchase/static/description/index.html @@ -3,7 +3,7 @@ - + Stock Request Purchase