[tryton-debian-vcs] tryton-modules-sale-shipment-cost branch debian updated. debian/4.2.1-1-1-g32a161f

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Jun 7 13:35:42 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-shipment-cost.git;a=commitdiff;h=debian/4.2.1-1-1-g32a161f

commit 32a161fe0485ef88ef93c04b75d19b4bf42dbbbc
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jun 7 15:26:58 2017 +0200

    Merging upstream version 4.4.0.

diff --git a/CHANGELOG b/CHANGELOG
index aa50405..f652b59 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 4.2.1 - 2017-03-10
+Version 4.4.0 - 2017-05-01
 * Bug fixes (see mercurial logs for details)
 
 Version 4.2.0 - 2016-11-28
diff --git a/PKG-INFO b/PKG-INFO
index 6674df9..1d6db58 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_sale_shipment_cost
-Version: 4.2.1
+Version: 4.4.0
 Summary: Tryton module for sale shipment cost
 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: trytond_sale_shipment_cost
         ==========================
         
@@ -52,7 +52,7 @@ Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Financial and Insurance Industry
 Classifier: Intended Audience :: Legal Industry
 Classifier: Intended Audience :: Manufacturing
-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/__init__.py b/__init__.py
index d27e065..50ec960 100644
--- a/__init__.py
+++ b/__init__.py
@@ -9,6 +9,7 @@ from .stock import *
 def register():
     Pool.register(
         Configuration,
+        ConfigurationSaleMethod,
         Sale,
         SaleLine,
         ShipmentOut,
diff --git a/doc/index.rst b/doc/index.rst
index b0679de..b1f2451 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -9,7 +9,7 @@ Two new fields are added to *Sale* and *Sale Configuration*:
 - *Shipment Cost Method*: The method used to compute the cost.
 
     - *On Order*: The cost will be computed once for the sale.
-    - *On Shipment*: The cost will be compted for each shipments.
+    - *On Shipment*: The cost will be computed for each shipments.
 
 At the quotation if a carrier is selected a new line is appended with the
 shipment cost but the added line can be modified when going back to draft.
diff --git a/locale/bg.po b/locale/bg.po
index 2536e13..33328fe 100644
--- a/locale/bg.po
+++ b/locale/bg.po
@@ -10,6 +10,11 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr "Начин на остойностяване на доставка на продажба"
 
+#, fuzzy
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Начин на остойностяване на доставка на продажба"
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr "Стойност на пратка"
@@ -46,14 +51,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Ред от разход от фактура"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr "За поръчка"
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "За пратка"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr "За поръчка"
diff --git a/locale/ca.po b/locale/ca.po
index 44c2029..a0fb4a5 100644
--- a/locale/ca.po
+++ b/locale/ca.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr "Mètode de cost enviament"
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Mètode de cost de l'enviament"
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr "Cost d'enviament"
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Cost de la línia de factura"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr "Al processar"
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "Al enviar-ho"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr "Al processar"
diff --git a/locale/cs.po b/locale/cs.po
index 0b53c50..7c60a8c 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/de.po b/locale/de.po
index 268ccd6..66be41f 100644
--- a/locale/de.po
+++ b/locale/de.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr "Lieferposten Kostenmethode Verkauf"
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Lieferposten Kostenmethode Verkauf"
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr "Lieferposten Kosten"
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Rechnungsposition Kosten"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr "Pro Auftrag"
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "Pro Lieferposten"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr "Pro Auftrag"
diff --git a/locale/es.po b/locale/es.po
index 517e8e7..6bcb98a 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr "Método de coste envío"
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Método de coste envío"
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr "Coste de envío"
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Coste de la línea de factura"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr "En el pedido"
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "En el albarán"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr "En el pedido"
diff --git a/locale/es_419.po b/locale/es_419.po
index bd698d7..af4dbdf 100644
--- a/locale/es_419.po
+++ b/locale/es_419.po
@@ -10,6 +10,11 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr "Método de costo de envío de venta"
 
+#, fuzzy
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Método de costo de envío de venta"
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr "Costo de envío"
@@ -46,14 +51,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Línea de factura de costo"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "En el envío"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/fr.po b/locale/fr.po
index 3e022f2..ff53d73 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr "Méthode de coût de l'expédition de vente"
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Méthode de coût de l'expédition de vente"
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr "Coût d'expédition"
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Ligne de facture du coût"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr "À la commande"
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "À l'expédition"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr "À la commande"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index 21b1c7f..dac8ec7 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -47,14 +51,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 1d6ac7b..de76c31 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -10,6 +10,11 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr "Metodo costo di spedizione per vendita"
 
+#, fuzzy
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Metodo costo di spedizione per vendita"
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr "costo di spedizione"
@@ -46,14 +51,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Riga fattura costo"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr "su Ordine"
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "su Spedizione"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr "su Ordine"
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index 0b53c50..7c60a8c 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/lo.po b/locale/lo.po
index 0b53c50..7c60a8c 100644
--- a/locale/lo.po
+++ b/locale/lo.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/lt.po b/locale/lt.po
index 0b53c50..7c60a8c 100644
--- a/locale/lt.po
+++ b/locale/lt.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/nl.po b/locale/nl.po
index 0b53c50..7c60a8c 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/pl.po b/locale/pl.po
index 0b53c50..7c60a8c 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 0868e5e..c1a07fd 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -8,7 +8,11 @@ msgstr "A \"Conta de Receitas\" está faltando para o produto \"%s\"."
 
 msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
-msgstr "Método de custo da remessa ao cliente"
+msgstr "Método de Custo da Remessa ao Cliente"
+
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Método de Custo da Remessa de Venda"
 
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
@@ -16,7 +20,7 @@ msgstr "Custo de remessa"
 
 msgctxt "field:sale.sale,available_carriers:"
 msgid "Available Carriers"
-msgstr ""
+msgstr "Transportadoras disponíveis"
 
 msgctxt "field:sale.sale,carrier:"
 msgid "Carrier"
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Linha de custo da fatura"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr "No pedido"
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "No pedido"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr "No pedido"
diff --git a/locale/ru.po b/locale/ru.po
index 80d47a4..4533a3a 100644
--- a/locale/ru.po
+++ b/locale/ru.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -47,14 +51,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/locale/sl.po b/locale/sl.po
index 909269f..41f581e 100644
--- a/locale/sl.po
+++ b/locale/sl.po
@@ -10,13 +10,17 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr "Obračun odpreme"
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr "Obračun odpreme"
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr "Strošek dostave"
 
 msgctxt "field:sale.sale,available_carriers:"
 msgid "Available Carriers"
-msgstr ""
+msgstr "Razpoložljivi špediterji"
 
 msgctxt "field:sale.sale,carrier:"
 msgid "Carrier"
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr "Postavka stroška"
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr "Po nalogu"
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr "Po odpremi"
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr "Po nalogu"
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
index 0b53c50..7c60a8c 100644
--- a/locale/zh_CN.po
+++ b/locale/zh_CN.po
@@ -10,6 +10,10 @@ msgctxt "field:sale.configuration,sale_shipment_cost_method:"
 msgid "Sale Shipment Cost Method"
 msgstr ""
 
+msgctxt "field:sale.configuration.sale_method,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
 msgctxt "field:sale.line,shipment_cost:"
 msgid "Shipment Cost"
 msgstr ""
@@ -46,14 +50,6 @@ msgctxt "field:stock.shipment.out,cost_invoice_line:"
 msgid "Cost Invoice Line"
 msgstr ""
 
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Order"
-msgstr ""
-
-msgctxt "selection:sale.configuration,sale_shipment_cost_method:"
-msgid "On Shipment"
-msgstr ""
-
 msgctxt "selection:sale.sale,shipment_cost_method:"
 msgid "On Order"
 msgstr ""
diff --git a/sale.py b/sale.py
index cbb1512..572f10b 100644
--- a/sale.py
+++ b/sale.py
@@ -1,27 +1,73 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
+from trytond import backend
 from trytond.model import ModelView, Workflow, fields
 from trytond.transaction import Transaction
-from trytond.pyson import Eval, Bool, If
+from trytond.pyson import Eval, If
 from trytond.pool import Pool, PoolMeta
 
-__all__ = ['Configuration', 'Sale', 'SaleLine']
+__all__ = ['Configuration', 'ConfigurationSaleMethod', 'Sale', 'SaleLine']
+sale_shipment_cost_method = fields.Selection(
+        'get_sale_shipment_cost_methods', "Sale Shipment Cost Method")
+
+
+def get_sale_methods(field_name):
+    @classmethod
+    def func(cls):
+        pool = Pool()
+        Sale = pool.get('sale.sale')
+        return Sale.fields_get([field_name])[field_name]['selection']
+    return func
 
 
 class Configuration:
     __metaclass__ = PoolMeta
     __name__ = 'sale.configuration'
-    sale_shipment_cost_method = fields.Property(fields.Selection([
-                ('order', 'On Order'),
-                ('shipment', 'On Shipment'),
-                ], 'Sale Shipment Cost Method',
-            states={
-                'required': Bool(Eval('context', {}).get('company')),
-                }))
+    sale_shipment_cost_method = fields.MultiValue(sale_shipment_cost_method)
+    get_sale_shipment_cost_methods = get_sale_methods('shipment_cost_method')
 
-    @staticmethod
-    def default_sale_shipment_cost_method():
-        return 'shipment'
+    @classmethod
+    def multivalue_model(cls, field):
+        pool = Pool()
+        if field == 'sale_shipment_cost_method':
+            return pool.get('sale.configuration.sale_method')
+        return super(Configuration, cls).multivalue_model(field)
+
+    @classmethod
+    def default_sale_shipment_cost_method(cls, **pattern):
+        return cls.multivalue_model(
+            'sale_shipment_cost_method').default_sale_shipment_cost_method()
+
+
+class ConfigurationSaleMethod:
+    __metaclass__ = PoolMeta
+    __name__ = 'sale.configuration.sale_method'
+    sale_shipment_cost_method = sale_shipment_cost_method
+    get_sale_shipment_cost_methods = get_sale_methods('shipment_cost_method')
+
+    @classmethod
+    def __register__(cls, module_name):
+        TableHandler = backend.get('TableHandler')
+        exist = TableHandler.table_exist(cls._table)
+        if exist:
+            table = TableHandler(cls, module_name)
+            exist &= table.column_exist('sale_shipment_cost_method')
+
+        super(ConfigurationSaleMethod, cls).__register__(module_name)
+
+        if not exist:
+            cls._migrate_property([], [], [])
+
+    @classmethod
+    def _migrate_property(cls, field_names, value_names, fields):
+        field_names.append('sale_shipment_cost_method')
+        value_names.append('sale_shipment_cost_method')
+        super(ConfigurationSaleMethod, cls)._migrate_property(
+            field_names, value_names, fields)
+
+    @classmethod
+    def default_sale_shipment_cost_method(cls):
+        return 'order'
 
 
 class Sale:
@@ -115,9 +161,14 @@ class Sale:
     @ModelView.button
     @Workflow.transition('quotation')
     def quote(cls, sales):
+        pool = Pool()
+        Line = pool.get('sale.line')
+
         super(Sale, cls).quote(sales)
+        removed = []
         for sale in sales:
-            sale.set_shipment_cost()
+            removed.extend(sale.set_shipment_cost())
+        Line.delete(removed)
         cls.save(sales)
 
     def _get_carrier_context(self):
@@ -146,6 +197,7 @@ class Sale:
                     self.currency)
             cost_line = self.get_shipment_cost_line(cost)
 
+        removed = []
         lines = list(self.lines or [])
         for line in self.lines:
             if line.type != 'line' or not line.shipment_cost:
@@ -154,9 +206,11 @@ class Sale:
                 cost_line = None
             else:
                 lines.remove(line)
+                removed.append(line)
         if cost_line:
             lines.append(cost_line)
         self.lines = lines
+        return removed
 
     def get_shipment_cost_line(self, cost):
         pool = Pool()
diff --git a/sale.xml b/sale.xml
index 09a800d..2c2699a 100644
--- a/sale.xml
+++ b/sale.xml
@@ -25,11 +25,4 @@ this repository contains the full copyright notices and license terms. -->
         </record>
 
     </data>
-    <data noupdate="1">
-        <record model="ir.property" id="property_sale_shipment_cost_method">
-            <field name="field"
-                search="[('model.model', '=', 'sale.configuration'), ('name', '=', 'sale_shipment_cost_method')]" />
-            <field name="value">,order</field>
-        </record>
-    </data>
 </tryton>
diff --git a/setup.py b/setup.py
index 30d8252..3fd6815 100644
--- a/setup.py
+++ b/setup.py
@@ -87,7 +87,7 @@ setup(name=name,
         'Intended Audience :: Financial and Insurance Industry',
         'Intended Audience :: Legal Industry',
         'Intended Audience :: Manufacturing',
-        '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 8a47096..7d15f25 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.1
+version=4.4.0
 depends:
     account_invoice
     carrier
diff --git a/trytond_sale_shipment_cost.egg-info/PKG-INFO b/trytond_sale_shipment_cost.egg-info/PKG-INFO
index ccc8f33..297258c 100644
--- a/trytond_sale_shipment_cost.egg-info/PKG-INFO
+++ b/trytond_sale_shipment_cost.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-sale-shipment-cost
-Version: 4.2.1
+Version: 4.4.0
 Summary: Tryton module for sale shipment cost
 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: trytond_sale_shipment_cost
         ==========================
         
@@ -52,7 +52,7 @@ Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Financial and Insurance Industry
 Classifier: Intended Audience :: Legal Industry
 Classifier: Intended Audience :: Manufacturing
-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_shipment_cost.egg-info/requires.txt b/trytond_sale_shipment_cost.egg-info/requires.txt
index ee14637..2c49639 100644
--- a/trytond_sale_shipment_cost.egg-info/requires.txt
+++ b/trytond_sale_shipment_cost.egg-info/requires.txt
@@ -1,6 +1,6 @@
-trytond_account_invoice >= 4.2, < 4.3
-trytond_carrier >= 4.2, < 4.3
-trytond_currency >= 4.2, < 4.3
-trytond_sale >= 4.2, < 4.3
-trytond_stock >= 4.2, < 4.3
-trytond >= 4.2, < 4.3
+trytond_account_invoice >= 4.4, < 4.5
+trytond_carrier >= 4.4, < 4.5
+trytond_currency >= 4.4, < 4.5
+trytond_sale >= 4.4, < 4.5
+trytond_stock >= 4.4, < 4.5
+trytond >= 4.4, < 4.5
-- 
tryton-modules-sale-shipment-cost



More information about the tryton-debian-vcs mailing list