Skip to content
Snippets Groups Projects
Commit 17dcdf81 authored by Fabien Pinckaers's avatar Fabien Pinckaers
Browse files

[IMP] some fixes

bzr revid: fp@tinyerp.com-20110925190200-zo2elh6ntlckdqkt
parent aa969752
Branches
Tags
No related merge requests found
......@@ -26,7 +26,6 @@ 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"),
'special_journal': fields.boolean('Special Journal', help="Will put all the orders in waiting status till being accepted"),
'check_dtls': fields.boolean('Check Details', help="This field authorize Validation of Cashbox without checking ending details"),
'journal_users': fields.many2many('res.users', 'pos_journal_users', 'journal_id', 'user_id', 'Users'),
}
......
......@@ -13,7 +13,6 @@
<separator colspan="6" string="Extended Configuration"/>
<field name="check_dtls" groups="point_of_sale.group_pos_manager" string="Check Cash Balance"/>
<field name="auto_cash"/>
<field name="special_journal"/>
</group>
<separator colspan="4" string="POS Users"/>
<field name="journal_users" nolabel="1" colspan="4"/>
......
......@@ -689,14 +689,12 @@
groups="group_pos_manager"/>
<menuitem
name="Input Operations" parent="menu_point_of_sale"
string="Refloat"
name="Put Money" parent="menu_point_of_sale"
action="action_box_entries"
id="menu_wizard_enter_jrnl" sequence="2" />
<menuitem
name="Output Operations" parent="menu_point_of_sale"
string="Refloat"
name="Take Money" parent="menu_point_of_sale"
action="action_box_out"
id="menu_wizard_enter_jrnl2" sequence="3" />
......
......@@ -69,12 +69,11 @@ class pos_box_entries(osv.osv_memory):
return res
_columns = {
'name': fields.char('Description', size=32, required=True),
'name': fields.char('Reason', size=32, required=True),
'journal_id': fields.selection(get_journal, "Cash Register", required=True),
'product_id': fields.selection(_get_income_product, "Operation", required=True),
'amount': fields.float('Amount', digits=(16, 2)),
'amount': fields.float('Amount', digits=(16, 2), required=True),
'ref': fields.char('Ref', size=32),
}
_defaults = {
......
......@@ -3,31 +3,31 @@
<data>
<!-- Box Entries -->
<record id="view_box_entries" model="ir.ui.view">
<record id="view_box_entries" model="ir.ui.view">
<field name="name">Box Entries</field>
<field name="model">pos.box.entries</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Box Entries">
<separator string="Please fill these fields for entries to the box:" colspan="4"/>
<field name="name"/>
<field name="journal_id"/>
<field name="product_id"/>
<field name="amount"/>
<separator colspan="4"/>
<group colspan="4" col="4">
<group col="2" colspan="2"/>
<button icon="gtk-stop" special="cancel"
string="Cancel" />
<button name="get_in" string="Put Money"
colspan="1" type="object" icon="terp-dolar_ok!" />
</group>
<form string="Put Money">
<separator string="Fill in this form if you put money in the cash register:" colspan="4"/>
<field name="name"/>
<field name="product_id"/>
<field name="journal_id"/>
<field name="amount"/>
<separator colspan="4"/>
<group colspan="4" col="4">
<group col="2" colspan="2"/>
<button icon="gtk-stop" special="cancel"
string="Cancel" />
<button name="get_in" string="Put Money"
colspan="1" type="object" icon="gtk-apply" />
</group>
</form>
</field>
</record>
<record id="action_box_entries" model="ir.actions.act_window">
<field name="name">Box Entries</field>
<field name="name">Box Entries</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pos.box.entries</field>
<field name="view_type">form</field>
......@@ -35,5 +35,5 @@
<field name="target">new</field>
</record>
</data>
</data>
</openerp>
......@@ -49,11 +49,10 @@ class pos_box_out(osv.osv_memory):
return res
_columns = {
'name': fields.char('Description', size=32, required=True),
'name': fields.char('Description / Reason', size=32, required=True),
'journal_id': fields.selection(pos_box_entries.get_journal, "Cash Register", required=True),
'product_id': fields.selection(_get_expense_product, "Operation", required=True),
'amount': fields.float('Amount', digits=(16, 2)),
'ref': fields.char('Ref', size=32),
'amount': fields.float('Amount', digits=(16, 2), required=True),
}
_defaults = {
'journal_id': 1,
......@@ -105,7 +104,6 @@ class pos_box_out(osv.osv_memory):
if data['amount'] > 0:
amount = -data['amount']
vals['amount'] = amount
vals['ref'] = data['ref'] or ''
vals['name'] = "%s: %s " % (product.name, data['name'])
statement_line_obj.create(cr, uid, vals, context=context)
return {}
......
......@@ -3,31 +3,31 @@
<data>
<!-- Box Entries -->
<record id="view_pos_box_out" model="ir.ui.view">
<record id="view_pos_box_out" model="ir.ui.view">
<field name="name">Box Out</field>
<field name="model">pos.box.out</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Output Operation">
<separator string="Please fill these fields for entries to the box:" colspan="4"/>
<field name="name"/>
<field name="journal_id"/>
<field name="product_id"/>
<field name="amount"/>
<separator colspan="4"/>
<group colspan="4" col="4">
<group col="2" colspan="2"/>
<button icon="gtk-stop" special="cancel"
string="Cancel" />
<button name="get_out" string="Take Money"
colspan="1" type="object" icon="terp-dolar" />
</group>
<separator string="Describe why you take money from the cash register:" colspan="4"/>
<field name="name"/>
<field name="product_id"/>
<field name="journal_id"/>
<field name="amount"/>
<separator colspan="4"/>
<group colspan="4" col="4">
<group col="2" colspan="2"/>
<button icon="gtk-stop" special="cancel"
string="Cancel" />
<button name="get_out" string="Take Money"
colspan="1" type="object" icon="gtk-apply" />
</group>
</form>
</field>
</record>
<record id="action_box_out" model="ir.actions.act_window">
<field name="name">Box Out</field>
<field name="name">Take Money</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pos.box.out</field>
<field name="view_type">form</field>
......@@ -35,5 +35,5 @@
<field name="target">new</field>
</record>
</data>
</data>
</openerp>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data>
<!-- Point of Sale Confirm -->
<record id="view_pos_close_statement" model="ir.ui.view">
<record id="view_pos_close_statement" model="ir.ui.view">
<field name="name">Close Statements</field>
<field name="model">pos.close.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Close Statements">
<label string="Are you sure you want to close the statements ?"/>
<form string="Close Cash Registers">
<separator colspan="4" string="Do you want to close your cash registers ?"/>
<label string="OpenERP will close all cash registers he can close automatically without validation. He will also open all cash registers for which you have to control the ending belance before closing manually."/>
<separator colspan="4"/>
<group col="4" colspan="4">
<group col="2" colspan="2"/>
......@@ -22,15 +23,14 @@
</field>
</record>
<act_window name="Close Statements"
res_model="pos.close.statement"
src_model="account.bank.statement"
view_mode="form"
target="new"
key2="client_action_multi"
id="act_pos_open_statement"/>
<act_window name="Close Statements"
res_model="pos.close.statement"
src_model="account.bank.statement"
view_mode="form"
target="new"
key2="client_action_multi"
id="act_pos_open_statement"/>
<record id="action_pos_close_statement" model="ir.actions.act_window">
<field name="name">Close Cash Register</field>
<field name="type">ir.actions.act_window</field>
......@@ -38,6 +38,6 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>
</record>
</data>
</openerp>
......@@ -10,7 +10,7 @@
<field name="arch" type="xml">
<form string="Apply Discount">
<field name="discount" colspan="4"/>
<separator colspan="2" string=""/>
<separator colspan="4" string=""/>
<group colspan="2"/>
<button icon='gtk-cancel' special="cancel"
string="Close" />
......
......@@ -74,7 +74,7 @@ class pos_open_statement(osv.osv_memory):
search_id = mod_obj.get_object_reference(cr, uid, 'point_of_sale', 'view_pos_open_cash_statement_filter')
return {
'domain': "[('state', '=', 'open'),('user_id', '=', "+ str(uid) +")]",
'domain': "[('state', '=', 'open'),('id', 'in',[ "+','.join(map(str,j_ids))+"])]",
'name': 'Open Statement',
'view_type': 'form',
'view_mode': 'tree, form',
......
......@@ -3,31 +3,31 @@
<data>
<!-- Point of Sale Confirm -->
<record id="view_pos_open_statement" model="ir.ui.view">
<record id="view_pos_open_statement" model="ir.ui.view">
<field name="name">Open Statements</field>
<field name="model">pos.open.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Open Statements">
<label string="Are you sure you want to open the statements ?"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<group col="2" colspan="2"/>
<button icon='gtk-stop' special="cancel"
string="No" />
<button name="open_statement" string="Yes"
type="object" icon="gtk-ok"/>
</group>
<separator colspan="4" string="Do you want to open cash registers ?"/>
<label string="The system will open all cash registers, so that you can start recording payments. We suggest you to control the opening balance of each register, using their CashBox tab." colspan="4" align="0.0"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<group col="2" colspan="2"/>
<button icon='gtk-stop' special="cancel" string="Cancel"/>
<button name="open_statement" string="Open Registers"
type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<act_window name="Open Statements"
res_model="pos.open.statement"
src_model="account.bank.statement"
view_mode="form"
target="new"
key2="client_action_multi"
id="act_pos_open_statement"/>
<act_window name="Open Statements"
res_model="pos.open.statement"
src_model="account.bank.statement"
view_mode="form"
target="new"
key2="client_action_multi"
id="act_pos_open_statement"/>
<record id="action_pos_open_statement" model="ir.actions.act_window">
<field name="name">Open Cash Register</field>
......@@ -38,5 +38,5 @@
<field name="target">new</field>
</record>
</data>
</openerp>
</data>
</openerp>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment