summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/wizard
diff options
context:
space:
mode:
authorRobin Heinz <rhe@odoo.com>2019-07-18 13:17:33 +0000
committerPierre Masereel <pim@odoo.com>2019-07-23 07:41:20 +0000
commit2eb1cde5348c6343fc0bd3fecc33ef7c6cca94ba (patch)
tree3358ea0e2b78e2fdfbcc76a620c00fb01c0a5940 /addons/point_of_sale/wizard
parent733fb360d25f885bd5c5b4688bbbc7f306f6f648 (diff)
[IMP] account, point_of_sale: take money from cash journal
When you have a cash journal, you have the opportunity to use a wizard to easily create the statement. There are two wizards, one to add money in the journal, and one to remove money. To simplify the code and remove some duplication, we are now using only one wizard, that will allow to add and/or remove money from the cash journal. TASK-ID: 1934784
Diffstat (limited to 'addons/point_of_sale/wizard')
-rw-r--r--addons/point_of_sale/wizard/pos_box.py12
-rw-r--r--addons/point_of_sale/wizard/pos_box.xml9
2 files changed, 1 insertions, 20 deletions
diff --git a/addons/point_of_sale/wizard/pos_box.py b/addons/point_of_sale/wizard/pos_box.py
index aac7131045c..bd8aa751781 100644
--- a/addons/point_of_sale/wizard/pos_box.py
+++ b/addons/point_of_sale/wizard/pos_box.py
@@ -23,18 +23,6 @@ class PosBox(CashBox):
return super(PosBox, self).run()
-class PosBoxIn(PosBox):
- _inherit = 'cash.box.in'
-
- def _calculate_values_for_statement_line(self, record):
- values = super(PosBoxIn, self)._calculate_values_for_statement_line(record=record)
- active_model = self.env.context.get('active_model', False)
- active_ids = self.env.context.get('active_ids', [])
- if active_model == 'pos.session' and active_ids:
- values['ref'] = self.env[active_model].browse(active_ids)[0].name
- return values
-
-
class PosBoxOut(PosBox):
_inherit = 'cash.box.out'
diff --git a/addons/point_of_sale/wizard/pos_box.xml b/addons/point_of_sale/wizard/pos_box.xml
index ae1aec6d997..4d5236f4efe 100644
--- a/addons/point_of_sale/wizard/pos_box.xml
+++ b/addons/point_of_sale/wizard/pos_box.xml
@@ -1,15 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<act_window
- id="action_pos_box_in"
- name="Put Money In"
- res_model="cash.box.in"
- view_mode="form"
- target="new"/>
-
- <act_window
id="action_pos_box_out"
- name="Take Money Out"
+ name="Take Money In/Out"
res_model="cash.box.out"
view_mode="form"
target="new"/>