[IMP] point_of_sale: Improvements in views and yaml.

bzr revid: uco@tinyerp.com-20100917092257-0sjkja2ot7pujwsf
This commit is contained in:
uco (Open ERP) 2010-09-17 14:52:57 +05:30
parent dc00d92f4f
commit 5d8c770d57
4 changed files with 18 additions and 44 deletions

View File

@ -362,7 +362,7 @@ class pos_order(osv.osv):
def test_order_lines(self, cr, uid, order, context=None):
""" Test order line is created or not for the order "
""" Test order line is created or not for the order "
@param name: Names of fields.
@return: True
"""

View File

@ -14,9 +14,8 @@
<group col="6" colspan="4">
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/>
<field name="contract_number" groups="base.group_extended"/>
</group>
<notebook colspan="4">
<notebook colspan="4">
<page string="Sale Order ">
<field name="lines" colspan="4" nolabel="1">
<tree string="Order lines" editable="bottom">
@ -29,7 +28,7 @@
<field name="price_subtotal" />
<field name="price_subtotal_incl" sum="Subtotal"/>
</tree>
<form string="Order lines" >
<form string="Order lines">
<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"/>
@ -51,8 +50,8 @@
<field name="state" />
<button name="%(action_pos_payment)d" string="Ma_ke Payment" icon="terp-dolar" type="action" states="draft,advance" />
<button name="%(action_report_pos_receipt)d" string="_Reprint" icon="gtk-print" type="action" states="paid,done,invoiced"/>
<button name="set_to_draft" string="Set to draft" states="paid" icon="gtk-execute" type="object" />
<button name="%(action_view_pos_return)d" string="Return Picking" type="action" icon="gtk-ok" states="paid"
<button name="set_to_draft" string="Set to _draft" states="paid" icon="gtk-execute" type="object" />
<button name="%(action_view_pos_return)d" string="Return P_icking" type="action" icon="gtk-ok" states="paid"
attrs="{'invisible':[('state','!=','paid'),('state','!=','invoiced')]}" context="{'return':'return'}" />
</group>
</page>
@ -91,7 +90,6 @@
</form>
</field>
</page>
<page string="Notes" >
<field colspan="4" name="note" nolabel="1"/>
</page>
@ -113,16 +111,17 @@
<field name="model">pos.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="POS Orders">
<tree string="POS Orders" colors="blue:state in ('draft');gray:state in ('done','cancel');black:state not in('done','cancel')">
<field name="name"/>
<field name="partner_id"/>
<field name="date_order"/>
<field name="date_validation"/>
<field name="date_payment"/>
<field name="user_id"/>
<field name="invoice_id"/>
<field name="state" />
<field name="amount_total" sum="Amount total"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="state"/>
</tree>
</field>
</record>
@ -135,16 +134,18 @@
<filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
<filter icon="terp-check" string="Running" domain="[('state','in',('payment','advance'))]"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="partner_id" select="1"/>
<field name="user_id" select="1"/>
<field name="date_order" select="1" string="Order date" />
<field name="name"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="date_order" string="Order date"/>
<newline/>
<group expand="0" string="Group By..." colspan="11" col="11" groups="base.group_extended">
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<separator string="" orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator string="" orientation="vertical"/>
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
</group>
</search>
</field>
@ -787,33 +788,6 @@
action="action_box_out"
id="menu_wizard_enter_jrnl2" sequence="3" />
<record model="ir.ui.view" id="view_pos_order_tree_all_sales">
<field name="name">POS Sales</field>
<field name="model">pos.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="POS Orders">
<field name="name"/>
<field name="date_order" select="1"/>
<field name="partner_id" />
<field name="date_validation"/>
<field name="date_payment"/>
<field name="user_id"/>
<field name="invoice_id"/>
<field name="note" select="1" />
<field name="state" select="1"/>
<field name="amount_total" sum="Amount total"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_pos_all_sales">
<field name="name">All sales</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pos.order</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_pos_order_tree_all_sales" />
</record>
<record model="ir.ui.view" id="view_pos_order_tree_all_sales_lines">
<field name="name">POS Sales Lines</field>
<field name="model">pos.order.line</field>

View File

@ -2,7 +2,7 @@
In order to test the POS in module, To give business owners a convenient way of checking out customers and of recording sales.
-
I configure all details for the customer, Salesman and Product, Account.
I configure all details for the Customer, Salesman and Product, Account.
-
I create View Account Type.
-

View File

@ -91,7 +91,7 @@ class pos_open_statement(osv.osv_memory):
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
return {
'domain': "[('state','=','open')]",
'domain': "[('state','=','open'),('user_id','=',"+ str(uid) +")]",
'name': 'Open Statement',
'view_type': 'form',
'view_mode': 'tree,form',