[MOD] point_of_sale: Usability Improvements
bzr revid: vir@tinyerp.com-20100624104136-gu8rv53v4s3c1bnm
This commit is contained in:
+11
-11
@@ -286,7 +286,7 @@ class pos_order(osv.osv):
|
||||
'date_validation': fields.function(_get_date_payment, method=True, string='Validation Date', type='date', store=True),
|
||||
'date_payment': fields.function(_get_date_payment2, method=True, string='Payment Date', type='date', store=True),
|
||||
'date_validity': fields.date('Validity Date', required=True),
|
||||
'user_id': fields.many2one('res.users', 'Connected Salesman', readonly=True),
|
||||
'user_id': fields.many2one('res.users', 'Connected Salesman'),
|
||||
'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True),
|
||||
'sale_manager': fields.many2one('res.users', 'Salesman Manager'),
|
||||
'amount_tax': fields.function(_amount_all, method=True, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
|
||||
@@ -297,7 +297,7 @@ class pos_order(osv.osv):
|
||||
'price_type': fields.selection([
|
||||
('tax_excluded','Tax excluded')
|
||||
], 'Price method', required=True),
|
||||
'statement_ids': fields.one2many('account.bank.statement.line','pos_statement_id','Payments'),
|
||||
'statement_ids': fields.one2many('account.bank.statement.line','pos_statement_id','Payments',states={'draft': [('readonly', False)]},readonly=True),
|
||||
'payments': fields.one2many('pos.payment', 'order_id', 'Order Payments', states={'draft': [('readonly', False)]}, readonly=True),
|
||||
'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)]}),
|
||||
@@ -1175,16 +1175,16 @@ class pos_order_line(osv.osv):
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
}
|
||||
|
||||
def _check_qty(self, cr, uid, ids):
|
||||
lines = self.browse(cr, uid, ids)
|
||||
for line in lines:
|
||||
if line.qty <= 0:
|
||||
return False
|
||||
return True
|
||||
# def _check_qty(self, cr, uid, ids):
|
||||
# lines = self.browse(cr, uid, ids)
|
||||
# for line in lines:
|
||||
# if line.qty <= 0:
|
||||
# return False
|
||||
# return True
|
||||
|
||||
_constraints = [
|
||||
(_check_qty, 'Order quantity cannot be negative or zero !', ['qty']),
|
||||
]
|
||||
# _constraints = [
|
||||
# (_check_qty, 'Order quantity cannot be negative or zero !', ['qty']),
|
||||
# ]
|
||||
|
||||
def create(self, cr, user, vals, context={}):
|
||||
if vals.get('product_id'):
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sales Order POS">
|
||||
<group col="6" colspan="4">
|
||||
<field name="user_salesman_id" />
|
||||
<!--field name="user_salesman_id" />
|
||||
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/>
|
||||
<field name="contract_number" groups="base.group_extended"/>
|
||||
<field name="contract_number" groups="base.group_extended"/> -->
|
||||
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
@@ -23,14 +23,14 @@
|
||||
<tree string="Order lines" editable="bottom">
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275" />
|
||||
<field name="qty" />
|
||||
<field name="qty_rfd" groups="base.group_extended"/>
|
||||
<!--field name="qty_rfd" groups="base.group_extended"/-->
|
||||
<field name="discount" on_change="onchange_discount(discount,price_unit)" />
|
||||
<field name="price_ded" on_change="onchange_ded(price_ded, price_unit)" />
|
||||
<field name="price_ded" on_change="onchange_ded(price_ded, price_unit)" invisible="1"/>
|
||||
<field name="price_unit" readonly="1"/>
|
||||
<field name="notice"/>
|
||||
<field name="serial_number"/>
|
||||
<!--field name="serial_number"/-->
|
||||
<field name="price_subtotal" />
|
||||
<field name="price_subtotal_incl"/>
|
||||
<field name="price_subtotal_incl" sum="Subtotal"/>
|
||||
</tree>
|
||||
<form string="Order lines" >
|
||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275"/>
|
||||
@@ -47,8 +47,8 @@
|
||||
<group colspan="4" col="7">
|
||||
<field name="amount_tax"/>
|
||||
<field name="amount_total"/>
|
||||
<button name="%(action_pos_discount)d" string="D_iscount" type="action" states="draft"/>
|
||||
<button name="dummy_button" string="Compute" type="object" />
|
||||
<!--button name="%(action_pos_discount)d" string="D_iscount" type="action" states="draft"/>
|
||||
<button name="dummy_button" string="Compute" type="object" /-->
|
||||
</group>
|
||||
|
||||
<group colspan="4" col="9" groups="base.group_extended">
|
||||
@@ -76,11 +76,12 @@
|
||||
<page string="Order and Payment">
|
||||
<group colspan="2" col="2" name="Type">
|
||||
<separator string="Order Information" colspan="4"/>
|
||||
<field name="user_salesman_id" />
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="shop_id" widget="selection" />
|
||||
<field name="name"/>
|
||||
<field name="user_id" />
|
||||
<field name="sale_manager" />
|
||||
<field name="user_id" string="Salesman"/>
|
||||
<!--field name="sale_manager" /-->
|
||||
<field name="price_type" />
|
||||
</group>
|
||||
<group colspan="2" col="2" name="Type">
|
||||
@@ -92,7 +93,8 @@
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<separator string="Invoicing" colspan="4"/>
|
||||
<field name="sale_journal" domain="[('type','=','sale'),('company_id','=',company_id)]"/>
|
||||
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/>
|
||||
<field name="sale_journal" domain="[('type','=','sale')]" widget="selection"/>
|
||||
<field name="pricelist_id" domain="[('type','=','sale')]" widget="selection"/>
|
||||
<field name="invoice_id"/>
|
||||
<group colspan="2" col="3">
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
"access_pos_confirm","pos.confirm","model_pos_confirm","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_discount","pos.discount","model_pos_discount","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_get_sale","pos.get.sale","model_pos_get_sale","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_close_statement","pos.open.statement","model_pos_open_statement","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_open_statement","pos.close.statement","model_pos_close_statement","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_close_statement","pos.open.statement","model_pos_open_statement","point_of_sale.group_pos_user",1,1,1,0
|
||||
"access_pos_open_statement","pos.close.statement","model_pos_close_statement","point_of_sale.group_pos_user",1,1,1,0
|
||||
"acess_pos_box_entries ","pos.box.entries ","model_pos_box_entries","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_box_out","pos.box.out","model_pos_box_out","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_details ","pos.details ","model_pos_details","point_of_sale.group_pos_user",1,0,0,0
|
||||
@@ -34,7 +34,7 @@
|
||||
"access_pos_receipt","pos.receipt ","model_pos_receipt","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_payment_report_user","pos.payment.report.user","model_pos_payment_report_user","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_payment_report_date ","pos.payment.report.date ","model_pos_payment_report_date","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_make_payment","pos.make.payment","model_pos_make_payment","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_make_payment","pos.make.payment","model_pos_make_payment","point_of_sale.group_pos_user",1,1,1,0
|
||||
"access_pos_scan_product","pos.scan.product","model_pos_scan_product","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_pos_payment_report","pos.payment.report","model_pos_payment_report","point_of_sale.group_pos_user",1,0,0,0
|
||||
"access_report_pos_order","report.pos.order","model_report_pos_order","point_of_sale.group_pos_user",1,0,0,0
|
||||
|
||||
|
Reference in New Issue
Block a user