[tryton-debian-vcs] tryton-modules-sale-shipment-cost branch debian updated. debian/3.8.0-2-4-g4a823f5
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Thu Jun 2 16:26:44 UTC 2016
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/3.8.0-2-4-g4a823f5
commit 4a823f51bc7ce412b1524fc176fd508538b04a8b
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Jun 1 21:47:32 2016 +0200
Releasing debian version 4.0.0-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 685cffc..9bf28cc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-sale-shipment-cost (4.0.0-1) unstable; urgency=medium
+
+ * Updating signing-key.asc with the actual upstream maintainer keys.
+ * Merging upstream version 4.0.0.
+ * Updating the copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Mon, 30 May 2016 19:31:22 +0200
+
tryton-modules-sale-shipment-cost (3.8.0-2) unstable; urgency=medium
* Updating to standards version 3.9.7, no changes needed.
commit 660da027a638303ffdc331ed514b16ced277d357
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri May 27 19:01:03 2016 +0200
Updating the copyright file.
diff --git a/debian/copyright b/debian/copyright
index 90d529f..4e87fd8 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,15 +1,15 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
-Copyright: 2011-2015 Cédric Krier
+Copyright: 2011-2016 Cédric Krier
2011-2013 Bertrand Chenal
2011-2015 Nicolas Évrard
- 2011-2015 B2CK SPRL
+ 2011-2016 B2CK SPRL
License: GPL-3+
Files: debian/*
Copyright: 2009-2012 Daniel Baumann <daniel at debian.org>
- 2012-2015 Mathias Behrle <mathiasb at m9s.biz>
+ 2012-2016 Mathias Behrle <mathiasb at m9s.biz>
License: GPL-3+
License: GPL-3+
commit 6c057b259a54c61f12001982a16a3357c4069c39
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri May 27 18:26:17 2016 +0200
Merging upstream version 4.0.0.
diff --git a/CHANGELOG b/CHANGELOG
index 91d234a..b1e4f3a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 4.0.0 - 2016-05-02
+* Bug fixes (see mercurial logs for details)
+* Add Python3 support
+
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 501e672..b8eb554 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
-Copyright (C) 2011-2015 Cédric Krier.
+Copyright (C) 2011-2016 Cédric Krier.
Copyright (C) 2011-2013 Bertrand Chenal.
Copyright (C) 2011-2015 Nicolas Évrard.
-Copyright (C) 2011-2015 B2CK SPRL.
+Copyright (C) 2011-2016 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 22a303f..7f38c65 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_sale_shipment_cost
-Version: 3.8.0
+Version: 4.0.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/3.8/
+Download-URL: http://downloads.tryton.org/4.0/
Description: trytond_sale_shipment_cost
==========================
@@ -55,6 +55,7 @@ Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
+Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
@@ -68,6 +69,9 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/locale/lo_LA.po b/locale/lo_LA.po
new file mode 100644
index 0000000..ee9d41e
--- /dev/null
+++ b/locale/lo_LA.po
@@ -0,0 +1,63 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:stock.shipment.out:"
+msgid "Missing \"Account Revenue\" on product \"%s\"."
+msgstr ""
+
+msgctxt "field:sale.configuration,sale_carrier:"
+msgid "Carrier"
+msgstr ""
+
+msgctxt "field:sale.configuration,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
+msgctxt "field:sale.line,shipment_cost:"
+msgid "Shipment Cost"
+msgstr ""
+
+msgctxt "field:sale.sale,carrier:"
+msgid "Carrier"
+msgstr ""
+
+msgctxt "field:sale.sale,shipment_cost_method:"
+msgid "Shipment Cost Method"
+msgstr ""
+
+msgctxt "field:stock.shipment.out,carrier:"
+msgid "Carrier"
+msgstr ""
+
+msgctxt "field:stock.shipment.out,cost:"
+msgid "Cost"
+msgstr ""
+
+msgctxt "field:stock.shipment.out,cost_currency:"
+msgid "Cost Currency"
+msgstr ""
+
+msgctxt "field:stock.shipment.out,cost_currency_digits:"
+msgid "Cost Currency Digits"
+msgstr ""
+
+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 ""
+
+msgctxt "selection:sale.sale,shipment_cost_method:"
+msgid "On Shipment"
+msgstr ""
diff --git a/locale/zh_CN.po b/locale/zh_CN.po
new file mode 100644
index 0000000..ee9d41e
--- /dev/null
+++ b/locale/zh_CN.po
@@ -0,0 +1,63 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:stock.shipment.out:"
+msgid "Missing \"Account Revenue\" on product \"%s\"."
+msgstr ""
+
+msgctxt "field:sale.configuration,sale_carrier:"
+msgid "Carrier"
+msgstr ""
+
+msgctxt "field:sale.configuration,sale_shipment_cost_method:"
+msgid "Sale Shipment Cost Method"
+msgstr ""
+
+msgctxt "field:sale.line,shipment_cost:"
+msgid "Shipment Cost"
+msgstr ""
+
+msgctxt "field:sale.sale,carrier:"
+msgid "Carrier"
+msgstr ""
+
+msgctxt "field:sale.sale,shipment_cost_method:"
+msgid "Shipment Cost Method"
+msgstr ""
+
+msgctxt "field:stock.shipment.out,carrier:"
+msgid "Carrier"
+msgstr ""
+
+msgctxt "field:stock.shipment.out,cost:"
+msgid "Cost"
+msgstr ""
+
+msgctxt "field:stock.shipment.out,cost_currency:"
+msgid "Cost Currency"
+msgstr ""
+
+msgctxt "field:stock.shipment.out,cost_currency_digits:"
+msgid "Cost Currency Digits"
+msgstr ""
+
+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 ""
+
+msgctxt "selection:sale.sale,shipment_cost_method:"
+msgid "On Shipment"
+msgstr ""
diff --git a/sale.py b/sale.py
index d02a4fe..5550ba1 100644
--- a/sale.py
+++ b/sale.py
@@ -6,10 +6,10 @@ from trytond.pyson import Eval, Bool
from trytond.pool import Pool, PoolMeta
__all__ = ['Configuration', 'Sale', 'SaleLine']
-__metaclass__ = PoolMeta
class Configuration:
+ __metaclass__ = PoolMeta
__name__ = 'sale.configuration'
sale_carrier = fields.Property(fields.Many2One('carrier', 'Carrier',
domain=[('carrier_product.salable', '=', True)],
@@ -28,6 +28,7 @@ class Configuration:
class Sale:
+ __metaclass__ = PoolMeta
__name__ = 'sale.sale'
carrier = fields.Many2One('carrier', 'Carrier',
domain=[('carrier_product.salable', '=', True)],
@@ -143,23 +144,13 @@ class Sale:
})
return shipments
- def _get_invoice_line_sale_line(self, invoice_type):
- result = super(Sale, self)._get_invoice_line_sale_line(invoice_type)
- if self.shipment_cost_method == 'shipment':
- for line in self.lines:
- if line.id in result and line.shipment_cost:
- del result[line.id]
- return result
-
- def create_invoice(self, invoice_type):
+ def create_invoice(self):
pool = Pool()
Invoice = pool.get('account.invoice')
Shipment = pool.get('stock.shipment.out')
- invoice = super(Sale, self).create_invoice(invoice_type)
- if (invoice
- and invoice_type == 'out_invoice'
- and self.shipment_cost_method == 'shipment'):
+ invoice = super(Sale, self).create_invoice()
+ if invoice and self.shipment_cost_method == 'shipment':
for shipment in self.shipments:
if (shipment.state == 'done'
and shipment.carrier
@@ -178,6 +169,14 @@ class Sale:
class SaleLine:
+ __metaclass__ = PoolMeta
__name__ = 'sale.line'
shipment_cost = fields.Numeric('Shipment Cost',
digits=(16, Eval('_parent_sale', {}).get('currency_digits', 2)))
+
+ def _get_invoice_line_quantity(self):
+ quantity = super(SaleLine, self)._get_invoice_line_quantity()
+ if (self.shipment_cost
+ and self.sale.shipment_cost_method == 'shipment'):
+ return 0
+ return quantity
diff --git a/sale.xml b/sale.xml
index dadeba1..a7be683 100644
--- a/sale.xml
+++ b/sale.xml
@@ -5,7 +5,7 @@ this repository contains the full copyright notices and license terms. -->
<data>
<record model="ir.ui.view" id="sale_configuration_view_form">
<field name="model">sale.configuration</field>
- <field name="type">form</field>
+ <field name="type" eval="None"/>
<field name="inherit" ref="sale.sale_configuration_view_form"/>
<field name="name">configuration_form</field>
</record>
@@ -18,14 +18,14 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="sale_view_form">
<field name="model">sale.sale</field>
- <field name="type">form</field>
+ <field name="type" eval="None"/>
<field name="inherit" ref="sale.sale_view_form"/>
<field name="name">sale_form</field>
</record>
<record model="ir.ui.view" id="sale_line_view_tree_sequence">
<field name="model">sale.line</field>
- <field name="type">tree</field>
+ <field name="type" eval="None"/>
<field name="inherit" ref="sale.sale_line_view_tree_sequence"/>
<field name="name">sale_line_tree_sequence</field>
</record>
diff --git a/setup.py b/setup.py
index 9680c2b..4355890 100644
--- a/setup.py
+++ b/setup.py
@@ -5,11 +5,17 @@
from setuptools import setup
import re
import os
-import ConfigParser
+import io
+try:
+ from configparser import ConfigParser
+except ImportError:
+ from ConfigParser import ConfigParser
def read(fname):
- return open(os.path.join(os.path.dirname(__file__), fname)).read()
+ return io.open(
+ os.path.join(os.path.dirname(__file__), fname),
+ 'r', encoding='utf-8').read()
def get_require_version(name):
@@ -21,7 +27,7 @@ def get_require_version(name):
major_version, minor_version + 1)
return require
-config = ConfigParser.ConfigParser()
+config = ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):
@@ -43,7 +49,7 @@ if minor_version % 2:
requires = []
for dep in info.get('depends', []):
- if not re.match(r'(ir|res|webdav)(\W|$)', dep):
+ if not re.match(r'(ir|res)(\W|$)', dep):
requires.append(get_require_version('trytond_%s' % dep))
requires.append(get_require_version('trytond'))
@@ -84,6 +90,7 @@ setup(name=name,
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: Bulgarian',
'Natural Language :: Catalan',
+ 'Natural Language :: Chinese (Simplified)',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
@@ -97,6 +104,9 @@ setup(name=name,
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Office/Business',
@@ -114,4 +124,8 @@ setup(name=name,
test_suite='tests',
test_loader='trytond.test_loader:Loader',
tests_require=tests_require,
+ use_2to3=True,
+ convert_2to3_doctests=[
+ 'tests/scenario_sale_shipment_cost.rst',
+ ],
)
diff --git a/stock.py b/stock.py
index 69518c6..1a4e95e 100644
--- a/stock.py
+++ b/stock.py
@@ -6,10 +6,10 @@ from trytond.transaction import Transaction
from trytond.pool import Pool, PoolMeta
__all__ = ['ShipmentOut']
-__metaclass__ = PoolMeta
class ShipmentOut:
+ __metaclass__ = PoolMeta
__name__ = 'stock.shipment.out'
carrier = fields.Many2One('carrier', 'Carrier', states={
'readonly': ~Eval('state').in_(['draft', 'waiting', 'assigned',
@@ -89,6 +89,7 @@ class ShipmentOut:
invoice_line = InvoiceLine()
product = self.carrier.carrier_product
invoice_line.type = 'line'
+ invoice_line.product = product
party = invoice.party
party_context = {}
diff --git a/stock.xml b/stock.xml
index 6297cb1..30e3cf3 100644
--- a/stock.xml
+++ b/stock.xml
@@ -5,7 +5,7 @@ this repository contains the full copyright notices and license terms. -->
<data>
<record model="ir.ui.view" id="shipment_out_view_form">
<field name="model">stock.shipment.out</field>
- <field name="type">form</field>
+ <field name="type" eval="None"/>
<field name="inherit" ref="stock.shipment_out_view_form"/>
<field name="name">shipment_out_form</field>
</record>
diff --git a/tests/__init__.py b/tests/__init__.py
index 2b2fb9a..b46cd94 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,6 +1,9 @@
# 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 .test_sale_shipment_cost import suite
+try:
+ from trytond.modules.sale_shipment_cost.tests.test_sale_shipment_cost import suite
+except ImportError:
+ from .test_sale_shipment_cost import suite
__all__ = ['suite']
diff --git a/tests/scenario_sale_shipment_cost.rst b/tests/scenario_sale_shipment_cost.rst
index 166f555..824e53e 100644
--- a/tests/scenario_sale_shipment_cost.rst
+++ b/tests/scenario_sale_shipment_cost.rst
@@ -12,7 +12,7 @@ Imports::
... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
... create_chart, get_accounts
- >>> from.trytond.modules.account_invoice.tests.tools import \
+ >>> from trytond.modules.account_invoice.tests.tools import \
... set_fiscalyear_invoice_sequences, create_payment_term
>>> today = datetime.date.today()
@@ -61,12 +61,6 @@ Create customer::
>>> customer = Party(name='Customer')
>>> customer.save()
-Create category::
-
- >>> ProductCategory = Model.get('product.category')
- >>> category = ProductCategory(name='Category')
- >>> category.save()
-
Create product::
>>> ProductUom = Model.get('product.uom')
@@ -76,11 +70,10 @@ Create product::
>>> product = Product()
>>> template = ProductTemplate()
>>> template.name = 'Product'
- >>> template.category = category
>>> template.default_uom = unit
>>> template.type = 'goods'
>>> template.salable = True
- >>> template.delivery_time = 0
+ >>> template.lead_time = datetime.timedelta(0)
>>> template.list_price = Decimal('20')
>>> template.cost_price = Decimal('8')
>>> template.account_revenue = revenue
@@ -90,11 +83,10 @@ Create product::
>>> carrier_product = Product()
>>> carrier_template = ProductTemplate()
>>> carrier_template.name = 'Carrier Product'
- >>> carrier_template.category = category
>>> carrier_template.default_uom = unit
>>> carrier_template.type = 'service'
>>> carrier_template.salable = True
- >>> carrier_template.delivery_time = 0
+ >>> carrier_template.lead_time = datetime.timedelta(0)
>>> carrier_template.list_price = Decimal('3')
>>> carrier_template.cost_price = Decimal(0)
>>> carrier_template.account_revenue = revenue
@@ -176,6 +168,9 @@ Check customer invoice::
>>> sale.reload()
>>> invoice, = sale.invoices
+ >>> sorted([l.product.id for l in invoice.lines]) == \
+ ... sorted([product.id, carrier_product.id])
+ True
>>> invoice.untaxed_amount
Decimal('83.00')
diff --git a/tests/test_sale_shipment_cost.py b/tests/test_sale_shipment_cost.py
index 2626d01..efeaa91 100644
--- a/tests/test_sale_shipment_cost.py
+++ b/tests/test_sale_shipment_cost.py
@@ -5,6 +5,7 @@ import doctest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import doctest_setup, doctest_teardown
+from trytond.tests.test_tryton import doctest_checker
class SaleShipmentCostTestCase(ModuleTestCase):
@@ -18,5 +19,6 @@ def suite():
SaleShipmentCostTestCase))
suite.addTests(doctest.DocFileSuite('scenario_sale_shipment_cost.rst',
setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
+ checker=doctest_checker,
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
return suite
diff --git a/tryton.cfg b/tryton.cfg
index b18e98a..8346aa8 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.8.0
+version=4.0.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 634c56a..a0fe7e1 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: 3.8.0
+Version: 4.0.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/3.8/
+Download-URL: http://downloads.tryton.org/4.0/
Description: trytond_sale_shipment_cost
==========================
@@ -55,6 +55,7 @@ Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
+Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
@@ -68,6 +69,9 @@ Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
diff --git a/trytond_sale_shipment_cost.egg-info/SOURCES.txt b/trytond_sale_shipment_cost.egg-info/SOURCES.txt
index 1bd80e9..41e621c 100644
--- a/trytond_sale_shipment_cost.egg-info/SOURCES.txt
+++ b/trytond_sale_shipment_cost.egg-info/SOURCES.txt
@@ -53,11 +53,13 @@ locale/fr_FR.po
locale/hu_HU.po
locale/it_IT.po
locale/ja_JP.po
+locale/lo_LA.po
locale/lt_LT.po
locale/nl_NL.po
locale/pt_BR.po
locale/ru_RU.po
locale/sl_SI.po
+locale/zh_CN.po
tests/scenario_sale_shipment_cost.rst
trytond_sale_shipment_cost.egg-info/PKG-INFO
trytond_sale_shipment_cost.egg-info/SOURCES.txt
diff --git a/trytond_sale_shipment_cost.egg-info/requires.txt b/trytond_sale_shipment_cost.egg-info/requires.txt
index cf03c08..570d875 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 >= 3.8, < 3.9
-trytond_carrier >= 3.8, < 3.9
-trytond_currency >= 3.8, < 3.9
-trytond_sale >= 3.8, < 3.9
-trytond_stock >= 3.8, < 3.9
-trytond >= 3.8, < 3.9
\ No newline at end of file
+trytond_account_invoice >= 4.0, < 4.1
+trytond_carrier >= 4.0, < 4.1
+trytond_currency >= 4.0, < 4.1
+trytond_sale >= 4.0, < 4.1
+trytond_stock >= 4.0, < 4.1
+trytond >= 4.0, < 4.1
\ No newline at end of file
--
tryton-modules-sale-shipment-cost
More information about the tryton-debian-vcs
mailing list