changeset 765394e19ac2 in modules/stock:default details: https://hg.tryton.org/modules/stock?cmd=changeset&node=765394e19ac2 description: Rename inventory count button action
This is to avoid collision with the ModelStorage.count method added by issue10623. issue11466 review447071003 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 33180764833a -r 765394e19ac2 inventory.py --- a/inventory.py Mon May 02 16:56:29 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 33180764833a -r 765394e19ac2 inventory.xml --- a/inventory.xml Mon May 02 16:56:29 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 33180764833a -r 765394e19ac2 tests/scenario_stock_inventory_count.rst --- a/tests/scenario_stock_inventory_count.rst Mon May 02 16:56:29 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 33180764833a -r 765394e19ac2 view/inventory_form.xml --- a/view/inventory_form.xml Mon May 02 16:56:29 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>