diff --git a/issue10494.diff b/issue10494.diff new file mode 100644 index 0000000..1cb49c4 --- /dev/null +++ b/issue10494.diff @@ -0,0 +1,54 @@ +# HG changeset patch +# User Cédric Krier +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] + [] diff --git a/series b/series index 2ec5c20..e1a3f4a 100644 --- a/series +++ b/series @@ -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 +