changeset eb3a13c92deb in modules/stock:6.4
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=eb3a13c92deb
description:
Rename inventory count button action
This is to avoid collision with the ModelStorage.count method added by
issue10623.
issue11466
review447071003
(grafted from 765394e19ac2585b35ba931270ceaf80038ff719)
diffstat:
inventory.py | 4 ++--
inventory.xml | 2 +-
tests/scenario_stock_inventory_count.rst | 2 +-
view/inventory_form.xml | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r f4efe7b3a6ea -r eb3a13c92deb inventory.py
--- a/inventory.py Mon May 02 16:56:28 2022 +0200
+++ b/inventory.py Sat May 07 18:48:45 2022 +0200
@@ -86,7 +86,7 @@
'readonly': Eval('state') != 'draft',
'depends': ['state'],
},
- 'count': {
+ 'do_count': {
'readonly': Eval('state') != 'draft',
'depends': ['state'],
},
@@ -311,7 +311,7 @@
@classmethod
@ModelView.button_action('stock.wizard_inventory_count')
- def count(cls, inventories):
+ def do_count(cls, inventories):
cls.complete_lines(inventories)
diff -r f4efe7b3a6ea -r eb3a13c92deb inventory.xml
--- a/inventory.xml Mon May 02 16:56:28 2022 +0200
+++ b/inventory.xml Sat May 07 18:48:45 2022 +0200
@@ -144,7 +144,7 @@
</record>
<record model="ir.model.button" id="inventory_count_button">
- <field name="name">count</field>
+ <field name="name">do_count</field>
<field name="string">Count</field>
<field name="help">Launch the wizard to count products</field>
<field name="model" search="[('model', '=', 'stock.inventory')]"/>
diff -r f4efe7b3a6ea -r eb3a13c92deb tests/scenario_stock_inventory_count.rst
--- a/tests/scenario_stock_inventory_count.rst Mon May 02 16:56:28 2022 +0200
+++ b/tests/scenario_stock_inventory_count.rst Sat May 07 18:48:45 2022 +0200
@@ -68,7 +68,7 @@
Count inventory::
- >>> _ = inventory.click('count')
+ >>> _ = inventory.click('do_count')
>>> count = Wizard('stock.inventory.count', [inventory])
>>> count.form.search = product
diff -r f4efe7b3a6ea -r eb3a13c92deb view/inventory_form.xml
--- a/view/inventory_form.xml Mon May 02 16:56:28 2022 +0200
+++ b/view/inventory_form.xml Sat May 07 18:48:45 2022 +0200
@@ -22,7 +22,7 @@
<group colspan="2" col="-1" id="buttons">
<button name="cancel" icon="tryton-cancel"/>
<button name="complete_lines" icon="tryton-add"/>
- <button name="count" icon="tryton-launch"/>
+ <button name="do_count" icon="tryton-launch"/>
<button name="confirm" icon="tryton-ok"/>
</group>
</form>