Add issue10949.diff [account] [account_fr] [analytic_account] Open move as balance action

This commit is contained in:
Albert Cervera i Areny 2021-06-25 16:00:48 +02:00
parent eb1390d8ec
commit e971ddde88
2 changed files with 57 additions and 0 deletions

54
issue10494.diff Normal file
View File

@ -0,0 +1,54 @@
# HG changeset patch
# User Cédric Krier <cedric.krier@b2ck.com>
Open move as balance action
This allows the user to post the move directly.
issue10494
review369161002
Index: modules/account/fiscalyear.py
===================================================================
--- a/modules/account/fiscalyear.py
+++ b/modules/account/fiscalyear.py
@@ -390,7 +390,7 @@
Button('Cancel', 'end', 'tryton-cancel'),
Button('OK', 'balance', 'tryton-ok', default=True),
])
- balance = StateAction('account.act_move_line_form')
+ balance = StateAction('account.act_move_form')
def get_move_line(self, account):
pool = Pool()
Index: modules/account_fr/tests/scenario_fec.rst
===================================================================
--- a/modules/account_fr/tests/scenario_fec.rst
+++ b/modules/account_fr/tests/scenario_fec.rst
@@ -183,8 +183,8 @@
... ('code', '=', '129'),
... ])
>>> balance_non_deferral.execute('balance')
- >>> move_line = balance_non_deferral.actions[0][0]
- >>> move_line.move.click('post')
+ >>> move, = balance_non_deferral.actions[0]
+ >>> move.click('post')
Generate FEC::
Index: modules/analytic_account/tests/scenario_analytic_account.rst
===================================================================
--- a/modules/analytic_account/tests/scenario_analytic_account.rst
+++ b/modules/analytic_account/tests/scenario_analytic_account.rst
@@ -179,10 +179,7 @@
>>> balance_non_deferral.form.credit_account = account_pl
>>> balance_non_deferral.form.debit_account = account_pl
>>> balance_non_deferral.execute('balance')
- >>> move, = Move.find([
- ... ('state', '=', 'draft'),
- ... ('journal', '=', journal_closing.id),
- ... ])
+ >>> move, = balance_non_deferral.actions[0]
>>> move.click('post')
>>> [l for l in move.lines if l.analytic_lines]
[]

3
series
View File

@ -28,3 +28,6 @@ issue9802.diff # [stock] Improve performance when partially assigning moves
account_asset_update_asset.diff # [account_asset] decimals when updata asset #044767
issue10464.diff # [currency] Update currency rates fails
issue10494.diff # [account] [account_fr] [analytic_account] Open move as balance action