Show the move resulting from the GroupLines wizard

issue8410
review262921002
This commit is contained in:
Sergi Almacellas Abellana
2020-03-18 12:32:56 +01:00
parent 46cf9aecec
commit 206e7f45f8
3 changed files with 14 additions and 4 deletions
+1
View File
@@ -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
+4 -4
View File
@@ -1864,16 +1864,16 @@ class GroupLines(Wizard):
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)
+9
View File
@@ -427,5 +427,14 @@ this repository contains the full copyright notices and license terms. -->
<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>