diff --git a/CHANGELOG b/CHANGELOG index 1a60012d58..d586647c88 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 --git a/inventory.py b/inventory.py index 9e36104c0a..efa2ae3de2 100644 --- a/inventory.py +++ b/inventory.py @@ -615,7 +615,7 @@ class CountQuantity(ModelView): 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 @@ class CountQuantity(ModelView): @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 --git a/tests/scenario_stock_inventory_count.rst b/tests/scenario_stock_inventory_count.rst index ca7287b5ef..bd2a6d8674 100644 --- a/tests/scenario_stock_inventory_count.rst +++ b/tests/scenario_stock_inventory_count.rst @@ -84,13 +84,13 @@ Count inventory:: >>> 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 @@ Count inventory:: ... 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 --git a/view/inventory_count_quantity_form.xml b/view/inventory_count_quantity_form.xml index db724c8002..29165ee4a2 100644 --- a/view/inventory_count_quantity_form.xml +++ b/view/inventory_count_quantity_form.xml @@ -5,8 +5,8 @@ this repository contains the full copyright notices and license terms. -->