55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
# 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]
|
|
[]
|