changeset 59528e169c14 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=59528e169c14
description:
        Rename field quantity_resulting to total_quantity

        issue7871
        review60431002
diffstat:

 CHANGELOG                                |  2 ++
 inventory.py                             |  4 ++--
 tests/scenario_stock_inventory_count.rst |  8 ++++----
 view/inventory_count_quantity_form.xml   |  4 ++--
 4 files changed, 10 insertions(+), 8 deletions(-)

diffs (73 lines):

diff -r 777d5e34c6af -r 59528e169c14 CHANGELOG
--- a/CHANGELOG Tue Dec 04 12:25:45 2018 +0100
+++ b/CHANGELOG Tue Dec 04 12:31:31 2018 +0100
@@ -1,3 +1,5 @@
+* Rename inventory count quantity_resulting to total_quantity
+
 Version 5.0.0 - 2018-10-01
 * Bug fixes (see mercurial logs for details)
 * Add count wizard on inventory
diff -r 777d5e34c6af -r 59528e169c14 inventory.py
--- a/inventory.py      Tue Dec 04 12:25:45 2018 +0100
+++ b/inventory.py      Tue Dec 04 12:31:31 2018 +0100
@@ -615,7 +615,7 @@
     uom = fields.Many2One('product.uom', "UOM", readonly=True,
         help="The unit in which the quantities are specified.")
     quantity_resulting = fields.Float(
-        "Resulting Quantity", digits=(16, Eval('unit_digits', 2)),
+        "Total Quantity", digits=(16, Eval('unit_digits', 2)),
         readonly=True, depends=['unit_digits'],
         help="The total amount of the line counted so far.")
 
@@ -629,5 +629,5 @@
     @fields.depends('quantity_added', 'line')
     def on_change_quantity_added(self):
         if self.line:
-            self.quantity_resulting = (
+            self.total_quantity = (
                 (self.line.quantity or 0) + (self.quantity_added or 0))
diff -r 777d5e34c6af -r 59528e169c14 tests/scenario_stock_inventory_count.rst
--- a/tests/scenario_stock_inventory_count.rst  Tue Dec 04 12:25:45 2018 +0100
+++ b/tests/scenario_stock_inventory_count.rst  Tue Dec 04 12:31:31 2018 +0100
@@ -84,13 +84,13 @@
     >>> count.execute('quantity')
     >>> count.form.quantity_added
     1
-    >>> count.form.quantity_resulting
+    >>> count.form.total_quantity
     1
     >>> count.execute('add')
 
     >>> count.form.search = product
     >>> count.execute('quantity')
-    >>> count.form.quantity_resulting
+    >>> count.form.total_quantity
     2.0
     >>> count.execute('add')
 
@@ -100,9 +100,9 @@
     ...     inventory.id, product2.id)).save()
     >>> count.execute('quantity')
     >>> count.form.quantity_added
-    >>> count.form.quantity_resulting
+    >>> count.form.total_quantity
     >>> count.form.quantity_added = 10
-    >>> count.form.quantity_resulting
+    >>> count.form.total_quantity
     10.0
     >>> count.execute('add')
 
diff -r 777d5e34c6af -r 59528e169c14 view/inventory_count_quantity_form.xml
--- a/view/inventory_count_quantity_form.xml    Tue Dec 04 12:25:45 2018 +0100
+++ b/view/inventory_count_quantity_form.xml    Tue Dec 04 12:31:31 2018 +0100
@@ -5,8 +5,8 @@
     <label name="product"/>
     <field name="product"/>
     <newline/>
-    <label name="quantity_resulting"/>
-    <field name="quantity_resulting"/>
+    <label name="total_quantity"/>
+    <field name="total_quantity"/>
     <label name="uom"/>
     <field name="uom"/>
     <label name="quantity_added"/>

Reply via email to