[tryton-debian-vcs] tryton-modules-purchase-shipment-cost branch debian created. ecaaed47cd1d2f4a3d8bd8a7b41c7605e3df2d37

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:08:00 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-purchase-shipment-cost.git;a=commitdiff;h=ecaaed47cd1d2f4a3d8bd8a7b41c7605e3df2d37
commit ecaaed47cd1d2f4a3d8bd8a7b41c7605e3df2d37
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Nov 25 20:30:24 2013 +0100

    Releasing debian version 3.0.0-1.

diff --git a/debian/changelog b/debian/changelog
index 0dab50f..2ed0750 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-purchase-shipment-cost (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:55:02 +0100
+
 tryton-modules-purchase-shipment-cost (2.8.0-2) unstable; urgency=low
 
   * Moving doc/index.rst to appropriate subdirectory doc.
commit 33f6ffa41ba1eb82e674abebd005d31de950c744
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Nov 24 19:51:52 2013 +0100

    Changing to buildsystem pybuild.

diff --git a/debian/control b/debian/control
index e5a8fee..f265572 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-purchase-shipment-cost.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 a16cf0eb90c30462fe4e691fd710c18d12ac2c58
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 c7ba7c0..e5a8fee 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-purchase-shipment-cost.git
 Vcs-Git: git://debian.tryton.org/packages/tryton-modules-purchase-shipment-cost.git
commit 0bafd4e625280e147b99b32a48897f5ac268f220
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Nov 24 17:27:54 2013 +0100

    Merging upstream version 3.0.0.

diff --git a/CHANGELOG b/CHANGELOG
index 79c1c2d..8258af5 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 7047bad..374da64 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_purchase_shipment_cost
-Version: 2.8.0
+Version: 3.0.0
 Summary: Tryton module for purchase shipment cost
 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_purchase_shipment_cost
         ==============================
         
@@ -58,6 +58,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/es_AR.po b/locale/es_AR.po
index cb2bfa4..32a7d42 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -8,7 +8,7 @@ msgstr "Método asignación costo del transportista"
 
 msgctxt "field:stock.move,unit_shipment_cost:"
 msgid "Unit Shipment Cost"
-msgstr "Costo unitario de envío"
+msgstr "Costo unitario de Remito"
 
 msgctxt "field:stock.shipment.in,carrier:"
 msgid "Carrier"
@@ -20,11 +20,11 @@ msgstr "Costo"
 
 msgctxt "field:stock.shipment.in,cost_currency:"
 msgid "Cost Currency"
-msgstr "Divisa del costo"
+msgstr "Moneda del costo"
 
 msgctxt "field:stock.shipment.in,cost_currency_digits:"
 msgid "Cost Currency Digits"
-msgstr "Dígitos de divisa del costo"
+msgstr "Dígitos de moneda del costo"
 
 msgctxt "selection:carrier,carrier_cost_allocation_method:"
 msgid "By Value"
diff --git a/locale/es_AR.po b/locale/sl_SI.po
similarity index 73%
copy from locale/es_AR.po
copy to locale/sl_SI.po
index cb2bfa4..165f220 100644
--- a/locale/es_AR.po
+++ b/locale/sl_SI.po
@@ -4,28 +4,28 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
 
 msgctxt "field:carrier,carrier_cost_allocation_method:"
 msgid "Carrier Cost Allocation Method"
-msgstr "Método asignación costo del transportista"
+msgstr "Porazdelitev špedicijskih stroškov"
 
 msgctxt "field:stock.move,unit_shipment_cost:"
 msgid "Unit Shipment Cost"
-msgstr "Costo unitario de envío"
+msgstr "Strošek dostave na enoto"
 
 msgctxt "field:stock.shipment.in,carrier:"
 msgid "Carrier"
-msgstr "Transportista"
+msgstr "Špediter"
 
 msgctxt "field:stock.shipment.in,cost:"
 msgid "Cost"
-msgstr "Costo"
+msgstr "Strošek"
 
 msgctxt "field:stock.shipment.in,cost_currency:"
 msgid "Cost Currency"
-msgstr "Divisa del costo"
+msgstr "Valuta stroška"
 
 msgctxt "field:stock.shipment.in,cost_currency_digits:"
 msgid "Cost Currency Digits"
-msgstr "Dígitos de divisa del costo"
+msgstr "Decimalke stroška"
 
 msgctxt "selection:carrier,carrier_cost_allocation_method:"
 msgid "By Value"
-msgstr "Por valor"
+msgstr "Po vrednosti"
diff --git a/setup.py b/setup.py
index 99c8284..9ba663c 100644
--- a/setup.py
+++ b/setup.py
@@ -72,6 +72,7 @@ setup(name='trytond_purchase_shipment_cost',
         '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 2dc8b82..b4e8524 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_purchase_shipment_cost import suite
+
+__all__ = ['suite']
diff --git a/tests/scenario_purchase_shipment_cost_with_account_stock.rst b/tests/scenario_purchase_shipment_cost_with_account_stock.rst
index 9ee09bd..1d32d43 100644
--- a/tests/scenario_purchase_shipment_cost_with_account_stock.rst
+++ b/tests/scenario_purchase_shipment_cost_with_account_stock.rst
@@ -82,7 +82,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/tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst b/tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst
index ac2f8c5..defb51e 100644
--- a/tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst
+++ b/tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst
@@ -102,7 +102,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 e34e2f8..8d2148f 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_purchase_shipment_cost.egg-info/PKG-INFO b/trytond_purchase_shipment_cost.egg-info/PKG-INFO
index 424a2cc..bc3f49d 100644
--- a/trytond_purchase_shipment_cost.egg-info/PKG-INFO
+++ b/trytond_purchase_shipment_cost.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-purchase-shipment-cost
-Version: 2.8.0
+Version: 3.0.0
 Summary: Tryton module for purchase shipment cost
 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_purchase_shipment_cost
         ==============================
         
@@ -58,6 +58,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_purchase_shipment_cost.egg-info/SOURCES.txt b/trytond_purchase_shipment_cost.egg-info/SOURCES.txt
index ec86511..03e67c0 100644
--- a/trytond_purchase_shipment_cost.egg-info/SOURCES.txt
+++ b/trytond_purchase_shipment_cost.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_purchase_shipment_cost.rst
 tests/scenario_purchase_shipment_cost_with_account_stock.rst
 tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst
diff --git a/trytond_purchase_shipment_cost.egg-info/requires.txt b/trytond_purchase_shipment_cost.egg-info/requires.txt
index fc92fb8..f514cee 100644
--- a/trytond_purchase_shipment_cost.egg-info/requires.txt
+++ b/trytond_purchase_shipment_cost.egg-info/requires.txt
@@ -1,13 +1,13 @@
-trytond_carrier >= 2.8, < 2.9
-trytond_currency >= 2.8, < 2.9
-trytond_stock >= 2.8, < 2.9
-trytond >= 2.8, < 2.9
+trytond_carrier >= 3.0, < 3.1
+trytond_currency >= 3.0, < 3.1
+trytond_stock >= 3.0, < 3.1
+trytond >= 3.0, < 3.1
 
 [account_product]
-trytond_account_product >= 2.8, < 2.9
+trytond_account_product >= 3.0, < 3.1
 
 [account_stock_continental]
-trytond_account_stock_continental >= 2.8, < 2.9
+trytond_account_stock_continental >= 3.0, < 3.1
 
 [account_stock_anglo_saxon]
-trytond_account_stock_anglo_saxon >= 2.8, < 2.9
\ No newline at end of file
+trytond_account_stock_anglo_saxon >= 3.0, < 3.1
\ No newline at end of file
commit 7eb4808872ecfd9e62e7d3fdb2297b2bbef1aab9
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Aug 6 16:21:09 2013 +0200

    Releasing debian version 2.8.0-2.

diff --git a/debian/changelog b/debian/changelog
index ed89729..0dab50f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+tryton-modules-purchase-shipment-cost (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:33:26 +0200
+
 tryton-modules-purchase-shipment-cost (2.8.0-1) experimental; urgency=low
 
   * Merging upstream version 2.8.0.
commit d0d3693cfd76b2fc1f36e6a9e3d0322ee8471617
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 8928b0d40bd532155c6db68e591be1ac66d66e7d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 29 17:19:30 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 15d24939afbf8f55307f757cf86e4c94d5f170ba
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-purchase-shipment-cost.docs b/debian/docs
similarity index 100%
rename from debian/tryton-modules-purchase-shipment-cost.docs
rename to debian/docs
commit 522fc4e3ceb4617c6eb3e946612f3eace1fec0e5
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-purchase-shipment-cost.docs b/debian/tryton-modules-purchase-shipment-cost.docs
index 172a1f8..a2e6bd4 100644
--- a/debian/tryton-modules-purchase-shipment-cost.docs
+++ b/debian/tryton-modules-purchase-shipment-cost.docs
@@ -1 +1 @@
-doc/index.rst
+doc/
commit 18020f9f50e1378d0e420db94205dd7e8634bcd5
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu May 2 17:27:10 2013 +0200

    Releasing debian version 2.8.0-1.

diff --git a/debian/changelog b/debian/changelog
index 1cc06fa..ed89729 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-purchase-shipment-cost (2.8.0-1) experimental; urgency=low
+
+  * Merging upstream version 2.8.0.
+  * Updating copyright.
+  * First upload to Debian (Closes: #706847).
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Thu, 02 May 2013 15:20:45 +0200
+
 tryton-modules-purchase-shipment-cost (2.6.0-2) experimental; urgency=low
 
   * Improving update of major version in Depends.
commit 809b8508aa7c65e1bf2d62db300b750e160cad01
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu May 2 14:13:11 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 4300ddf6d9c1e38a03920ee140750f78639af46c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu May 2 00:37:28 2013 +0200

    Merging upstream version 2.8.0.

diff --git a/CHANGELOG b/CHANGELOG
index c6d5b30..79c1c2d 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 478d5ff..fc0b03e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -6,6 +6,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 350b1bc..7047bad 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond_purchase_shipment_cost
-Version: 2.6.0
+Version: 2.8.0
 Summary: Tryton module for purchase shipment cost
 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_purchase_shipment_cost
         ==============================
         
diff --git a/carrier.xml b/carrier.xml
index fc3f6a1..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_product']"
-                        position="after">
-                        <newline/>
-                        <label name="carrier_cost_allocation_method"/>
-                        <field name="carrier_cost_allocation_method"/>
-                        <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_product']"
-                        position="after">
-                        <newline/>
-                        <label name="carrier_cost_allocation_method"/>
-                        <field name="carrier_cost_allocation_method"/>
-                        <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/es_AR.po b/locale/es_AR.po
index af2918f..cb2bfa4 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -4,11 +4,11 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
 
 msgctxt "field:carrier,carrier_cost_allocation_method:"
 msgid "Carrier Cost Allocation Method"
-msgstr "Método asignación costo transportista"
+msgstr "Método asignación costo del transportista"
 
 msgctxt "field:stock.move,unit_shipment_cost:"
 msgid "Unit Shipment Cost"
-msgstr "Costo Unitario de Envío"
+msgstr "Costo unitario de envío"
 
 msgctxt "field:stock.shipment.in,carrier:"
 msgid "Carrier"
@@ -20,11 +20,11 @@ msgstr "Costo"
 
 msgctxt "field:stock.shipment.in,cost_currency:"
 msgid "Cost Currency"
-msgstr "Moneda del costo"
+msgstr "Divisa del costo"
 
 msgctxt "field:stock.shipment.in,cost_currency_digits:"
 msgid "Cost Currency Digits"
-msgstr "Dígitos del costo"
+msgstr "Dígitos de divisa del costo"
 
 msgctxt "selection:carrier,carrier_cost_allocation_method:"
 msgid "By Value"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index c775928..fb9dd23 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
 
 msgctxt "field:carrier,carrier_cost_allocation_method:"
 msgid "Carrier Cost Allocation Method"
-msgstr "Método asignación coste transportista"
+msgstr "Método asignación coste del transportista"
 
 msgctxt "field:stock.move,unit_shipment_cost:"
 msgid "Unit Shipment Cost"
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 426102f..8e9ee84 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -14,9 +14,10 @@ msgctxt "field:stock.shipment.in,carrier:"
 msgid "Carrier"
 msgstr ""
 
+#, fuzzy
 msgctxt "field:stock.shipment.in,cost:"
 msgid "Cost"
-msgstr ""
+msgstr "Стоимость"
 
 msgctxt "field:stock.shipment.in,cost_currency:"
 msgid "Cost Currency"
diff --git a/setup.py b/setup.py
index 1bad7de..99c8284 100644
--- a/setup.py
+++ b/setup.py
@@ -25,10 +25,10 @@ requires = []
 for dep in info.get('depends', []):
     if not re.match(r'(ir|res|webdav)(\W|$)', dep):
         requires.append('trytond_%s >= %s.%s, < %s.%s' %
-                (dep, major_version, minor_version, major_version,
-                    minor_version + 1))
+            (dep, major_version, minor_version, major_version,
+                minor_version + 1))
 requires.append('trytond >= %s.%s, < %s.%s' %
-        (major_version, minor_version, major_version, minor_version + 1))
+    (major_version, minor_version, major_version, minor_version + 1))
 
 extras_require = {}
 for dep in info.get('extras_depend', []):
@@ -46,16 +46,16 @@ setup(name='trytond_purchase_shipment_cost',
     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.purchase_shipment_cost': '.'},
     packages=[
         'trytond.modules.purchase_shipment_cost',
         'trytond.modules.purchase_shipment_cost.tests',
         ],
     package_data={
-        'trytond.modules.purchase_shipment_cost': info.get('xml', []) \
-            + ['tryton.cfg', 'locale/*.po', 'tests/*.rst'],
+        'trytond.modules.purchase_shipment_cost': (info.get('xml', [])
+            + ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst']),
         },
     classifiers=[
         'Development Status :: 5 - Production/Stable',
diff --git a/stock.py b/stock.py
index 5c65bd2..3dc7b1d 100644
--- a/stock.py
+++ b/stock.py
@@ -115,7 +115,7 @@ class ShipmentIn:
             move = cost['move']
             quantity = Decimal(str(move.quantity))
             if exp * quantity < difference:
-                cost['unit_shipment_cost'] = unit_shipment_cost + exp
+                cost['unit_shipment_cost'] += exp
                 difference -= exp * quantity
             if difference < exp:
                 break
@@ -128,8 +128,8 @@ class ShipmentIn:
             unit_shipment_cost = unit_shipment_cost.quantize(
                 exp, rounding=ROUND_HALF_EVEN)
             Move.write([move], {
-                    'unit_price': move.unit_price + cost['unit_shipment_cost'],
-                    'unit_shipment_cost': cost['unit_shipment_cost'],
+                    'unit_price': move.unit_price + unit_shipment_cost,
+                    'unit_shipment_cost': unit_shipment_cost,
                     })
 
     @classmethod
@@ -157,15 +157,17 @@ class Move:
     def _get_account_stock_move_lines(self, type_):
         pool = Pool()
         AccountMoveLine = pool.get('account.move.line')
+        Currency = pool.get('currency.currency')
         move_lines = super(Move, self)._get_account_stock_move_lines(type_)
         if (type_.startswith('in_')
                 and self.unit_shipment_cost
-                and self.shipment_in
-                and self.shipment_in.carrier):
-            shipment_cost = self.company.currency.round(
-                Decimal(str(self.quantity)) * self.unit_shipment_cost)
+                and self.shipment
+                and self.shipment.carrier):
+            shipment_cost = Currency.compute(self.currency,
+                Decimal(str(self.quantity)) * self.unit_shipment_cost,
+                self.company.currency)
             shipment_cost_account = \
-                self.shipment_in.carrier.carrier_product.account_expense_used
+                self.shipment.carrier.carrier_product.account_expense_used
             account = self.product.account_stock_supplier_used
             for move_line in move_lines:
                 if move_line.account == account:
@@ -180,3 +182,17 @@ class Move:
             else:
                 raise AssertionError('missing account_stock_supplier')
         return move_lines
+
+    # Remove shipment cost if account_stock_anglo_saxon is installed
+    @classmethod
+    def _get_anglo_saxon_move(cls, moves, quantity, type_):
+        pool = Pool()
+        Currency = pool.get('currency.currency')
+        for move, qty, cost_price in super(Move, cls)._get_anglo_saxon_move(
+                moves, quantity, type_):
+            if (type_.startswith('in_')
+                    and move.unit_shipment_cost):
+                shipment_cost = Currency.compute(move.currency,
+                    move.unit_shipment_cost, move.company.currency)
+                cost_price -= shipment_cost
+            yield move, qty, cost_price
diff --git a/stock.xml b/stock.xml
index 7ca4b8e..9a675d6 100644
--- a/stock.xml
+++ b/stock.xml
@@ -7,22 +7,7 @@ this repository contains the full copyright notices and license terms. -->
             <field name="model">stock.shipment.in</field>
             <field name="type">form</field>
             <field name="inherit" ref="stock.shipment_in_view_form"/>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <data>
-                    <xpath expr="/form/notebook"
-                        position="after">
-                        <label name="carrier"/>
-                        <field name="carrier"/>
-                        <label name="cost"/>
-                        <group col="2" id="cost">
-                            <field name="cost"/>
-                            <field name="cost_currency"/>
-                        </group>
-                    </xpath>
-                </data>
-                ]]>
-            </field>
+            <field name="name">shipment_in_form</field>
         </record>
     </data>
 </tryton>
diff --git a/tests/scenario_purchase_shipment_cost.rst b/tests/scenario_purchase_shipment_cost.rst
index 26aab5a..baedbb6 100644
--- a/tests/scenario_purchase_shipment_cost.rst
+++ b/tests/scenario_purchase_shipment_cost.rst
@@ -33,10 +33,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',
@@ -71,30 +74,39 @@ 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.list_price = Decimal('20')
-    >>> product.cost_price = Decimal('8')
+    >>> template = ProductTemplate()
+    >>> template.name = 'Product'
+    >>> template.category = category
+    >>> template.default_uom = unit
+    >>> template.type = 'goods'
+    >>> template.list_price = Decimal('20')
+    >>> template.cost_price = Decimal('8')
+    >>> 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.list_price = Decimal('5')
-    >>> carrier_product.cost_price = Decimal('3')
+    >>> carrier_template = ProductTemplate()
+    >>> carrier_template.name = 'Carrier Product'
+    >>> carrier_template.category = category
+    >>> carrier_template.default_uom = unit
+    >>> carrier_template.type = 'service'
+    >>> carrier_template.list_price = Decimal('5')
+    >>> carrier_template.cost_price = Decimal('3')
+    >>> 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.save()
 
diff --git a/tests/scenario_purchase_shipment_cost_with_account_stock.rst b/tests/scenario_purchase_shipment_cost_with_account_stock.rst
index 82e343a..9ee09bd 100644
--- a/tests/scenario_purchase_shipment_cost_with_account_stock.rst
+++ b/tests/scenario_purchase_shipment_cost_with_account_stock.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',
@@ -127,46 +130,59 @@ 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.list_price = Decimal('20')
-    >>> product.cost_price = Decimal('8')
-    >>> product.account_expense = expense
-    >>> product.account_revenue = revenue
-    >>> product.account_stock = stock
-    >>> product.account_stock_supplier = stock_supplier
-    >>> product.account_stock_customer = stock_customer
-    >>> product.account_stock_production = stock_production
-    >>> product.account_stock_lost_found = stock_lost_found
-    >>> product.account_journal_stock_supplier = stock_journal
-    >>> product.account_journal_stock_customer = stock_journal
-    >>> product.account_journal_stock_lost_found = stock_journal
+    >>> template = ProductTemplate()
+    >>> template.name = 'Product'
+    >>> template.category = category
+    >>> template.default_uom = unit
+    >>> template.type = 'goods'
+    >>> template.list_price = Decimal('20')
+    >>> template.cost_price = Decimal('8')
+    >>> template.account_expense = expense
+    >>> template.account_revenue = revenue
+    >>> template.account_stock = stock
+    >>> template.account_stock_supplier = stock_supplier
+    >>> template.account_stock_customer = stock_customer
+    >>> template.account_stock_production = stock_production
+    >>> template.account_stock_lost_found = stock_lost_found
+    >>> template.account_journal_stock_supplier = stock_journal
+    >>> template.account_journal_stock_customer = stock_journal
+    >>> template.account_journal_stock_lost_found = stock_journal
+    >>> template.save()
+    >>> product.template = template
     >>> product.save()
-    >>> product_average = Product(Product.copy([product.id], config.context)[0])
-    >>> product_average.cost_price_method = 'average'
-    >>> product_average.save()
+    >>> template_average = ProductTemplate(ProductTemplate.copy([template.id],
+    ...         config.context)[0])
+    >>> template_average.cost_price_method = 'average'
+    >>> template_average.save()
+    >>> product_average = Product(Product.copy([product.id], {
+    ...         'template': template_average.id,
+    ...         }, config.context)[0])
 
     >>> carrier_product = Product()
-    >>> carrier_product.name = 'Carrier Product'
-    >>> carrier_product.category = category
-    >>> carrier_product.default_uom = unit
-    >>> carrier_product.type = 'service'
-    >>> carrier_product.list_price = Decimal('5')
-    >>> carrier_product.cost_price = Decimal('3')
-    >>> carrier_product.account_expense = expense
-    >>> 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.list_price = Decimal('5')
+    >>> carrier_template.cost_price = Decimal('3')
+    >>> carrier_template.account_expense = expense
+    >>> 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.save()
 
diff --git a/tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst b/tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst
new file mode 100644
index 0000000..ac2f8c5
--- /dev/null
+++ b/tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst
@@ -0,0 +1,288 @@
+==============================================================
+Purchase Shipment Cost with Account Stock Anglo-Saxon Scenario
+==============================================================
+
+=============
+General Setup
+=============
+
+Imports::
+
+    >>> import datetime
+    >>> from dateutil.relativedelta import relativedelta
+    >>> from decimal import Decimal
+    >>> from proteus import config, Model, Wizard
+    >>> today = datetime.date.today()
+
+Create database::
+
+    >>> current_config = config.set_trytond()
+    >>> current_config.pool.test = True
+
+Install purchase_shipment_cost, account_stock_continental and purchase::
+
+    >>> Module = Model.get('ir.module.module')
+    >>> modules = Module.find([
+    ...         ('name', 'in', ('purchase_shipment_cost',
+    ...             'account_stock_anglo_saxon', 'purchase')),
+    ...     ])
+    >>> Module.install([x.id for x in modules], current_config.context)
+    >>> Wizard('ir.module.module.install_upgrade').execute('upgrade')
+
+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
+    >>> party = Party(name='Dunder Mifflin')
+    >>> party.save()
+    >>> company.party = party
+    >>> currencies = Currency.find([('code', '=', 'USD')])
+    >>> if not currencies:
+    ...     currency = Currency(name='US Dollar', symbol='$', code='USD',
+    ...         rounding=Decimal('0.01'), mon_grouping='[3, 3, 0]',
+    ...         mon_decimal_point='.')
+    ...     currency.save()
+    ...     CurrencyRate(date=today + relativedelta(month=1, day=1),
+    ...         rate=Decimal('1.0'), currency=currency).save()
+    ... else:
+    ...     currency, = currencies
+    >>> company.currency = currency
+    >>> company_config.execute('add')
+    >>> company, = Company.find()
+
+Reload the context::
+
+    >>> User = Model.get('res.user')
+    >>> current_config._context = User.get_preferences(True,
+    ...     current_config.context)
+
+Create an accountant user::
+
+    >>> Group = Model.get('res.group')
+    >>> accountant = User()
+    >>> accountant.name = 'Accountant'
+    >>> accountant.login = 'accountant'
+    >>> accountant.password = 'accountant'
+    >>> account_group, = Group.find([('name', '=', 'Account')])
+    >>> accountant.groups.append(account_group)
+    >>> accountant.save()
+
+Create fiscal year::
+
+    >>> FiscalYear = Model.get('account.fiscalyear')
+    >>> Sequence = Model.get('ir.sequence')
+    >>> SequenceStrict = Model.get('ir.sequence.strict')
+    >>> fiscalyear = FiscalYear(name='%s' % today.year)
+    >>> fiscalyear.start_date = today + relativedelta(month=1, day=1)
+    >>> fiscalyear.end_date = today + relativedelta(month=12, day=31)
+    >>> fiscalyear.company = company
+    >>> post_move_sequence = Sequence(name='%s' % today.year,
+    ...     code='account.move',
+    ...     company=company)
+    >>> post_move_sequence.save()
+    >>> fiscalyear.post_move_sequence = post_move_sequence
+    >>> invoice_sequence = SequenceStrict(name='%s' % today.year,
+    ...     code='account.invoice',
+    ...     company=company)
+    >>> invoice_sequence.save()
+    >>> fiscalyear.out_invoice_sequence = invoice_sequence
+    >>> fiscalyear.in_invoice_sequence = invoice_sequence
+    >>> fiscalyear.out_credit_note_sequence = invoice_sequence
+    >>> fiscalyear.in_credit_note_sequence = invoice_sequence
+    >>> fiscalyear.save()
+    >>> FiscalYear.create_period([fiscalyear.id], current_config.context)
+
+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)])
+    >>> create_chart = Wizard('account.create_chart')
+    >>> create_chart.execute('account')
+    >>> create_chart.form.account_template = account_template
+    >>> create_chart.form.company = company
+    >>> create_chart.execute('create_account')
+    >>> receivable, = Account.find([
+    ...         ('kind', '=', 'receivable'),
+    ...         ('company', '=', company.id),
+    ...         ])
+    >>> payable, = Account.find([
+    ...         ('kind', '=', 'payable'),
+    ...         ('company', '=', company.id),
+    ...         ])
+    >>> revenue, = Account.find([
+    ...         ('kind', '=', 'revenue'),
+    ...         ('company', '=', company.id),
+    ...         ])
+    >>> expense, = Account.find([
+    ...         ('kind', '=', 'expense'),
+    ...         ('company', '=', company.id),
+    ...         ])
+    >>> (stock, stock_customer, stock_lost_found, stock_production,
+    ...     stock_supplier) = Account.find([
+    ...         ('kind', '=', 'stock'),
+    ...         ('company', '=', company.id),
+    ...         ('name', 'like', 'Stock%'),
+    ...         ], order=[('name', 'ASC')])
+    >>> cogs, = Account.find([
+    ...         ('kind', '=', 'other'),
+    ...         ('company', '=', company.id),
+    ...         ('name', '=', 'COGS'),
+    ...         ])
+    >>> create_chart.form.account_receivable = receivable
+    >>> create_chart.form.account_payable = payable
+    >>> create_chart.execute('create_properties')
+    >>> stock_journal, = AccountJournal.find([('code', '=', 'STO')])
+
+Create parties::
+
+    >>> Party = Model.get('party.party')
+    >>> supplier = Party(name='Supplier')
+    >>> supplier.save()
+
+Create product::
+
+    >>> ProductUom = Model.get('product.uom')
+    >>> unit, = ProductUom.find([('name', '=', 'Unit')])
+    >>> ProductTemplate = Model.get('product.template')
+    >>> Product = Model.get('product.product')
+    >>> product = Product()
+    >>> template = ProductTemplate()
+    >>> template.name = 'product'
+    >>> template.default_uom = unit
+    >>> template.type = 'goods'
+    >>> template.purchasable = True
+    >>> template.list_price = Decimal('10')
+    >>> template.cost_price = Decimal('5')
+    >>> template.cost_price_method = 'average'
+    >>> template.account_expense = expense
+    >>> template.account_revenue = revenue
+    >>> template.account_stock = stock
+    >>> template.account_cogs = cogs
+    >>> template.account_stock_supplier = stock_supplier
+    >>> template.account_stock_customer = stock_customer
+    >>> template.account_stock_production = stock_production
+    >>> template.account_stock_lost_found = stock_lost_found
+    >>> template.account_journal_stock_supplier = stock_journal
+    >>> template.account_journal_stock_customer = stock_journal
+    >>> template.account_journal_stock_lost_found = stock_journal
+    >>> template.save()
+    >>> product.template = template
+    >>> product.save()
+    >>> carrier_product = Product()
+    >>> carrier_template = ProductTemplate()
+    >>> carrier_template.name = 'Carrier Product'
+    >>> carrier_template.default_uom = unit
+    >>> carrier_template.type = 'service'
+    >>> carrier_template.list_price = Decimal('5')
+    >>> carrier_template.cost_price = Decimal('3')
+    >>> carrier_template.account_expense = expense
+    >>> carrier_template.account_revenue = revenue
+    >>> carrier_template.save()
+    >>> carrier_product.template = carrier_template
+    >>> carrier_product.save()
+
+Create carrier::
+
+    >>> Carrier = Model.get('carrier')
+    >>> carrier = Carrier()
+    >>> party = Party(name='Carrier')
+    >>> party.save()
+    >>> carrier.party = party
+    >>> carrier.carrier_product = carrier_product
+    >>> carrier.save()
+
+Create payment term::
+
+    >>> PaymentTerm = Model.get('account.invoice.payment_term')
+    >>> PaymentTermLine = Model.get('account.invoice.payment_term.line')
+    >>> payment_term = PaymentTerm(name='Direct')
+    >>> payment_term_line = PaymentTermLine(type='remainder', days=0)
+    >>> payment_term.lines.append(payment_term_line)
+    >>> payment_term.save()
+
+Purchase 5 products::
+
+    >>> Purchase = Model.get('purchase.purchase')
+    >>> PurchaseLine = Model.get('purchase.line')
+    >>> purchase = Purchase()
+    >>> purchase.party = supplier
+    >>> purchase.payment_term = payment_term
+    >>> purchase.invoice_method = 'shipment'
+    >>> purchase_line = PurchaseLine()
+    >>> purchase.lines.append(purchase_line)
+    >>> purchase_line.product = product
+    >>> purchase_line.quantity = 5.0
+    >>> purchase.save()
+    >>> Purchase.quote([purchase.id], current_config.context)
+    >>> Purchase.confirm([purchase.id], current_config.context)
+    >>> purchase.state
+    u'confirmed'
+
+Receive 4 products::
+
+    >>> ShipmentIn = Model.get('stock.shipment.in')
+    >>> Move = Model.get('stock.move')
+    >>> shipment = ShipmentIn(supplier=supplier)
+    >>> move = Move(purchase.moves[0].id)
+    >>> move.quantity = 4.0
+    >>> shipment.incoming_moves.append(move)
+    >>> shipment.carrier = carrier
+    >>> shipment.cost == Decimal('3')
+    True
+    >>> shipment.cost_currency == currency
+    True
+    >>> shipment.save()
+    >>> ShipmentIn.receive([shipment.id], current_config.context)
+    >>> shipment.reload()
+    >>> shipment.state
+    u'received'
+    >>> move, = shipment.incoming_moves
+    >>> move.unit_price == Decimal('5.75')
+    True
+    >>> ShipmentIn.done([shipment.id], current_config.context)
+    >>> shipment.reload()
+    >>> shipment.state
+    u'done'
+    >>> stock_supplier.reload()
+    >>> stock.reload()
+    >>> (stock_supplier.debit, stock_supplier.credit) == \
+    ... (Decimal('0.00'), Decimal('20.00'))
+    True
+    >>> stock.reload()
+    >>> (stock.debit, stock.credit) == \
+    ... (Decimal('23.00'), Decimal('0.00'))
+    True
+    >>> expense.reload()
+    >>> (expense.debit, expense.credit) == \
+    ... (Decimal('0.00'), Decimal('3.00'))
+    True
+
+Open supplier invoice::
+
+    >>> Invoice = Model.get('account.invoice')
+    >>> purchase.reload()
+    >>> invoice, = purchase.invoices
+    >>> invoice.invoice_date = today
+    >>> invoice.save()
+    >>> Invoice.post([invoice.id], current_config.context)
+    >>> invoice.state
+    u'posted'
+    >>> payable.reload()
+    >>> (payable.debit, payable.credit) == \
+    ... (Decimal('0.00'), Decimal('20.00'))
+    True
+    >>> expense.reload()
+    >>> (expense.debit, expense.credit) == \
+    ... (Decimal('20.00'), Decimal('23.00'))
+    True
+    >>> stock_supplier.reload()
+    >>> (stock_supplier.debit, stock_supplier.credit) == \
+    ... (Decimal('20.00'), Decimal('20.00'))
+    True
diff --git a/tests/test_purchase_shipment_cost.py b/tests/test_purchase_shipment_cost.py
index 7509d67..3a51af8 100644
--- a/tests/test_purchase_shipment_cost.py
+++ b/tests/test_purchase_shipment_cost.py
@@ -60,6 +60,10 @@ def suite():
             'scenario_purchase_shipment_cost_with_account_stock.rst',
             setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
             optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
+    suite.addTests(doctest.DocFileSuite(
+            'scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst',
+            setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
+            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
     return suite
 
 if __name__ == '__main__':
diff --git a/tryton.cfg b/tryton.cfg
index 2f65365..e34e2f8 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.6.0
+version=2.8.0
 depends:
     carrier
     currency
@@ -9,6 +9,7 @@ depends:
 extras_depend:
     account_product
     account_stock_continental
+    account_stock_anglo_saxon
 xml:
     stock.xml
     carrier.xml
diff --git a/trytond_purchase_shipment_cost.egg-info/PKG-INFO b/trytond_purchase_shipment_cost.egg-info/PKG-INFO
index 85716c6..424a2cc 100644
--- a/trytond_purchase_shipment_cost.egg-info/PKG-INFO
+++ b/trytond_purchase_shipment_cost.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond-purchase-shipment-cost
-Version: 2.6.0
+Version: 2.8.0
 Summary: Tryton module for purchase shipment cost
 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_purchase_shipment_cost
         ==============================
         
diff --git a/trytond_purchase_shipment_cost.egg-info/SOURCES.txt b/trytond_purchase_shipment_cost.egg-info/SOURCES.txt
index 09da398..ec86511 100644
--- a/trytond_purchase_shipment_cost.egg-info/SOURCES.txt
+++ b/trytond_purchase_shipment_cost.egg-info/SOURCES.txt
@@ -26,10 +26,13 @@ locale/nl_NL.po
 locale/ru_RU.po
 tests/scenario_purchase_shipment_cost.rst
 tests/scenario_purchase_shipment_cost_with_account_stock.rst
+tests/scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst
 trytond_purchase_shipment_cost.egg-info/PKG-INFO
 trytond_purchase_shipment_cost.egg-info/SOURCES.txt
 trytond_purchase_shipment_cost.egg-info/dependency_links.txt
 trytond_purchase_shipment_cost.egg-info/entry_points.txt
 trytond_purchase_shipment_cost.egg-info/not-zip-safe
 trytond_purchase_shipment_cost.egg-info/requires.txt
-trytond_purchase_shipment_cost.egg-info/top_level.txt
\ No newline at end of file
+trytond_purchase_shipment_cost.egg-info/top_level.txt
+view/carrier_form.xml
+view/shipment_in_form.xml
\ No newline at end of file
diff --git a/trytond_purchase_shipment_cost.egg-info/requires.txt b/trytond_purchase_shipment_cost.egg-info/requires.txt
index bf4d4a3..fc92fb8 100644
--- a/trytond_purchase_shipment_cost.egg-info/requires.txt
+++ b/trytond_purchase_shipment_cost.egg-info/requires.txt
@@ -1,10 +1,13 @@
-trytond_carrier >= 2.6, < 2.7
-trytond_currency >= 2.6, < 2.7
-trytond_stock >= 2.6, < 2.7
-trytond >= 2.6, < 2.7
+trytond_carrier >= 2.8, < 2.9
+trytond_currency >= 2.8, < 2.9
+trytond_stock >= 2.8, < 2.9
+trytond >= 2.8, < 2.9
 
 [account_product]
-trytond_account_product >= 2.6, < 2.7
+trytond_account_product >= 2.8, < 2.9
 
 [account_stock_continental]
-trytond_account_stock_continental >= 2.6, < 2.7
\ No newline at end of file
+trytond_account_stock_continental >= 2.8, < 2.9
+
+[account_stock_anglo_saxon]
+trytond_account_stock_anglo_saxon >= 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..faa6196
--- /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_product']" position="after">
+        <newline/>
+        <label name="carrier_cost_allocation_method"/>
+        <field name="carrier_cost_allocation_method"/>
+        <newline/>
+    </xpath>
+</data>
diff --git a/view/shipment_in_form.xml b/view/shipment_in_form.xml
new file mode 100644
index 0000000..1f0a8a6
--- /dev/null
+++ b/view/shipment_in_form.xml
@@ -0,0 +1,14 @@
+<?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/notebook" position="after">
+        <label name="carrier"/>
+        <field name="carrier"/>
+        <label name="cost"/>
+        <group col="2" id="cost">
+            <field name="cost"/>
+            <field name="cost_currency"/>
+        </group>
+    </xpath>
+</data>
commit 5260a8d99b8453c92eeb375e4ffbc0c770a499d3
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Apr 27 18:44:54 2013 +0200

    Releasing debian version 2.6.0-2.

diff --git a/debian/changelog b/debian/changelog
index 08176db..1cc06fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-purchase-shipment-cost (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:08:37 +0200
+
 tryton-modules-purchase-shipment-cost (2.6.0-1) experimental; urgency=low
 
   * Initial packaging.
commit b14228d5ff0f826ce786cfbf5ec00321c8cba555
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 a66ca2c..c7ba7c0 100644
--- a/debian/control
+++ b/debian/control
@@ -13,9 +13,10 @@ X-Python-Version: >= 2.6
 Package: tryton-modules-purchase-shipment-cost
 Architecture: all
 Depends:
- ${misc:Depends}, ${python:Depends}, tryton-server (>= 2.6),
- tryton-modules-carrier (>= 2.6), tryton-modules-currency (>= 2.6),
- tryton-modules-stock (>= 2.6), python-pkg-resources
+ ${misc:Depends}, ${python:Depends}, tryton-server (>= ${version:major}),
+ tryton-modules-carrier (>= ${version:major}),
+ tryton-modules-currency (>= ${version:major}),
+ tryton-modules-stock (>= ${version:major}), python-pkg-resources
 Description: Tryton Application Platform (Purchase Shipment Cost 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 6c59e560e84a3427a179bd2fec5b6c7b892ac692
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Apr 23 15:09:04 2013 +0200

    Adding debian version 2.6.0-1.

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..08176db
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+tryton-modules-purchase-shipment-cost (2.6.0-1) experimental; urgency=low
+
+  * Initial packaging.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Tue, 23 Apr 2013 14:34:23 +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..a66ca2c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,24 @@
+Source: tryton-modules-purchase-shipment-cost
+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-purchase-shipment-cost.git
+Vcs-Git: git://debian.tryton.org/packages/tryton-modules-purchase-shipment-cost.git
+X-Python-Version: >= 2.6
+
+Package: tryton-modules-purchase-shipment-cost
+Architecture: all
+Depends:
+ ${misc:Depends}, ${python:Depends}, tryton-server (>= 2.6),
+ tryton-modules-carrier (>= 2.6), tryton-modules-currency (>= 2.6),
+ tryton-modules-stock (>= 2.6), python-pkg-resources
+Description: Tryton Application Platform (Purchase Shipment Cost 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 shipment costs for purchases.
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-purchase-shipment-cost.docs b/debian/tryton-modules-purchase-shipment-cost.docs
new file mode 100644
index 0000000..172a1f8
--- /dev/null
+++ b/debian/tryton-modules-purchase-shipment-cost.docs
@@ -0,0 +1 @@
+doc/index.rst
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..c1f163c
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://downloads.tryton.org/current/ .*trytond_purchase_shipment_cost-(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))
-- 
tryton-modules-purchase-shipment-cost



More information about the tryton-debian-vcs mailing list