<data>
<menuitem icon="terp-partner"
id="base.menu_base_partner" name="Sales"
- sequence="0" groups="base.group_sale_salesman,base.group_sale_manager"/>
-
- <menuitem id="base.menu_sales" name="Sales"
- parent="base.menu_base_partner" sequence="1"
- />
+ sequence="1" groups="base.group_sale_salesman,base.group_sale_manager"/>
<menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<separator colspan="4" string="Accounting"/>
<field name="payment_default_id"/>
- <field domain="[('type','=','sale')]" name="pricelist_id" select="1"/>
+ <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" select="1"/>
<field name="project_id" select="1" groups="analytic.group_analytic_accounting"/>
</form>
</field>
<tree string="Sales Shop">
<field name="name"/>
<field name="warehouse_id"/>
- <field name="pricelist_id"/>
+ <field name="pricelist_id" groups="product.group_sale_pricelist"/>
<field name="project_id" groups="analytic.group_analytic_accounting"/>
</tree>
</field>
<field name="help">If you have more than one shop reselling your company products, you can create and manage that from here. Whenever you will record a new quotation or sales order, it has to be linked to a shop. The shop also defines the warehouse from which the products will be delivered for each particular sales.</field>
</record>
- <menuitem action="action_shop_form" id="menu_action_shop_form" parent="base.menu_sale_config_sales" sequence="0"/>
+ <menuitem action="action_shop_form" id="menu_action_shop_form" parent="base.menu_base_config" sequence="35"/>
<record id="view_sale_order_calendar" model="ir.ui.view">
<field name="name">sale.order.calendar</field>
<field name="type">tree</field>
<field name="priority">2</field>
<field name="arch" type="xml">
- <tree string="Sales Orders" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
+ <tree string="Sales Orders" fonts="bold:needaction_pending==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
+ <field name="needaction_pending" invisible="1"/>
<field name="name"/>
<field name="date_order"/>
<field name="partner_id"/>
<field name="model">sale.order</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Sales Order">
- <group col="6" colspan="4">
- <field name="name"/>
- <field name="date_order"/>
- <field name="invoiced"/>
- <field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection"/>
- <field name="client_order_ref"/>
- <field name="shipped"/>
+ <form layout="manual">
+ <div class="oe_form_topbar">
+ <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/>
+ <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/>
+ <button name="ship_recreate" states="shipping_except" string="Recreate Packing" icon="gtk-ok"/>
+ <button name="ship_corrected" states="shipping_except" string="Ignore Exception" icon="gtk-apply"/>
+ <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/>
+ <button name="%(report_sale_order)d" string="Print Order" type="action" icon="gtk-print" states="waiting_date,manual,progress,done,shipping_except,invoice_except"/>
+ <button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/>
+ <button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/>
+ <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
+ <button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/>
+ <button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/>
+ <button name="%(report_sale_order)d" string="Print Quotation" type="action" icon="gtk-print" states="draft"/>
+ <button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/>
+ <button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute" states="draft,manual" groups="base.group_extended"/>
+ <div class="oe_right">
+ <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
+ </div>
+ </div>
+ <sheet string="Sales Order" layout="auto">
+ <group col="6" colspan="4" class="oe_form_header">
+ <group col="4" colspan="4">
+ <field name="name"/>
+ <field name="date_order"/>
+ <field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection" groups="base.group_extended"/>
+ <field name="client_order_ref"/>
+ </group>
+ <group col="2" colspan="2">
+ <field name="invoiced"/>
+ <field name="shipped"/>
+ </group>
</group>
<notebook colspan="5">
<page string="Sales Order">
- <field name="partner_id" options='{"quick_create": false}' on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1"/>
- <field domain="[('partner_id','=',partner_id)]" name="partner_order_id" on_change="onchange_partner_order_id(partner_order_id, partner_invoice_id, partner_shipping_id)" options='{"quick_create": false}'/>
- <field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" groups="base.group_extended" options='{"quick_create": false}'/>
- <field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" groups="base.group_extended" options='{"quick_create": false}'/>
- <field domain="[('type','=','sale')]" name="pricelist_id" groups="base.group_extended" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
- <field name="project_id" context="{'partner_id':partner_id, 'contact_id':partner_order_id, 'pricelist_id':pricelist_id, 'default_name':name}" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
+ <field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" />
+ <field domain="[('parent_id','=',partner_id)]" name="partner_invoice_id" groups="sale.group_delivery_invoice_address" options='{"quick_create": false}'/>
+ <field domain="[('parent_id','=',partner_id)]" name="partner_shipping_id" groups="sale.group_delivery_invoice_address" options='{"quick_create": false}'/>
+ <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
+ <field name="project_id" context="{'partner_id':partner_id, 'pricelist_id':pricelist_id, 'default_name':name}" groups="sale.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
<newline/>
- <field colspan="4" mode="tree,form,graph" name="order_line" nolabel="1" widget="one2many_list">
+ <field colspan="4" name="order_line" nolabel="1" widget="one2many_list">
<form string="Sales Order Lines">
<notebook>
<page string="Order Line">
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
name="product_uom_qty"
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, context)"/>
- <field name="product_uom"
- on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, context)"
- nolabel="1"/>
+ <group colspan="1">
+ <field name="product_uom" nolabel="1" groups="product.group_uom"
+ on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, context)"/>
+ </group>
<field name="price_unit"/>
<field groups="product.group_uos" name="product_uos_qty"/>
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}" on_change="product_packaging_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, parent.partner_id, product_packaging, True, context)"
domain="[('product_id','=',product_id)]" groups="base.group_extended"
colspan="3"/>
- <field name="discount"/>
- <separator colspan="5" string="Notes"/>
- <field colspan="5" name="notes" nolabel="1"/>
+ <field name="discount" groups="sale.group_discount_per_so_line"/>
+ <separator colspan="5" string="Notes" groups="base.group_sale_notes_subtotal"/>
+ <field colspan="5" name="notes" nolabel="1" groups="base.group_sale_notes_subtotal"/>
<separator colspan="5" string="Taxes"/>
<field colspan="5" name="tax_id" nolabel="1" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
<group colspan="5" col="5" groups="base.group_extended">
</group>
</group>
</page>
- <page groups="base.group_extended" string="Extra Info">
+ <page string="Extra Info" groups="product.group_mrp_properties">
<field name="type"/>
<field name="delay"/>
<field name="th_weight"/>
<tree string="Sales Order Lines">
<field colspan="4" name="name"/>
<field name="product_uom_qty" string="Qty(UoM)"/>
- <field name="product_uom" string="UoM"/>
+ <field name="product_uom" string="UoM" groups="product.group_uom"/>
<field groups="product.group_uos" name="product_uos_qty" string="Qty(UoS)"/>
<field groups="product.group_uos" name="product_uos" string="UoS"/>
- <field name="discount"/>
+ <field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="price_unit"/>
- <field name="price_subtotal"/>
+ <field name="price_subtotal" groups="base.group_sale_notes_subtotal"/>
</tree>
</field>
- <newline/>
- <group col="13" colspan="10">
- <field name="amount_untaxed" sum="Untaxed amount"/>
- <field name="amount_tax"/>
- <field name="amount_total"/>
- <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
- <button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute" states="draft,manual" groups="base.group_extended"/>
- </group>
- <group col="13" colspan="4">
- <field name="state" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
- <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/>
- <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/>
- <button name="ship_recreate" states="shipping_except" string="Recreate Packing" icon="gtk-ok"/>
- <button name="ship_corrected" states="shipping_except" string="Ignore Exception" icon="gtk-apply"/>
- <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/>
- <button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/>
- <button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/>
- <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
- <button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/>
- <button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/>
- <button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/>
- </group>
+
+ <div class="oe_right">
+ <group col="2">
+ <field name="amount_untaxed" sum="Untaxed amount"/>
+ <field name="amount_tax"/>
+ <field name="amount_total"/>
+ </group>
+ </div>
+ <div class="oe_clear"/>
+
+ <separator colspan="4" string="Notes"/>
+ <field colspan="4" name="note" nolabel="1"/>
</page>
<page string="Other Information">
<group colspan="2" col="2" groups="base.group_extended" name="logistics">
<field name="user_id"/>
<field groups="base.group_extended" name="origin"/>
</group>
- <group colspan="2" col="2" groups="base.group_extended">
+ <group name="sale_pay" colspan="2" col="2" groups="base.group_extended" >
<separator string="Conditions" colspan="2"/>
<field name="payment_term" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
- <group colspan="2" col="2" groups="base.group_extended">
- <separator string="Dates" colspan="2"/>
- <field name="create_date"/>
- <field name="date_confirm"/>
- </group>
- <separator colspan="4" string="Notes"/>
- <field colspan="4" name="note" nolabel="1"/>
+ <separator colspan="4" string="Notes" groups="base.group_sale_notes_subtotal"/>
+ <field colspan="4" name="note" nolabel="1" groups="base.group_sale_notes_subtotal"/>
</page>
<page string="History" groups="base.group_extended">
<separator colspan="4" string="Invoices"/>
<field colspan="4" name="picking_ids" nolabel="1"/>
</page>
</notebook>
+ </sheet>
+ <div class="oe_form_sheet_width">
+ <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
+ </div>
</form>
</field>
</record>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Sales Order">
- <filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]" help="Sales Order that haven't yet been confirmed"/>
- <filter icon="terp-check" string="Sales" domain="[('state','in',('manual','progress'))]"/>
+ <filter icon="terp-document-new" string="Quotations" name="draft" domain="[('state','=','draft')]" help="Sales Order that haven't yet been confirmed"/>
+ <filter icon="terp-check" string="Sales" name="sales" domain="[('state','in',('manual','progress'))]"/>
<separator orientation="vertical"/>
<filter icon="terp-dolar_ok!" string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
<separator orientation="vertical"/>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="search_view_id" ref="view_sales_order_filter"/>
- <field name="context">{}</field>
+ <field name="context">{"search_default_sales":1}</field>
<field name="help">Sales Orders help you manage quotations and orders from your customers. OpenERP suggests that you start by creating a quotation. Once it is confirmed, the quotation will be converted into a Sales Order. OpenERP can handle several types of products so that a sales order may trigger tasks, delivery orders, manufacturing orders, purchases and so on. Based on the configuration of the sales order, a draft invoice will be generated so that you just have to confirm it when you want to bill your customer.</field>
</record>
- <menuitem action="action_order_form" id="menu_sale_order" parent="base.menu_sales" sequence="3" groups="base.group_sale_salesman,base.group_sale_manager"/>
+ <menuitem action="action_order_form" id="menu_sale_order" parent="base.menu_sales" sequence="4" groups="base.group_sale_salesman,base.group_sale_manager"/>
<record id="action_order_tree2" model="ir.actions.act_window">
<field name="name">Sales in Exception</field>
<record id="action_order_tree5" model="ir.actions.act_window">
- <field name="name">All Quotations</field>
+ <field name="name">Quotations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
- <field name="domain">[('state','=','draft')]</field>
+ <field name="context">{"search_default_draft":1}</field>
<field name="search_view_id" ref="view_sales_order_filter"/>
</record>
+ <menuitem id="menu_sale_quotations"
+ action="action_order_tree5" parent="base.menu_sales"
+ sequence="3" />
+
<record id="action_order_tree" model="ir.actions.act_window">
<field name="name">Old Quotations</field>
<field name="type">ir.actions.act_window</field>
<field name="order_partner_id"/>
<field name="product_id"/>
<field name="product_uom_qty" string="Qty"/>
- <field name="product_uom" string="UoM"/>
+ <field name="product_uom" string="UoM" groups="product.group_uom"/>
<field name="salesman_id"/>
- <field name="price_subtotal" sum="Total"/>
+ <field name="price_subtotal" sum="Total" groups="base.group_sale_notes_subtotal"/>
<field name="state"/>
<field name="invoiced"/>
</tree>
<field name="product_id" readonly="1"/>
<field name="product_uom_qty" readonly="1"/>
- <field name="product_uom"/>
+ <field name="product_uom" groups="product.group_uom"/>
+ <newline/>
<field colspan="4" name="name" groups="base.group_extended"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<separator colspan="4" string="Price"/>
<group colspan="4" col="6">
<field name="price_unit"/>
- <field name="discount"/>
- <field name="price_subtotal"/>
+ <field name="discount" groups="sale.group_discount_per_so_line"/>
+ <field name="price_subtotal" groups="base.group_sale_notes_subtotal"/>
</group>
- <separator colspan="4" string="Notes"/>
- <field colspan="4" name="notes" nolabel="1"/>
+ <separator colspan="4" string="Notes" groups="base.group_sale_notes_subtotal"/>
+ <field colspan="4" name="notes" nolabel="1" groups="base.group_sale_notes_subtotal"/>
<separator colspan="4"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
<group col="3" colspan="2">
</record>
<record id="action_order_line_tree2" model="ir.actions.act_window">
- <field name="name">Lines to Invoice</field>
+ <field name="name">Order Lines to Invoice</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order.line</field>
<field name="view_type">form</field>
src_model="product.product"
groups="base.group_sale_salesman"/>
- <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5" groups="-base.group_extended"/>
- <menuitem id="menu_invoicing_sales_order_lines" parent="base.menu_invoiced" action="action_order_line_tree2" sequence="2" groups="base.group_no_one"/>
-
- <!-- configartion view -->
-
- <record id="view_config_picking_policy" model="ir.ui.view">
- <field name="name">Setup Your Invoicing Method</field>
- <field name="model">sale.config.picking_policy</field>
- <field name="type">form</field>
- <field name="inherit_id" ref="base.res_config_view_base"/>
- <field name="arch" type="xml">
- <data>
- <form position="attributes">
- <attribute name="string">Setup your Invoicing Method</attribute>
- </form>
-
- <xpath expr="//separator[@string="title"]" position="attributes">
- <attribute name="string">Setup your Invoicing Method</attribute>
- </xpath>
- <xpath expr="//label[@string='description']" position="attributes">
- <attribute name="string">This tool will help you to install the right module and configure the system according to the method you use to invoice your customers.</attribute>
- </xpath>
- <xpath expr="//separator[@string="vsep"]" position="attributes">
- <attribute name="string"/>
- <attribute name="rowspan">12</attribute>
- </xpath>
- <group string="res_config_contents" position="replace">
- <group colspan="4" col="4">
- <field name="sale_orders" on_change="onchange_order(sale_orders,deli_orders)"/>
- <newline/>
- <field name="deli_orders" on_change="onchange_order(sale_orders,deli_orders)"/>
- <newline/>
- <field name="task_work"/>
- <newline/>
- <field name="timesheet"/>
- <newline/>
- <separator string="Options" colspan="4"/>
- <field name="order_policy" attrs="{'invisible':['|',('sale_orders','!=',True),('deli_orders','!=',True)]}"/>
- <newline/>
- <field name="charge_delivery" attrs="{'invisible':[('sale_orders','!=',True), ('deli_orders','!=',True)]}"/>
- <newline/>
- <field name="time_unit" widget="selection" domain="[('category_id','=',%(product.uom_categ_wtime)s)]" attrs="{'invisible':[('task_work','=',False),('timesheet','=',False)]}"/>
- </group>
- </group>
- </data>
- </field>
- </record>
-
- <record id="action_config_picking_policy" model="ir.actions.act_window">
- <field name="name">Setup your Invoicing Method</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">sale.config.picking_policy</field>
- <field name="view_id" ref="view_config_picking_policy"/>
- <field name="view_type">form</field>
- <field name="view_mode">form</field>
- <field name="target">new</field>
- </record>
-
- <!-- register configuration wizard -->
- <record id="config_wizard_step_sale_picking_policy" model="ir.actions.todo">
- <field name="action_id" ref="action_config_picking_policy"/>
- <field name="category_id" ref="base.category_sales_management_config"/>
- <field name="type">once</field>
- </record>
+ <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>
+ <menuitem id="menu_invoicing_sales_order_lines" parent="base.menu_invoiced" action="action_order_line_tree2" sequence="10" groups="sale.group_invoice_so_lines"/>
</data>
</openerp>