[tryton-debian-vcs] tryton-modules-sale-supply branch debian updated. debian/4.2.0-1-2-g915272e
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Jun 7 13:35:59 UTC 2017
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale-supply.git;a=commitdiff;h=debian/4.2.0-1-2-g915272e
commit 915272e1661776a2b65deeacc0fffca2f91ae5ea
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Jun 7 15:27:00 2017 +0200
Merging upstream version 4.4.0.
diff --git a/CHANGELOG b/CHANGELOG
index 4436934..7633150 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.4.0 - 2017-05-01
+* Bug fixes (see mercurial logs for details)
+
Version 4.2.0 - 2016-11-28
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 93ef5be..4f1c2b0 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2011-2016 Cédric Krier.
-Copyright (C) 2011-2016 B2CK SPRL.
+Copyright (C) 2011-2017 Cédric Krier.
+Copyright (C) 2011-2017 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index 25fec31..c665407 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_sale_supply
-Version: 4.2.0
+Version: 4.4.0
Summary: Tryton module for sale supply
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.2/
+Download-URL: http://downloads.tryton.org/4.4/
Description: sale_supply
===========
@@ -51,7 +51,7 @@ Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
Classifier: Natural Language :: Chinese (Simplified)
diff --git a/locale/bg.po b/locale/bg.po
index 0d8e188..b5aa0fc 100644
--- a/locale/bg.po
+++ b/locale/bg.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
#, fuzzy
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
diff --git a/locale/ca.po b/locale/ca.po
index 1cc353d..4e81cb9 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Subministra a la venda"
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr "Línies de venda"
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr "Sol·licitud de compra"
diff --git a/locale/cs.po b/locale/cs.po
index 96d4b90..348d665 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr ""
diff --git a/locale/de.po b/locale/de.po
index 88ed01f..23eb93c 100644
--- a/locale/de.po
+++ b/locale/de.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Beschaffung bei Verkauf"
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr "Verkaufspositionen"
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr "Bestellvorschlag"
diff --git a/locale/es.po b/locale/es.po
index eb0e3a7..c1e5855 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Suministra en la venta"
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr "Líneas de venta"
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr "Solicitud de compra"
diff --git a/locale/es_419.po b/locale/es_419.po
index 96d4b90..348d665 100644
--- a/locale/es_419.po
+++ b/locale/es_419.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr ""
diff --git a/locale/fr.po b/locale/fr.po
index 2346a0a..f0f97b9 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Approvisionnement sur vente"
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr "Lignes de vente"
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr "Demande d'achat"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index f2d3ea7..4da76af 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index ff7d0ee..8e67aa4 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "forniture in vendita"
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr "richiesta di acquisto"
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index 896575f..f6638b5 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
#, fuzzy
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
diff --git a/locale/lo.po b/locale/lo.po
index 5a02036..4a60ae8 100644
--- a/locale/lo.po
+++ b/locale/lo.po
@@ -4,37 +4,40 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
-msgstr ""
+msgstr "ສະໜອງການຂາຍ"
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
-msgstr ""
+msgstr "ສະໜອງການຂາຍ"
+
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr "ລາຍການຂາຍ"
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
-msgstr ""
+msgstr "ຕ້ອງການສັ່ງຊື້"
msgctxt "field:sale.line,purchase_request_state:"
msgid "Purchase Request State"
-msgstr ""
+msgstr "ສະຖານະຕ້ອງການສັ່ງຊື້"
msgctxt "model:ir.action,name:act_purchase_request_form"
msgid "Purchase Requests"
-msgstr ""
+msgstr "ຕ້ອງການສັ່ງຊື້"
msgctxt "selection:sale.line,purchase_request_state:"
msgid ""
-msgstr ""
+msgstr "ຕ້ອງການສັ່ງຊື້"
-#, fuzzy
msgctxt "selection:sale.line,purchase_request_state:"
msgid "Cancel"
msgstr "ຍົກເລີກ"
msgctxt "selection:sale.line,purchase_request_state:"
msgid "Purchased"
-msgstr ""
+msgstr "ສັ່ງຊື້ແລ້ວ"
msgctxt "selection:sale.line,purchase_request_state:"
msgid "Requested"
-msgstr ""
+msgstr "ສັ່ງແລ້ວ"
diff --git a/locale/lt.po b/locale/lt.po
index 96d4b90..348d665 100644
--- a/locale/lt.po
+++ b/locale/lt.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr ""
diff --git a/locale/nl.po b/locale/nl.po
index 81391da..2c1fccb 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr ""
diff --git a/locale/pl.po b/locale/pl.po
index 896575f..f6638b5 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
#, fuzzy
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 0d917fc..9ba947d 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -2,26 +2,29 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-#, fuzzy
msgctxt "field:product.product,supply_on_sale:"
msgid "Supply On Sale"
-msgstr "Suprir Na Venda"
+msgstr "Abastecimento Na Venda"
msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
-msgstr "Suprir Na Venda"
+msgstr "Abastecimento Na Venda"
+
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr "Linhas de Venda"
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
-msgstr "Requisição de Compra"
+msgstr "Pedido de Compra"
msgctxt "field:sale.line,purchase_request_state:"
msgid "Purchase Request State"
-msgstr "Estado da Requisição de Compra"
+msgstr "Estado do Pedido de Compra"
msgctxt "model:ir.action,name:act_purchase_request_form"
msgid "Purchase Requests"
-msgstr "Requisições de Compra"
+msgstr "Pedidos de Compra"
msgctxt "selection:sale.line,purchase_request_state:"
msgid ""
@@ -37,4 +40,4 @@ msgstr "Comprado"
msgctxt "selection:sale.line,purchase_request_state:"
msgid "Requested"
-msgstr "Requisitado"
+msgstr "Solicitado"
diff --git a/locale/ru.po b/locale/ru.po
index df3efae..a9a257b 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
#, fuzzy
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
diff --git a/locale/sl.po b/locale/sl.po
index 22a115c..964012f 100644
--- a/locale/sl.po
+++ b/locale/sl.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr "Dobava ob prodaji"
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr "Prodajne postavke"
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr "Nabavni zahtevek"
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
index 8d28400..3419866 100644
--- a/locale/zh_CN.po
+++ b/locale/zh_CN.po
@@ -10,6 +10,10 @@ msgctxt "field:product.template,supply_on_sale:"
msgid "Supply On Sale"
msgstr ""
+msgctxt "field:purchase.request,sale_lines:"
+msgid "Sale Lines"
+msgstr ""
+
msgctxt "field:sale.line,purchase_request:"
msgid "Purchase Request"
msgstr ""
diff --git a/purchase.py b/purchase.py
index b49bac4..0007229 100644
--- a/purchase.py
+++ b/purchase.py
@@ -2,7 +2,7 @@
# this repository contains the full copyright notices and license terms.
from itertools import chain
-from trytond.model import ModelView, Workflow
+from trytond.model import ModelView, Workflow, fields
from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
from trytond.tools import grouped_slice
@@ -15,6 +15,9 @@ class PurchaseRequest:
__metaclass__ = PoolMeta
__name__ = 'purchase.request'
+ sale_lines = fields.One2Many(
+ 'sale.line', 'purchase_request', "Sale Lines", readonly=True)
+
@classmethod
def _get_origin(cls):
return super(PurchaseRequest, cls)._get_origin() | {'sale.sale'}
@@ -25,17 +28,11 @@ class PurchaseRequest:
Sale = pool.get('sale.sale')
SaleLine = pool.get('sale.line')
- sale_ids = list(set(r.origin.id for r in requests
- if isinstance(r.origin, Sale)))
-
with Transaction().set_context(_check_access=False):
- sale_lines = []
- for sub_requests in grouped_slice(requests):
- sale_lines.append(SaleLine.search([
- ('purchase_request', 'in',
- [r.id for r in sub_requests]),
- ]))
- sale_lines = list(chain(*sale_lines))
+ reqs = cls.browse(requests)
+ sale_ids = list(set(r.origin.id for r in reqs
+ if isinstance(r.origin, Sale)))
+ sale_lines = [l for r in reqs for l in r.sale_lines]
if sale_lines:
SaleLine.write(sale_lines, {
'purchase_request': None,
diff --git a/sale.py b/sale.py
index 842b170..393611b 100644
--- a/sale.py
+++ b/sale.py
@@ -51,9 +51,8 @@ class Sale:
if line.purchase_request_state in ['purchased', 'cancel']:
for move in line.moves:
if move.state == 'staging':
- move.state = 'draft'
moves.append(move)
- Move.save(moves)
+ Move.draft(moves)
shipments = {m.shipment for m in moves
if isinstance(m.shipment, ShipmentOut)}
ShipmentOut.wait(shipments)
diff --git a/sale.xml b/sale.xml
index 45c2582..fb1ab84 100644
--- a/sale.xml
+++ b/sale.xml
@@ -13,7 +13,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">Purchase Requests</field>
<field name="res_model">purchase.request</field>
<field name="domain"
- eval="[('origin.id', 'in', Eval('active_ids'), 'sale.sale')]"
+ eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('origin.id', '=', Eval('active_id', 'sale.sale')), ('origin.id', 'in', Eval('active_ids'), 'sale.sale'))]"
pyson="1"/>
</record>
<record model="ir.action.keyword"
diff --git a/setup.py b/setup.py
index 421b2ee..3fad0a1 100644
--- a/setup.py
+++ b/setup.py
@@ -84,7 +84,7 @@ setup(name=name,
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
- 'License :: OSI Approved :: GNU General Public License (GPL)',
+ 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
'Natural Language :: Chinese (Simplified)',
diff --git a/tryton.cfg b/tryton.cfg
index 03fdcec..86d9952 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.2.0
+version=4.4.0
depends:
ir
purchase
diff --git a/trytond_sale_supply.egg-info/PKG-INFO b/trytond_sale_supply.egg-info/PKG-INFO
index 7a103ae..3ebe626 100644
--- a/trytond_sale_supply.egg-info/PKG-INFO
+++ b/trytond_sale_supply.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-sale-supply
-Version: 4.2.0
+Version: 4.4.0
Summary: Tryton module for sale supply
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.2/
+Download-URL: http://downloads.tryton.org/4.4/
Description: sale_supply
===========
@@ -51,7 +51,7 @@ Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
-Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
Classifier: Natural Language :: Chinese (Simplified)
diff --git a/trytond_sale_supply.egg-info/requires.txt b/trytond_sale_supply.egg-info/requires.txt
index f3abd4c..705711f 100644
--- a/trytond_sale_supply.egg-info/requires.txt
+++ b/trytond_sale_supply.egg-info/requires.txt
@@ -1,5 +1,5 @@
-trytond_purchase >= 4.2, < 4.3
-trytond_purchase_request >= 4.2, < 4.3
-trytond_sale >= 4.2, < 4.3
-trytond_stock >= 4.2, < 4.3
-trytond >= 4.2, < 4.3
+trytond_purchase >= 4.4, < 4.5
+trytond_purchase_request >= 4.4, < 4.5
+trytond_sale >= 4.4, < 4.5
+trytond_stock >= 4.4, < 4.5
+trytond >= 4.4, < 4.5
--
tryton-modules-sale-supply
More information about the tryton-debian-vcs
mailing list