[tryton-debian-vcs] tryton-modules-sale-price-list branch debian updated. debian/3.4.1-1-2-g034f216

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:06:18 UTC 2015


The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale-price-list.git;a=commitdiff;h=debian/3.4.1-1-2-g034f216

commit 034f2160e0014369cf45b362a8f94d753deda714
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Apr 23 17:00:05 2015 +0200

    Merging upstream version 3.6.0.

diff --git a/CHANGELOG b/CHANGELOG
index 8fca46c..588c0ff 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,6 @@
-Version 3.4.1 - 2015-02-21
+Version 3.6.0 - 2015-04-20
 * Bug fixes (see mercurial logs for details)
-
+* Add support for PyPy
 Version 3.4.0 - 2014-10-20
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index ca3d8bb..ca19f83 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_sale_price_list
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module to add price list on sale
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
 Description: trytond_sale_price_list
         =======================
         
@@ -63,5 +63,7 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
 Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/__init__.py b/__init__.py
index 94a5567..0965925 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from trytond.pool import Pool
 from .party import *
diff --git a/party.py b/party.py
index ceea96f..1e0bd74 100644
--- a/party.py
+++ b/party.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 from trytond.model import fields
 from trytond.pyson import Eval
 from trytond.pool import PoolMeta
diff --git a/product.py b/product.py
index 0c95ccd..9388ae7 100644
--- a/product.py
+++ b/product.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level
-#of this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 from trytond.transaction import Transaction
 from trytond.pool import Pool, PoolMeta
 
@@ -16,18 +16,25 @@ class Product:
         PriceList = pool.get('product.price_list')
         Party = pool.get('party.party')
         Uom = pool.get('product.uom')
+        Tax = pool.get('account.tax')
+        context = Transaction().context
 
         prices = super(Product, cls).get_sale_price(products,
             quantity=quantity)
-        if (Transaction().context.get('price_list')
-                and Transaction().context.get('customer')):
+        if context.get('price_list') and context.get('customer'):
             price_list = PriceList(Transaction().context['price_list'])
             customer = Party(Transaction().context['customer'])
             context_uom = None
-            if Transaction().context.get('uom'):
+            if context.get('uom'):
                 context_uom = Uom(Transaction().context['uom'])
+            taxes = None
+            if context.get('taxes'):
+                taxes = Tax.browse(context.get('taxes'))
             for product in products:
                 uom = context_uom or product.default_uom
-                prices[product.id] = price_list.compute(customer, product,
-                    prices[product.id], quantity, uom)
+                price = price_list.compute(
+                     customer, product, prices[product.id], quantity, uom)
+                if price_list.tax_included and taxes:
+                    price = Tax.reverse_compute(price, taxes)
+                prices[product.id] = price
         return prices
diff --git a/sale.py b/sale.py
index 88c9bc8..3b87ebe 100644
--- a/sale.py
+++ b/sale.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 from trytond.model import fields
 from trytond.pyson import Eval, Not, Equal, Or, Bool
 from trytond.pool import PoolMeta
@@ -29,12 +29,10 @@ class Sale:
             cls.lines.depends.append('party')
 
     def on_change_party(self):
-        res = super(Sale, self).on_change_party()
-        res['price_list'] = None
+        super(Sale, self).on_change_party()
+        self.price_list = None
         if self.party and self.party.sale_price_list:
-            res['price_list'] = self.party.sale_price_list.id
-            res['price_list.rec_name'] = self.party.sale_price_list.rec_name
-        return res
+            self.price_list = self.party.sale_price_list
 
 
 class SaleLine:
diff --git a/setup.py b/setup.py
index 4257ce4..89e3803 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from setuptools import setup
 import re
@@ -84,6 +84,8 @@ setup(name=name,
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: Implementation :: CPython',
+        'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Office/Business',
         'Topic :: Office/Business :: Financial :: Accounting',
         ],
diff --git a/tests/__init__.py b/tests/__init__.py
index d53ce84..e386bd4 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from .test_sale_price_list import suite
 
diff --git a/tests/test_sale_price_list.py b/tests/test_sale_price_list.py
index 825fe14..2f030a6 100644
--- a/tests/test_sale_price_list.py
+++ b/tests/test_sale_price_list.py
@@ -1,23 +1,13 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 import unittest
 import trytond.tests.test_tryton
-from trytond.tests.test_tryton import test_view, test_depends
+from trytond.tests.test_tryton import ModuleTestCase
 
 
-class SalePriceListTestCase(unittest.TestCase):
+class SalePriceListTestCase(ModuleTestCase):
     'Test SalePriceList module'
-
-    def setUp(self):
-        trytond.tests.test_tryton.install_module('sale_price_list')
-
-    def test0005views(self):
-        'Test views'
-        test_view('sale_price_list')
-
-    def test0006depends(self):
-        'Test depends'
-        test_depends()
+    module = 'sale_price_list'
 
 
 def suite():
diff --git a/tryton.cfg b/tryton.cfg
index 5cc1f3a..d0cfca1 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.6.0
 depends:
     ir
     party
diff --git a/trytond_sale_price_list.egg-info/PKG-INFO b/trytond_sale_price_list.egg-info/PKG-INFO
index 84b7c8d..58af7c6 100644
--- a/trytond_sale_price_list.egg-info/PKG-INFO
+++ b/trytond_sale_price_list.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-sale-price-list
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module to add price list on sale
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
 Description: trytond_sale_price_list
         =======================
         
@@ -63,5 +63,7 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
 Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/trytond_sale_price_list.egg-info/requires.txt b/trytond_sale_price_list.egg-info/requires.txt
index 60cf443..6a14c44 100644
--- a/trytond_sale_price_list.egg-info/requires.txt
+++ b/trytond_sale_price_list.egg-info/requires.txt
@@ -1,4 +1,4 @@
-trytond_party >= 3.4, < 3.5
-trytond_product_price_list >= 3.4, < 3.5
-trytond_sale >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+trytond_party >= 3.6, < 3.7
+trytond_product_price_list >= 3.6, < 3.7
+trytond_sale >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
\ No newline at end of file
-- 
tryton-modules-sale-price-list



More information about the tryton-debian-vcs mailing list