changeset 10e21e8f669f in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset;node=10e21e8f669f
description:
Show the move resulting from the GroupLines wizard
issue8410
review262921002
diffstat:
CHANGELOG | 1 +
move.py | 8 ++++----
move.xml | 9 +++++++++
3 files changed, 14 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r d6e063a8c00b -r 10e21e8f669f CHANGELOG
--- a/CHANGELOG Fri Mar 06 11:27:10 2020 +0100
+++ b/CHANGELOG Wed Mar 18 12:32:56 2020 +0100
@@ -1,3 +1,4 @@
+* Show the move resulting from the GroupLines wizard
* Allow periods to end on any day of the month
* Use a wizard to select parameters when creating periods
* Modularize code in GroupLines wizard
diff -r d6e063a8c00b -r 10e21e8f669f move.py
--- a/move.py Fri Mar 06 11:27:10 2020 +0100
+++ b/move.py Wed Mar 18 12:32:56 2020 +0100
@@ -1864,16 +1864,16 @@
Button("Cancel", 'end', 'tryton-cancel'),
Button("Group", 'group', 'tryton-ok', default=True),
])
- group = StateTransition()
+ group = StateAction('account.act_move_form_grouping')
- def transition_group(self):
+ def do_group(self, action):
pool = Pool()
Line = pool.get('account.move.line')
lines = Line.browse(Transaction().context['active_ids'])
move, balance_line = self._group_lines(lines)
-
- return 'end'
+ action['res_id'] = [move.id]
+ return action, {}
def _group_lines(self, lines, date=None):
move, balance_line = self.group_lines(lines, self.start.journal, date)
diff -r d6e063a8c00b -r 10e21e8f669f move.xml
--- a/move.xml Fri Mar 06 11:27:10 2020 +0100
+++ b/move.xml Wed Mar 18 12:32:56 2020 +0100
@@ -427,5 +427,14 @@
<field name="report_name">account.move.general_journal</field>
<field name="report">account/general_journal.fodt</field>
</record>
+ <record model="ir.action.act_window" id="act_move_form_grouping">
+ <field name="name">Grouped Account Move</field>
+ <field name="res_model">account.move</field>
+ </record>
+ <record model="ir.action.act_window.view"
id="act_move_form_grouping_view1">
+ <field name="sequence" eval="10"/>
+ <field name="view" ref="move_view_form"/>
+ <field name="act_window" ref="act_move_form_grouping"/>
+ </record>
</data>
</tryton>