diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index 5601179e0fc..00ed80df0b0 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -26,7 +26,6 @@ from tools.translate import _
import decimal_precision as dp
class account_bank_statement(osv.osv):
-
def create(self, cr, uid, vals, context=None):
seq = 0
if 'line_ids' in vals:
diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py
index f19c1e1c639..eaa11515355 100644
--- a/addons/account/account_cash_statement.py
+++ b/addons/account/account_cash_statement.py
@@ -327,6 +327,31 @@ class account_cash_statement(osv.osv):
cash_box_line_pool.write(cr, uid, [end.id], {'number': 0})
return True
+ def button_load_cashbox_line(self, cr, uid, ids, context=None):
+ if not ids:
+ return False
+
+ return True
+
account_cash_statement()
+class account_journal(osv.osv):
+ _inherit = 'account.journal'
+
+ _columns = {
+ 'cashbox_line_ids' : fields.one2many('account.journal.cashbox.line', 'journal_id', 'CashBox'),
+ }
+
+account_journal()
+
+class account_journal_cashbox_line(osv.osv):
+ _name = 'account.journal.cashbox.line'
+ _rec_name = 'value'
+ _columns = {
+ 'value' : fields.float('Value'),
+ 'journal_id' : fields.many2one('account.journal', 'Journal', required=True, select=1),
+ }
+
+account_journal_cashbox_line()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index cd3bda45b46..e160890008f 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -504,6 +504,13 @@
+
+
+
+
+
+
+
@@ -2653,6 +2660,9 @@ action = pool.get('res.config').next(cr, uid, [], context)
+
+
+
diff --git a/addons/point_of_sale/account_bank_statement.py b/addons/point_of_sale/account_bank_statement.py
index 9cc39ced45c..cc350c8a116 100644
--- a/addons/point_of_sale/account_bank_statement.py
+++ b/addons/point_of_sale/account_bank_statement.py
@@ -25,13 +25,16 @@ from osv import fields, osv
class account_journal(osv.osv):
_inherit = 'account.journal'
_columns = {
- 'auto_cash': fields.boolean('Automatic Opening', help="This field authorize the automatic creation of the cashbox, without control of the initial balance."),
- 'check_dtls': fields.boolean('Control Balance Before Closing', help="This field authorize Validation of Cashbox without controlling the closing balance."),
'journal_user': fields.boolean('PoS Payment Method', help="Check this box if this journal define a payment method that can be used in point of sales."),
+
+ 'opening_control': fields.boolean('Opening Control'),
+ 'closing_control': fields.boolean('Closing Control'),
+
+ 'internal_account_id' : fields.many2one('account.account', 'Internal Transfers Account', select=1),
}
_defaults = {
- 'check_dtls': False,
- 'auto_cash': True,
+ 'opening_control' : True,
+ 'closing_control' : True,
}
account_journal()
@@ -39,14 +42,14 @@ account_journal()
class account_cash_statement(osv.osv):
_inherit = 'account.bank.statement'
- def _equal_balance(self, cr, uid, cash_id, context=None):
- statement = self.browse(cr, uid, cash_id, context=context)
- if not statement.journal_id.check_dtls:
- return True
- if statement.journal_id.check_dtls and (statement.balance_end != statement.balance_end_cash):
- return False
- else:
- return True
+ #def _equal_balance(self, cr, uid, cash_id, context=None):
+ # statement = self.browse(cr, uid, cash_id, context=context)
+ # if not statement.journal_id.check_dtls:
+ # return True
+ # if statement.journal_id.check_dtls and (statement.balance_end != statement.balance_end_cash):
+ # return False
+ # else:
+ # return True
def _get_cash_open_box_lines(self, cr, uid, context=None):
res = super(account_cash_statement,self)._get_cash_open_box_lines(cr, uid, context)
diff --git a/addons/point_of_sale/account_statement_view.xml b/addons/point_of_sale/account_statement_view.xml
index a1a0fa44b39..cfe6d855454 100644
--- a/addons/point_of_sale/account_statement_view.xml
+++ b/addons/point_of_sale/account_statement_view.xml
@@ -12,8 +12,9 @@
-
-
+
+
+
diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index 10b51a26ca6..087890c3398 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -242,7 +242,7 @@ class pos_order(osv.osv):
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
'partner_id': fields.many2one('res.partner', 'Customer', change_default=True, select=1, states={'draft': [('readonly', False)], 'paid': [('readonly', False)]}),
- 'session_id' : fields.many2one('pos.session', 'Session', required=True, select=1),
+ #'session_id' : fields.many2one('pos.session', 'Session', required=True, select=1),
'state': fields.selection([('draft', 'New'),
('cancel', 'Cancelled'),
diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js
index 148fe1ae74d..b7acc88c303 100644
--- a/addons/point_of_sale/static/src/js/pos.js
+++ b/addons/point_of_sale/static/src/js/pos.js
@@ -88,7 +88,7 @@ openerp.point_of_sale = function(db) {
this.fetch('product.product', ['name', 'list_price', 'pos_categ_id', 'taxes_id', 'product_image_small'], [['pos_categ_id', '!=', 'false']]),
this.fetch('account.bank.statement', ['account_id', 'currency', 'journal_id', 'state', 'name'],
[['state', '=', 'open'], ['user_id', '=', this.session.uid]]),
- this.fetch('account.journal', ['auto_cash', 'check_dtls', 'currency', 'name', 'type']),
+ this.fetch('account.journal', ['opening_control', 'closing_control', 'currency', 'name', 'type']),
this.fetch('account.tax', ['amount', 'price_include', 'type']),
this.get_app_data())
.pipe(_.bind(this.build_tree, this));
diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py
index 31e35d3fa10..a5f4ae252d8 100644
--- a/addons/point_of_sale/wizard/pos_open_statement.py
+++ b/addons/point_of_sale/wizard/pos_open_statement.py
@@ -65,7 +65,7 @@ class pos_open_statement(osv.osv_memory):
statement_id = statement_obj.create(cr, uid, data, context=context)
st_ids.append(int(statement_id))
- if journal.auto_cash:
+ if journal.opening_control:
statement_obj.button_open(cr, uid, [statement_id], context)
tree_res = mod_obj.get_object_reference(cr, uid, 'point_of_sale', 'view_cash_statement_pos_tree')