[tryton-debian-vcs] tryton-modules-carrier-percentage branch debian created. b9357805cbc7b657e5c94932aa066026c1f40066

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:00:28 UTC 2013


The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-carrier-percentage.git;a=commitdiff;h=b9357805cbc7b657e5c94932aa066026c1f40066
commit b9357805cbc7b657e5c94932aa066026c1f40066
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Nov 25 20:30:10 2013 +0100

    Releasing debian version 3.0.0-1.

diff --git a/debian/changelog b/debian/changelog
index 7096ea0..b1b38b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-carrier-percentage (3.0.0-1) unstable; urgency=low
+
+  * Merging upstream version 3.0.0.
+  * Updating to standards version 3.9.5, no changes needed.
+  * Changing to buildsystem pybuild.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Mon, 25 Nov 2013 17:53:50 +0100
+
 tryton-modules-carrier-percentage (2.8.0-2) unstable; urgency=low
 
   * Moving doc/index.rst to appropriate subdirectory doc.
commit c2830b56bab525096da1ac658ab7f7e079da3ad5
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Nov 24 19:51:51 2013 +0100

    Changing to buildsystem pybuild.

diff --git a/debian/control b/debian/control
index 46f2deb..fac829a 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,8 @@ Section: python
 Priority: optional
 Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
 Uploaders: Mathias Behrle <mathiasb at m9s.biz>
-Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
+Build-Depends:
+ debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools, dh-python
 Standards-Version: 3.9.5
 Homepage: http://www.tryton.org/
 Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/tryton-modules-carrier-percentage.git
diff --git a/debian/rules b/debian/rules
index 30074ad..5b8c326 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,24 +1,17 @@
 #!/usr/bin/make -f
 
-MAJOR := $(shell python setup.py --version | awk -F "." '{print $$1 "." $$2}')
-PACKAGE_NAME := $(shell python setup.py --name)
-
-%:
-	dh ${@} --with python2
+# needed for pbuilder
+export LC_ALL=C.UTF-8
 
-override_dh_auto_clean:
-	dh_auto_clean
+MAJOR := $(shell python setup.py --version | awk -F "." '{print $$1 "." $$2}')
+PACKAGE_NAME := tryton-modules-$(shell python setup.py --name | sed s/^trytond_// | sed s/_/-/g)
+export PYBUILD_DESTDIR_python2=debian/${PACKAGE_NAME}
 
-override_dh_auto_build:
-	mv $(PACKAGE_NAME).egg-info $(PACKAGE_NAME).hen-info
-	mv PKG-INFO PKG-INFO.hen
-	dh_auto_build
+# Don't run tests for Tryton modules, they try to download dependencies from pypi
+export PYBUILD_DISABLE_python2.7=test
 
-override_dh_auto_install:
-	dh_auto_install
-	rm -rf *.egg-info
-	mv $(PACKAGE_NAME).hen-info $(PACKAGE_NAME).egg-info
-	mv PKG-INFO.hen PKG-INFO
+%:
+	dh ${@} --with python2 --buildsystem=pybuild
 
 override_dh_gencontrol:
 	dh_gencontrol -- -Vversion:major="$(MAJOR)"
commit 9aafcd278c1813fc54b4378d7a0f8e9e456220e0
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Nov 24 19:14:21 2013 +0100

    Updating to standards version 3.9.5, no changes needed.

diff --git a/debian/control b/debian/control
index 1b9d1f1..46f2deb 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
 Uploaders: Mathias Behrle <mathiasb at m9s.biz>
 Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
 Homepage: http://www.tryton.org/
 Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/tryton-modules-carrier-percentage.git
 Vcs-Git: git://debian.tryton.org/packages/tryton-modules-carrier-percentage.git
commit 7d990d147706c448d949f6d747e3ad1db98f5c9e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Nov 24 17:26:53 2013 +0100

    Merging upstream version 3.0.0.

diff --git a/CHANGELOG b/CHANGELOG
index 8d85d43..69dc0e9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.0 - 2013-10-21
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.0 - 2013-04-22
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index c0e2bb5..12b5202 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_carrier_percentage
-Version: 2.8.0
+Version: 3.0.0
 Summary: Tryton module to add cost method "on percentage" on carrier
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: UNKNOWN
 License: GPL-3
-Download-URL: http://downloads.tryton.org/2.8/
+Download-URL: http://downloads.tryton.org/3.0/
 Description: trytond_carrier_percentage
         ==========================
         
@@ -59,6 +59,7 @@ Classifier: Natural Language :: English
 Classifier: Natural Language :: French
 Classifier: Natural Language :: German
 Classifier: Natural Language :: Russian
+Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.6
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
new file mode 100644
index 0000000..9079a3b
--- /dev/null
+++ b/locale/sl_SI.po
@@ -0,0 +1,11 @@
+# 
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "field:carrier,percentage:"
+msgid "Percentage"
+msgstr "Odstoten"
+
+msgctxt "selection:carrier,carrier_cost_method:"
+msgid "Percentage"
+msgstr "Odstoten"
diff --git a/setup.py b/setup.py
index 6806903..eec35ce 100644
--- a/setup.py
+++ b/setup.py
@@ -63,6 +63,7 @@ setup(name='trytond_carrier_percentage',
         'Natural Language :: French',
         'Natural Language :: German',
         'Natural Language :: Russian',
+        'Natural Language :: Slovenian',
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.6',
diff --git a/tests/__init__.py b/tests/__init__.py
index d3dc579..1803291 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -2,3 +2,5 @@
 #this repository contains the full copyright notices and license terms.
 
 from test_carrier_percentage import suite
+
+__all__ = ['suite']
diff --git a/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst b/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
index 492ea10..eef5a7f 100644
--- a/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
+++ b/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
@@ -90,7 +90,7 @@ Create chart of accounts::
     >>> AccountTemplate = Model.get('account.account.template')
     >>> Account = Model.get('account.account')
     >>> AccountJournal = Model.get('account.journal')
-    >>> account_template, = AccountTemplate.find([('parent', '=', False)])
+    >>> account_template, = AccountTemplate.find([('parent', '=', None)])
     >>> create_chart = Wizard('account.create_chart')
     >>> create_chart.execute('account')
     >>> create_chart.form.account_template = account_template
diff --git a/tryton.cfg b/tryton.cfg
index 792c9c3..dea281d 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.8.0
+version=3.0.0
 depends:
     carrier
     currency
diff --git a/trytond_carrier_percentage.egg-info/PKG-INFO b/trytond_carrier_percentage.egg-info/PKG-INFO
index 3ff2797..6de05d3 100644
--- a/trytond_carrier_percentage.egg-info/PKG-INFO
+++ b/trytond_carrier_percentage.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-carrier-percentage
-Version: 2.8.0
+Version: 3.0.0
 Summary: Tryton module to add cost method "on percentage" on carrier
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: UNKNOWN
 License: GPL-3
-Download-URL: http://downloads.tryton.org/2.8/
+Download-URL: http://downloads.tryton.org/3.0/
 Description: trytond_carrier_percentage
         ==========================
         
@@ -59,6 +59,7 @@ Classifier: Natural Language :: English
 Classifier: Natural Language :: French
 Classifier: Natural Language :: German
 Classifier: Natural Language :: Russian
+Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.6
diff --git a/trytond_carrier_percentage.egg-info/SOURCES.txt b/trytond_carrier_percentage.egg-info/SOURCES.txt
index 4789396..9cfe658 100644
--- a/trytond_carrier_percentage.egg-info/SOURCES.txt
+++ b/trytond_carrier_percentage.egg-info/SOURCES.txt
@@ -24,6 +24,7 @@ locale/es_ES.po
 locale/fr_FR.po
 locale/nl_NL.po
 locale/ru_RU.po
+locale/sl_SI.po
 tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
 trytond_carrier_percentage.egg-info/PKG-INFO
 trytond_carrier_percentage.egg-info/SOURCES.txt
diff --git a/trytond_carrier_percentage.egg-info/requires.txt b/trytond_carrier_percentage.egg-info/requires.txt
index 1b1359d..e08e1be 100644
--- a/trytond_carrier_percentage.egg-info/requires.txt
+++ b/trytond_carrier_percentage.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_carrier >= 2.8, < 2.9
-trytond_currency >= 2.8, < 2.9
-trytond >= 2.8, < 2.9
\ No newline at end of file
+trytond_carrier >= 3.0, < 3.1
+trytond_currency >= 3.0, < 3.1
+trytond >= 3.0, < 3.1
\ No newline at end of file
commit 18b5abc2d2b144aeabbdcbb1e468091e96dd4474
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Aug 6 16:20:49 2013 +0200

    Releasing debian version 2.8.0-2.

diff --git a/debian/changelog b/debian/changelog
index d1b48a1..7096ea0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+tryton-modules-carrier-percentage (2.8.0-2) unstable; urgency=low
+
+  * Moving doc/index.rst to appropriate subdirectory doc.
+  * Simplifying package layout by renaming <pkg_name>.docs to docs.
+  * Removing needless empty line in rules.
+  * Adapting the rules file to work also with git-buildpackage.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Tue, 06 Aug 2013 13:32:41 +0200
+
 tryton-modules-carrier-percentage (2.8.0-1) experimental; urgency=low
 
   * Merging upstream version 2.8.0.
commit 4f543d7eea94f0cc2db4062cae36090989d4fefa
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Aug 5 18:06:36 2013 +0200

    Adapting the rules file to work also with git-buildpackage.

diff --git a/debian/rules b/debian/rules
index a6a1fb8..30074ad 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,13 +1,24 @@
 #!/usr/bin/make -f
 
 MAJOR := $(shell python setup.py --version | awk -F "." '{print $$1 "." $$2}')
+PACKAGE_NAME := $(shell python setup.py --name)
 
 %:
 	dh ${@} --with python2
 
 override_dh_auto_clean:
 	dh_auto_clean
+
+override_dh_auto_build:
+	mv $(PACKAGE_NAME).egg-info $(PACKAGE_NAME).hen-info
+	mv PKG-INFO PKG-INFO.hen
+	dh_auto_build
+
+override_dh_auto_install:
+	dh_auto_install
 	rm -rf *.egg-info
+	mv $(PACKAGE_NAME).hen-info $(PACKAGE_NAME).egg-info
+	mv PKG-INFO.hen PKG-INFO
 
 override_dh_gencontrol:
 	dh_gencontrol -- -Vversion:major="$(MAJOR)"
commit cea2566f8123c4211919e0fc709bad9df93342ba
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 29 17:19:29 2013 +0200

    Removing needless empty line in rules.

diff --git a/debian/rules b/debian/rules
index 0f63ab4..a6a1fb8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,6 @@ MAJOR := $(shell python setup.py --version | awk -F "." '{print $$1 "." $$2}')
 
 override_dh_auto_clean:
 	dh_auto_clean
-
 	rm -rf *.egg-info
 
 override_dh_gencontrol:
commit 1120490d006c9a6c381226e689c52344789e27a3
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 29 16:57:52 2013 +0200

    Simplifying package layout by renaming <pkg_name>.docs to docs.
    
    Thanks to Andreas Tille for this proposal. Since tryton module packages
    will most probably stay simple binary packages this change simplifies the
    package layout.

diff --git a/debian/tryton-modules-carrier-percentage.docs b/debian/docs
similarity index 100%
rename from debian/tryton-modules-carrier-percentage.docs
rename to debian/docs
commit b3ec4c89790275ff7d3dce0ede35f07ea047ad8b
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue May 14 18:40:52 2013 +0200

    Moving doc/index.rst to appropriate subdirectory doc.

diff --git a/debian/tryton-modules-carrier-percentage.docs b/debian/tryton-modules-carrier-percentage.docs
index 172a1f8..a2e6bd4 100644
--- a/debian/tryton-modules-carrier-percentage.docs
+++ b/debian/tryton-modules-carrier-percentage.docs
@@ -1 +1 @@
-doc/index.rst
+doc/
commit 733ffc3ec939bdd351cf0f4f658f90dfbc6d2d98
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu May 2 17:27:04 2013 +0200

    Releasing debian version 2.8.0-1.

diff --git a/debian/changelog b/debian/changelog
index 914c927..d1b48a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-carrier-percentage (2.8.0-1) experimental; urgency=low
+
+  * Merging upstream version 2.8.0.
+  * Updating copyright.
+  * First upload to Debian (Closes: #706840).
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Thu, 02 May 2013 15:19:58 +0200
+
 tryton-modules-carrier-percentage (2.6.0-2) experimental; urgency=low
 
   * Improving update of major version in Depends.
commit 5830745be09d3d087633bb0f035bb08f2a2d767a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu May 2 14:13:10 2013 +0200

    Updating copyright.

diff --git a/debian/copyright b/debian/copyright
index 776b559..4413e1c 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,10 +1,10 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
-Copyright: 2011-2012 Cédric Krier
+Copyright: 2011-2013 Cédric Krier
            2011-2012 Bertrand Chenal
            2011 Nicolas Évrard
-           2011-2012 B2CK SPRL
+           2011-2013 B2CK SPRL
 License: GPL-3+
 
 Files: debian/*
commit 267793abd3fd5b9ffa54944b90cbcf48fc1355ef
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu May 2 00:35:47 2013 +0200

    Merging upstream version 2.8.0.

diff --git a/CHANGELOG b/CHANGELOG
index d2beb67..8d85d43 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.0 - 2013-04-22
+* Bug fixes (see mercurial logs for details)
+
 Version 2.6.0 - 2012-10-22
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 7fcb680..87a90a4 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
-Copyright (C) 2011-2012 Cédric Krier.
+Copyright (C) 2011-2013 Cédric Krier.
 Copyright (C) 2011-2012 Bertrand Chenal.
 Copyright (C) 2011 Nicolas Évrard.
-Copyright (C) 2011-2012 B2CK SPRL.
+Copyright (C) 2011-2013 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/MANIFEST.in b/MANIFEST.in
index 07449ff..05c3f79 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -5,6 +5,7 @@ include CHANGELOG
 include LICENSE
 include tryton.cfg
 include *.xml
+include view/*.xml
 include *.odt
 include locale/*.po
 include doc/*
diff --git a/PKG-INFO b/PKG-INFO
index 5197b03..c0e2bb5 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond_carrier_percentage
-Version: 2.6.0
+Version: 2.8.0
 Summary: Tryton module to add cost method "on percentage" on carrier
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: UNKNOWN
 License: GPL-3
-Download-URL: http://downloads.tryton.org/2.6/
+Download-URL: http://downloads.tryton.org/2.8/
 Description: trytond_carrier_percentage
         ==========================
         
diff --git a/carrier.xml b/carrier.xml
index 54b1631..260ea0e 100644
--- a/carrier.xml
+++ b/carrier.xml
@@ -5,41 +5,9 @@ this repository contains the full copyright notices and license terms. -->
     <data>
         <record model="ir.ui.view" id="carrier_view_form">
             <field name="model">carrier</field>
-            <field name="inherit" ref="carrier.carrier_view_form"/>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <data>
-                    <xpath
-                        expr="/form/notebook/page[@id='carrier']/field[@name='carrier_cost_method']"
-                        position="after">
-                        <newline/>
-                        <label name="percentage"/>
-                        <field name="percentage"/>
-                        <newline/>
-                    </xpath>
-                </data>
-                ]]>
-            </field>
-        </record>
-
-        <record model="ir.ui.view" id="carrier_view_form2">
-            <field name="model">carrier</field>
             <field name="type">form</field>
-            <field name="inherit" ref="carrier.carrier_view_form2"/>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <data>
-                    <xpath
-                        expr="/form/field[@name='carrier_cost_method']"
-                        position="after">
-                        <newline/>
-                        <label name="percentage"/>
-                        <field name="percentage"/>
-                        <newline/>
-                    </xpath>
-                </data>
-                ]]>
-            </field>
+            <field name="inherit" ref="carrier.carrier_view_form"/>
+            <field name="name">carrier_form</field>
         </record>
     </data>
 </tryton>
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 821caba..feb5ab8 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -2,10 +2,12 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
+#, fuzzy
 msgctxt "field:carrier,percentage:"
 msgid "Percentage"
-msgstr ""
+msgstr "Процент"
 
+#, fuzzy
 msgctxt "selection:carrier,carrier_cost_method:"
 msgid "Percentage"
-msgstr ""
+msgstr "Процент"
diff --git a/setup.py b/setup.py
index d1f310b..6806903 100644
--- a/setup.py
+++ b/setup.py
@@ -36,16 +36,16 @@ setup(name='trytond_carrier_percentage',
     long_description=read('README'),
     author='Tryton',
     url='http://www.tryton.org/',
-    download_url="http://downloads.tryton.org/" + \
-        info.get('version', '0.0.1').rsplit('.', 1)[0] + '/',
+    download_url=("http://downloads.tryton.org/" +
+        info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'),
     package_dir={'trytond.modules.carrier_percentage': '.'},
     packages=[
         'trytond.modules.carrier_percentage',
         'trytond.modules.carrier_percentage.tests',
         ],
     package_data={
-        'trytond.modules.carrier_percentage': info.get('xml', []) \
-            + ['tryton.cfg', 'locale/*.po', 'tests/*.rst'],
+        'trytond.modules.carrier_percentage': (info.get('xml', [])
+            + ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst']),
         },
     classifiers=[
         'Development Status :: 5 - Production/Stable',
diff --git a/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst b/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
index 0af7957..492ea10 100644
--- a/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
+++ b/tests/scenario_carrier_percentage_with_purchase_shipment_cost.rst
@@ -34,10 +34,13 @@ Create company::
     >>> Currency = Model.get('currency.currency')
     >>> CurrencyRate = Model.get('currency.currency.rate')
     >>> Company = Model.get('company.company')
+    >>> Party = Model.get('party.party')
     >>> company_config = Wizard('company.company.config')
     >>> company_config.execute('company')
     >>> company = company_config.form
-    >>> company.name = 'B2CK'
+    >>> party = Party(name='B2CK')
+    >>> party.save()
+    >>> company.party = party
     >>> currencies = Currency.find([('code', '=', 'EUR')])
     >>> if not currencies:
     ...     currency = Currency(name='Euro', symbol=u'€', code='EUR',
@@ -130,34 +133,43 @@ Create category::
 Create products::
 
     >>> ProductUom = Model.get('product.uom')
+    >>> ProductTemplate = Model.get('product.template')
     >>> Product = Model.get('product.product')
     >>> unit, = ProductUom.find([('name', '=', 'Unit')])
     >>> product = Product()
-    >>> product.name = 'Product'
-    >>> product.category = category
-    >>> product.default_uom = unit
-    >>> product.type = 'goods'
-    >>> product.salable = True
-    >>> product.list_price = Decimal('20')
-    >>> product.cost_price = Decimal('8')
-    >>> product.account_revenue = revenue
+    >>> template = ProductTemplate()
+    >>> template.name = 'Product'
+    >>> template.category = category
+    >>> template.default_uom = unit
+    >>> template.type = 'goods'
+    >>> template.salable = True
+    >>> template.list_price = Decimal('20')
+    >>> template.cost_price = Decimal('8')
+    >>> template.account_revenue = revenue
+    >>> template.save()
+    >>> product.template = template
     >>> product.save()
     >>> carrier_product = Product()
-    >>> carrier_product.name = 'Carrier Product'
-    >>> carrier_product.category = category
-    >>> carrier_product.default_uom = unit
-    >>> carrier_product.type = 'service'
-    >>> carrier_product.salable = True
-    >>> carrier_product.list_price = Decimal('5')
-    >>> carrier_product.cost_price = Decimal('3')
-    >>> carrier_product.account_revenue = revenue
+    >>> 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.list_price = Decimal('5')
+    >>> carrier_template.cost_price = Decimal('3')
+    >>> carrier_template.account_revenue = revenue
+    >>> carrier_template.save()
+    >>> carrier_product.template = carrier_template
     >>> carrier_product.save()
 
 Create carrier::
 
     >>> Carrier = Model.get('carrier')
     >>> carrier = Carrier()
-    >>> carrier.name = 'Carrier'
+    >>> party = Party(name='Carrier')
+    >>> party.save()
+    >>> carrier.party = party
     >>> carrier.carrier_product = carrier_product
     >>> carrier.carrier_cost_method = 'percentage'
     >>> carrier.percentage = Decimal('15')
diff --git a/tests/test_carrier_percentage.py b/tests/test_carrier_percentage.py
index b5f7c79..4a250b0 100644
--- a/tests/test_carrier_percentage.py
+++ b/tests/test_carrier_percentage.py
@@ -27,6 +27,7 @@ class CarrierWeightTestCase(unittest.TestCase):
         trytond.tests.test_tryton.install_module('carrier_percentage')
         self.party = POOL.get('party.party')
         self.uom = POOL.get('product.uom')
+        self.template = POOL.get('product.template')
         self.product = POOL.get('product.product')
         self.category = POOL.get('product.category')
         self.currency = POOL.get('currency.currency')
@@ -49,32 +50,35 @@ class CarrierWeightTestCase(unittest.TestCase):
         Test compute_percentage.
         '''
         with Transaction().start(DB_NAME, USER, context=CONTEXT):
-            party = self.party.create({
-                    'name': 'Carrier',
-                    })
+            party, = self.party.create([{
+                        'name': 'Carrier',
+                        }])
             uom, = self.uom.search([
                     ('name', '=', 'Unit'),
                     ])
-            category = self.category.create({
-                    'name': 'Category',
-                    })
-            product = self.product.create({
-                    'name': 'Carrier',
-                    'default_uom': uom.id,
-                    'category': category.id,
-                    'type': 'service',
-                    'list_price': Decimal(0),
-                    'cost_price': Decimal(0),
-                    })
+            category, = self.category.create([{
+                        'name': 'Category',
+                        }])
+            template, = self.template.create([{
+                        'name': 'Carrier',
+                        'default_uom': uom.id,
+                        'category': category.id,
+                        'type': 'service',
+                        'list_price': Decimal(0),
+                        'cost_price': Decimal(0),
+                        }])
+            product, = self.product.create([{
+                        'template': template.id,
+                        }])
             currency, = self.currency.search([
                     ('code', '=', 'cu1'),
                     ])
-            carrier = self.carrier.create({
-                    'party': party.id,
-                    'carrier_product': product.id,
-                    'carrier_cost_method': 'percentage',
-                    'percentage': Decimal(15),
-                    })
+            carrier, = self.carrier.create([{
+                        'party': party.id,
+                        'carrier_product': product.id,
+                        'carrier_cost_method': 'percentage',
+                        'percentage': Decimal(15),
+                        }])
             for amount, price in [
                     (Decimal(0), Decimal(0)),
                     (Decimal(100), Decimal('15.00')),
diff --git a/tryton.cfg b/tryton.cfg
index 3050a5f..792c9c3 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.0
+version=2.8.0
 depends:
     carrier
     currency
diff --git a/trytond_carrier_percentage.egg-info/PKG-INFO b/trytond_carrier_percentage.egg-info/PKG-INFO
index a9d727b..3ff2797 100644
--- a/trytond_carrier_percentage.egg-info/PKG-INFO
+++ b/trytond_carrier_percentage.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond-carrier-percentage
-Version: 2.6.0
+Version: 2.8.0
 Summary: Tryton module to add cost method "on percentage" on carrier
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: UNKNOWN
 License: GPL-3
-Download-URL: http://downloads.tryton.org/2.6/
+Download-URL: http://downloads.tryton.org/2.8/
 Description: trytond_carrier_percentage
         ==========================
         
diff --git a/trytond_carrier_percentage.egg-info/SOURCES.txt b/trytond_carrier_percentage.egg-info/SOURCES.txt
index 6285b78..4789396 100644
--- a/trytond_carrier_percentage.egg-info/SOURCES.txt
+++ b/trytond_carrier_percentage.egg-info/SOURCES.txt
@@ -31,4 +31,5 @@ trytond_carrier_percentage.egg-info/dependency_links.txt
 trytond_carrier_percentage.egg-info/entry_points.txt
 trytond_carrier_percentage.egg-info/not-zip-safe
 trytond_carrier_percentage.egg-info/requires.txt
-trytond_carrier_percentage.egg-info/top_level.txt
\ No newline at end of file
+trytond_carrier_percentage.egg-info/top_level.txt
+view/carrier_form.xml
\ No newline at end of file
diff --git a/trytond_carrier_percentage.egg-info/requires.txt b/trytond_carrier_percentage.egg-info/requires.txt
index abc1177..1b1359d 100644
--- a/trytond_carrier_percentage.egg-info/requires.txt
+++ b/trytond_carrier_percentage.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_carrier >= 2.6, < 2.7
-trytond_currency >= 2.6, < 2.7
-trytond >= 2.6, < 2.7
\ No newline at end of file
+trytond_carrier >= 2.8, < 2.9
+trytond_currency >= 2.8, < 2.9
+trytond >= 2.8, < 2.9
\ No newline at end of file
diff --git a/view/carrier_form.xml b/view/carrier_form.xml
new file mode 100644
index 0000000..f933186
--- /dev/null
+++ b/view/carrier_form.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+    <xpath expr="/form/field[@name='carrier_cost_method']" position="after">
+        <newline/>
+        <label name="percentage"/>
+        <field name="percentage"/>
+        <newline/>
+    </xpath>
+</data>
commit d85752def2bb45710368f40f663899b2bc014cab
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Apr 27 18:44:43 2013 +0200

    Releasing debian version 2.6.0-2.

diff --git a/debian/changelog b/debian/changelog
index 0dba4e2..914c927 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-carrier-percentage (2.6.0-2) experimental; urgency=low
+
+  * Improving update of major version in Depends.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Sat, 27 Apr 2013 15:06:36 +0200
+
 tryton-modules-carrier-percentage (2.6.0-1) experimental; urgency=low
 
   * Initial packaging.
commit 622b773046375f0044bca3ef6a7d44b0a87db241
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Apr 27 14:54:48 2013 +0200

    Improving update of major version in Depends.
    
    Pulling the major version for Depends directly from the package version.
    Thanks to Ilya Melnikov for pushing the idea.

diff --git a/debian/control b/debian/control
index fb2f6bc..1b9d1f1 100644
--- a/debian/control
+++ b/debian/control
@@ -13,9 +13,9 @@ X-Python-Version: >= 2.6
 Package: tryton-modules-carrier-percentage
 Architecture: all
 Depends:
- ${misc:Depends}, ${python:Depends}, tryton-server (>= 2.6),
- tryton-modules-carrier (>= 2.6), tryton-modules-currency (>= 2.6),
- python-pkg-resources
+ ${misc:Depends}, ${python:Depends}, tryton-server (>= ${version:major}),
+ tryton-modules-carrier (>= ${version:major}),
+ tryton-modules-currency (>= ${version:major}), python-pkg-resources
 Description: Tryton Application Platform (Carrier Percentage Module)
  Tryton is a high-level general purpose application platform written in Python
  and using PostgreSQL as database engine. It is the core base of a complete
diff --git a/debian/rules b/debian/rules
index 1ae0776..0f63ab4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+MAJOR := $(shell python setup.py --version | awk -F "." '{print $$1 "." $$2}')
+
 %:
 	dh ${@} --with python2
 
@@ -8,5 +10,8 @@ override_dh_auto_clean:
 
 	rm -rf *.egg-info
 
+override_dh_gencontrol:
+	dh_gencontrol -- -Vversion:major="$(MAJOR)"
+
 override_dh_builddeb:
 	dh_builddeb -- -Zxz -z9
commit a8f07e800a48af18377a251a2c22e960e5aff53c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Apr 23 15:08:38 2013 +0200

    Adding debian version 2.6.0-1.

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0dba4e2
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+tryton-modules-carrier-percentage (2.6.0-1) experimental; urgency=low
+
+  * Initial packaging.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Tue, 23 Apr 2013 14:32:45 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..fb2f6bc
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,25 @@
+Source: tryton-modules-carrier-percentage
+Section: python
+Priority: optional
+Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
+Uploaders: Mathias Behrle <mathiasb at m9s.biz>
+Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
+Standards-Version: 3.9.4
+Homepage: http://www.tryton.org/
+Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/tryton-modules-carrier-percentage.git
+Vcs-Git: git://debian.tryton.org/packages/tryton-modules-carrier-percentage.git
+X-Python-Version: >= 2.6
+
+Package: tryton-modules-carrier-percentage
+Architecture: all
+Depends:
+ ${misc:Depends}, ${python:Depends}, tryton-server (>= 2.6),
+ tryton-modules-carrier (>= 2.6), tryton-modules-currency (>= 2.6),
+ python-pkg-resources
+Description: Tryton Application Platform (Carrier Percentage Module)
+ Tryton is a high-level general purpose application platform written in Python
+ and using PostgreSQL as database engine. It is the core base of a complete
+ business solution.
+ .
+ This package adds the handling of carrier costs based on the percentage of 
+ the amount of sale or purchase prices.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..776b559
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,30 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+
+Files: *
+Copyright: 2011-2012 Cédric Krier
+           2011-2012 Bertrand Chenal
+           2011 Nicolas Évrard
+           2011-2012 B2CK SPRL
+License: GPL-3+
+
+Files: debian/*
+Copyright: 2009-2012 Daniel Baumann <daniel at debian.org>
+           2012-2013 Mathias Behrle <mathiasb at m9s.biz>
+License: GPL-3+
+
+License: GPL-3+
+ 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
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ The complete text of the GNU General Public License
+ can be found in /usr/share/common-licenses/GPL-3 file.
diff --git a/debian/pydist-overrides b/debian/pydist-overrides
new file mode 100644
index 0000000..8c1ad45
--- /dev/null
+++ b/debian/pydist-overrides
@@ -0,0 +1 @@
+trytond_carrier tryton-modules-carrier
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..1ae0776
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+
+%:
+	dh ${@} --with python2
+
+override_dh_auto_clean:
+	dh_auto_clean
+
+	rm -rf *.egg-info
+
+override_dh_builddeb:
+	dh_builddeb -- -Zxz -z9
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..22a4de9
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1,2 @@
+compression = xz
+compression-level = 9
diff --git a/debian/tryton-modules-carrier-percentage.docs b/debian/tryton-modules-carrier-percentage.docs
new file mode 100644
index 0000000..172a1f8
--- /dev/null
+++ b/debian/tryton-modules-carrier-percentage.docs
@@ -0,0 +1 @@
+doc/index.rst
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..8b63c49
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://downloads.tryton.org/current/ .*trytond_carrier_percentage-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
-- 
tryton-modules-carrier-percentage



More information about the tryton-debian-vcs mailing list