[FIX]: cash register entry from pos, improve cash register

bzr revid: mga@tinyerp.com-20100628150631-vax21k5bj0lryv6u
This commit is contained in:
Mantavya Gajjar
2010-06-28 20:36:31 +05:30
parent 9f74749726
commit 277bb0e36f
3 changed files with 19 additions and 14 deletions
+10 -5
View File
@@ -46,20 +46,25 @@ class account_cash_statement(osv.osv):
_inherit = 'account.bank.statement'
def _equal_balance(self, r, uid, ids, statement, context={}):
stmt = self.browse(cr, uid, ids[0])
def _equal_balance(self, cr, uid, ids, statement, context={}):
if not stmt.check_dtls:
if not statement.journal_id.check_dtls:
return True
if stmt.check_dtls and (statement.balance_end != statement.balance_end_cash):
if statement.journal_id.check_dtls and (statement.balance_end != statement.balance_end_cash):
return False
else:
return True
def _user_allow(self, cr, uid, ids, statement, context={}):
res = False
print 'XXXXXXXXXXXXXXXXX : ', statement.journal_id.journal_users
uids = []
for user in statement.journal_id.journal_users:
uids.append(user.id)
if uid in uids:
res = True
return res
account_cash_statement()
+3 -3
View File
@@ -5,7 +5,7 @@
<field name="name">POS Journal</field>
<field name="model">account.journal</field>
<field name="type">form</field>
<field name="inherit_id" ref="view_account_journal_form"/>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook[last()]" position="inside">
<page string="Point of Sale">
@@ -21,9 +21,9 @@
</xpath>
</field>
</record>
<menuitem name="Cash Register" parent="point_of_sale.menu_point_root" id="menu_cash_register" sequence="4"/>
<menuitem
name="All Cash Registers"
parent="menu_cash_register"
+6 -6
View File
@@ -62,12 +62,12 @@ class pos_box_out(osv.osv_memory):
def get_out(self, cr, uid, ids, context):
"""
Create the entries in the CashBox .
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param context: A standard dictionary
@return :Return of operation of product
Create the entries in the CashBox .
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param context: A standard dictionary
@return :Return of operation of product
"""
args = {}
statement_obj = self.pool.get('account.bank.statement')