[REF] Review some form views with the guide lines

bzr revid: stw@openerp.com-20120613090657-xfz9vtvqek3znqdr
This commit is contained in:
Stephane Wirtel 2012-06-13 11:06:57 +02:00
parent b846d5fec2
commit d36169b906
19 changed files with 400 additions and 356 deletions

View File

@ -9,19 +9,16 @@
<field name="arch" type="xml">
<notebook position="inside">
<page string="Accounting">
<group name="properties">
<separator string="Sales Properties" colspan="2"/>
<separator string="Purchase Properties" colspan="2"/>
<field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('sale_ok','=',0)]}"/>
<field name="property_account_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}"/>
</group>
<newline/>
<group colspan="2">
<separator string="Sale Taxes" colspan="2"/>
<separator string="Purchase Taxes" colspan="2"/>
<field name="taxes_id" nolabel="1" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}"/>
<field name="supplier_taxes_id" nolabel="1" colspan="2" attrs="{'readonly':[('purchase_ok','=',0)]}"/>
</group>
<group name="properties">
<group>
<field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('sale_ok','=',0)]}"/>
<field name="taxes_id" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}" widget="many2many_tags"/>
</group>
<group>
<field name="property_account_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}"/>
<field name="supplier_taxes_id" colspan="2" attrs="{'readonly':[('purchase_ok','=',0)]}" widget="many2many_tags"/>
</group>
</group>
</page>
</notebook>
</field>

View File

@ -40,27 +40,6 @@
<field name="act_window_id" ref="crm_case_category_act_leads_all"/>
</record>
<act_window
id="act_crm_opportunity_crm_phonecall_new"
name="Phone calls"
groups="base.group_sale_salesman"
res_model="crm.phonecall"
src_model="crm.lead"
view_mode="tree,calendar,form"
context="{'default_duration': 1.0 ,'default_opportunity_id': active_id,'default_partner_phone':phone}"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<act_window
id="act_crm_opportunity_crm_meeting_new"
name="Meetings"
res_model="crm.meeting"
src_model="crm.lead"
view_mode="tree,form,calendar"
context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
<field name="name">Opportunities</field>
<field name="res_model">crm.lead</field>

View File

@ -53,6 +53,25 @@
<!--
LEADS
-->
<act_window
id="act_crm_opportunity_crm_phonecall_new"
name="Phone calls"
groups="base.group_sale_salesman"
res_model="crm.phonecall"
view_mode="tree,calendar,form"
context="{'default_duration': 1.0 ,'default_opportunity_id': active_id,'default_partner_phone':phone}"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<act_window
id="act_crm_opportunity_crm_meeting_new"
name="Meetings"
res_model="crm.meeting"
view_mode="tree,form,calendar"
context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<!-- CRM Lead Form View -->
<record model="ir.ui.view" id="crm_case_form_view_leads">
@ -74,6 +93,16 @@
on_change="onchange_stage_id(stage_id)"/>
</header>
<sheet>
<div class="oe_right oe_form_button_box" name="buttons">
<button type="action"
name="%(act_crm_opportunity_crm_meeting_new)d"
string="Meetings" />
<button type="action"
name="%(act_crm_opportunity_crm_phonecall_new)d"
string="Phone Calls" />
</div>
<label for="name" class="oe_form_readonly_hidden" string="Lead Description"/>
<h1><field name="name" placeholder="Describe the lead..."/></h1>
<group>
@ -220,10 +249,9 @@
<ul class="oe_kanban_menu">
<li><a type="edit" >Edit...</a></li>
<li><a type="delete">Delete</a></li>
<li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send New Email</a></li>
<li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
<li><a name="%(opportunity2phonecall_act)d" type="action">Log Call</a></li>
<li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
<li><a name="%(crm.action_crm_add_note)d" context="{'model': 'crm.lead' }" type="action">Add Internal Note</a></li>
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
</ul>
<div class="oe_kanban_content">
@ -363,6 +391,10 @@
<field name="arch" type="xml">
<form string="Opportunities" version="7.0">
<header>
<button name="stage_previous" string="Previous" type="object"
states="open" icon="gtk-go-back" context="{'stage_type': 'opportunity'}"/>
<button name="stage_next" string="Next" type="object"
states="open" icon="gtk-go-forward" context="{'stage_type': 'opportunity'}"/>
<button name="case_mark_won" string="Mark Won" type="object"
states="draft,open,pending"/>
<button name="case_open" string="Open" type="object"
@ -375,10 +407,6 @@
states="done,cancel"/>
<button name="case_cancel" string="Cancel" type="object"
states="draft"/>
<button name="stage_previous" string="Previous" type="object"
states="open" icon="gtk-go-back" context="{'stage_type': 'opportunity'}"/>
<button name="stage_next" string="Next" type="object"
states="open" icon="gtk-go-forward" context="{'stage_type': 'opportunity'}"/>
<field name="stage_id" widget="statusbar"
on_change="onchange_stage_id(stage_id)"/>
</header>

View File

@ -1,12 +1,10 @@
<?xml version="1.0"?>
<openerp>
<data>
<act_window
id="crm_case_categ_meet_create_partner"
name="Schedule a Meeting"
res_model="crm.meeting"
src_model="res.partner"
view_mode="calendar,tree,form,gantt"
context="{'search_default_partner_id': active_id, 'default_duration': 4.0}"
domain="[('partner_id', '=', active_id)]"

View File

@ -38,52 +38,62 @@
<field name="state" widget="statusbar" statusbar_visible="draft,open,done"/>
</header>
<sheet>
<group col="6" colspan="4">
<field name="name" string="Title"
required="1" />
<field name="categ_id" widget="selection"
string="Meeting Type"
domain="[('object_id.model', '=', 'crm.meeting')]" />
<field name="allday" on_change="onchange_dates(date,False,False,allday)" />
<newline/>
<field name="date" string="Start Date" required="1"
on_change="onchange_dates(date,duration,False,allday)" />
<field name="duration" widget="float_time"
on_change="onchange_dates(date,duration,False,allday)" />
<field name="date_deadline" string="End Date" required="1"
on_change="onchange_dates(date,False,date_deadline)" />
<field name="location" />
<field name="alarm_id" string="Reminder"
widget="selection" />
<group colspan="2" col="4" attrs="{'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">
<field name="recurrency" string="Recurrence"/>
<div class="oe_form_title">
<div class="oe_form_readonly_hidden">
<label for="name" string="Title"/>
(<field name="allday" on_change="onchange_dates(date,False,False,allday)" class="oe_form_inline"/>
<label for="allday" string="All Day?"/>)
</div>
<h1>
<field name="name"/>
</h1>
<h2>
At <field name="location" class="oe_form_inline" />
</h2>
</div>
<h2>
<label for="duration" string="Duration" />
<field name="duration" widget="float_time"
on_change="onchange_dates(date,duration,False,allday)"
class="oe_form_inline"/> from
<field name="date"
string="Start Date"
required="1"
class="oe_form_readonly_hidden oe_form_inline"/> to
<field name="date_deadline"
string="End Date" required="1"
on_change="onchange_dates(date,False,date_deadline)"
class="oe_form_inline"/>
</h2>
<group colspan="4" col="4">
<group colspan="2">
<field name="user_id" />
<field name="organizer"/>
<field name="section_id" widget="selection"/>
</group>
<group colspan="2">
<field name="alarm_id" string="Reminder" widget="selection" />
<field name="class" string="Privacy"/>
<field name="show_as" string="Show Time as"/>
<field name="recurrency" string="Recurrence" attrs="{'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}"/>
</group>
<group colspan="2">
<field name="partner_id" string="Partner"
on_change="onchange_partner_id(partner_id)" />
<field name="email_from"/>
</group>
<group colspan="2">
<field name="categ_id" widget="selection"
string="Meeting Type"
domain="[('object_id.model', '=', 'crm.meeting')]" />
<field name="rrule" invisible="1" readonly="1"/>
<field name="recurrent_id" invisible="1"/>
<field name="recurrent_uid" invisible="1"/>
</group>
</group>
<separator string="Description" colspan="4" />
<field name="description" nolabel="1" colspan="4" />
<notebook>
<page string="Meeting">
<group col="6" colspan="4">
<group col="2" colspan="2">
<separator colspan="2" string="Assignment"/>
<field name="user_id" />
<field name="organizer"/>
<field name="section_id" widget="selection"/>
</group><group col="2" colspan="2">
<separator colspan="2" string="Contacts"/>
<field name="partner_id" string="Partner"
on_change="onchange_partner_id(partner_id)" />
<field name="email_from"/>
</group><group col="2" colspan="2">
<separator colspan="2" string="Visibility"/>
<field name="class" string="Privacy"/>
<field name="show_as" string="Show Time as"/>
<field name="rrule" invisible="1" readonly="1"/>
<field name="recurrent_id" invisible="1"/>
<field name="recurrent_uid" invisible="1"/>
</group>
</group>
<separator string="Description" colspan="4" />
<field name="description" nolabel="1" colspan="4" />
</page>
<page string="Invitation Detail">
<button string="Invite People"
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
@ -157,12 +167,11 @@
</form>
</field>
</page>
<page string="Recurrence Options" attrs="{'invisible': [('recurrency','=',False)], 'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">
<page string="Recurrence Options"><!-- attrs="{'invisible': [('recurrency','=',False)], 'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">-->
<group col="4" colspan="4" name="rrule">
<group col="4" colspan="4">
<field name="rrule_type" string=" Recurrence Pattern" />
<field name="interval" />
<separator string="End of Recurrence" colspan="4"/>
<field name="end_type" />
<label string=" " colspan="2" />
<newline />
@ -209,9 +218,9 @@
</page>
</notebook>
</sheet>
<div class="oe_form_bottom">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>

View File

@ -6,7 +6,6 @@
id="crm_case_categ_phone_create_partner"
name="Schedule a Call"
res_model="crm.phonecall"
src_model="res.partner"
view_mode="calendar,tree,form"
context="{'search_default_partner_id': [active_id], 'default_duration': 1.0, 'default_partner_id': active_id}"
groups="base.group_sale_salesman"

View File

@ -65,50 +65,48 @@
<form version="7.0">
<header>
<button name="case_open" string="Confirm" type="object"
states="draft,pending" icon="gtk-go-forward"/>
states="draft,pending"/>
<button name="case_close" string="Held" type="object"
states="open,pending" icon="gtk-jump-to"/>
states="open,pending"/>
<button name="case_reset" string="Reset to Todo" type="object"
states="cancel" icon="gtk-convert"/>
states="cancel"/>
<button name="case_cancel" string="Cancel" type="object"
states="draft,open,pending" icon="gtk-cancel"/>
states="draft,open,pending"/>
<button string="Convert to Opportunity"
name="%(phonecall2opportunity_act)d"
icon="gtk-index" type="action"
type="action"
attrs="{'invisible':[('opportunity_id','!=',False)]}" />
<button string="Schedule Other Call"
icon="terp-call-start"
name="%(phonecall_to_phonecall_act)d"
type="action" />
<button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
<button string="Schedule a Meeting" name="action_make_meeting" type="object"/>
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,done"/>
</header>
<sheet string="Phone Call">
<div class="oe_form_title">
<div class="oe_form_readonly_hidden">
<label for="name" string="Title"/>
</div>
<h1><field name="name" required="1"/></h1>
<div class="oe_form_readonly_hidden">
<label for="partner_phone" string="Phone" />
</div>
<h2><field name="partner_phone"/></h2>
</div>
<group col="4">
<field name="name" required="1"/>
<field name="partner_phone"/>
<field name="duration" widget="float_time"/>
<field name="date"/>
<field name="user_id"/>
<field name="date" />
<field name="user_id" />
<field name="duration" widget="float_time" />
<field name="section_id" colspan="1" widget="selection" />
<field name="partner_id" on_change="onchange_partner_id(partner_id)" />
<field name="categ_id" widget="selection"
domain="[('object_id.model', '=', 'crm.phonecall')]"/>
<field name="partner_mobile" />
<field name="priority"/>
<field name="opportunity_id"/>
</group>
<group>
<group string="Contacts">
<field name="partner_id"
on_change="onchange_partner_id(partner_id)" />
<field name="partner_mobile"/>
</group>
<group string="Categorization">
<field name="categ_id" widget="selection"
domain="[('object_id.model', '=', 'crm.phonecall')]"/>
<field name="priority"/>
<field name="opportunity_id"/>
</group>
</group>
<separator string="Description"/>
<field name="description"/>
<field name="description" placeholder="Description..." />
</sheet>
<footer>
<field name="message_ids" widget="ThreadView"/>

View File

@ -158,13 +158,13 @@
<form string="Stage" version="7.0">
<group col="4">
<field name="name"/>
<field name="state" string="Related State" />
<field name="probability"/>
<field name="on_change"/>
<field name="case_default"/>
<field name="sequence"/>
<field name="state"/>
<field name="fold"/>
<field name="type"/>
<field name="on_change"/>
<field name="sequence"/>
<field name="case_default"/>
<field name="fold"/>
</group>
<separator string="Requirements"/>
<field name="requirements" nolabel="1"/>

View File

@ -82,6 +82,27 @@
</field>
</record>
<record model="ir.ui.view" id="res_partner_view_buttons">
<field name="name">res.partner.view.buttons</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside">
<button type="action"
string="Schedule a Meeting"
name="%(crm.crm_case_categ_meet_create_partner)d"
context="{'search_default_partner_id': [active_id], 'default_duration': 4.0}"/>
<button type="action" string="Schedule a Call"
name="%(crm.crm_case_categ_phone_create_partner)d"
context="{'search_default_partner_id': [active_id], 'default_duration': 1.0, 'default_partner_id': active_id}" />
<button type="action" string="Create an Opportunity"
name="%(crm.action_view_crm_partner2opportunity)d" />
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -10,29 +10,29 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Schedule/Log a Call" layout="manual" version="7.0">
<header>
<button name="action_schedule" type="object" string="Log call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'log')]}" />
<button name="action_schedule" type="object" string="Schedule Call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'schedule')]}" />
<button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
</header>
<group>
<header>
<button name="action_schedule" type="object" string="Log call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'log')]}" />
<button name="action_schedule" type="object" string="Schedule Call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'schedule')]}" />
<button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
</header>
<group>
<field name="action"/>
<field name="name"/>
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
<group>
<field name="action"/>
<field name="name"/>
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
</group>
<group>
<field name="partner_id" readonly="True"/>
<field name="categ_id" string="Type"
widget="selection"
domain="[('object_id.model', '=', 'crm.phonecall')]"
groups="base.group_no_one"/>
<field name="phone"/>
<field name="user_id" attrs="{'invisible': [('action','=','log')]}"/>
<field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}"/>
</group>
</group>
<group>
<field name="partner_id" readonly="True"/>
<field name="categ_id" string="Type"
widget="selection"
domain="[('object_id.model', '=', 'crm.phonecall')]"
groups="base.group_no_one"/>
<field name="phone"/>
<field name="user_id" attrs="{'invisible': [('action','=','log')]}"/>
<field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}"/>
</group>
</group>
<field name="note"/>
<field name="note" placeholder="Call Description" />
</form>
</field>
</record>

View File

@ -42,5 +42,4 @@
view_mode="form" target="new" view_type="form"
groups="base.group_sale_salesman"/>
</data>
</openerp>

View File

@ -9,8 +9,10 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet" position="after">
<field name="message_ids" widget="ThreadView" nolabel="1"
<footer>
<field name="message_ids" widget="ThreadView"
options='{"thread_level": 1}'/>
</footer>
</xpath>
</field>
</record>

View File

@ -69,118 +69,124 @@
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<form string="Product" layout="auto" version="7.0">
<field name="product_image" widget='image' class="oe_form_avatar oe_right"/>
<label for="name" class="oe_form_readonly_hidden"/>
<h1><field name="name"/></h1>
<label for="categ_id" class="oe_form_readonly_hidden"/>
<h2><field name="categ_id"/></h2>
<sheet>
<field name="product_image" widget="image" class="oe_form_avatar oe_right" />
<notebook>
<page string="Information">
<group>
<div class="oe_form_title">
<div class="oe_form_readonly_hidden">
<label for="name" string="Product Name" />
</div>
<h1>
<field name="name"/>
</h1>
<label for="categ_id" class="oe_form_readonly_hidden" />
<h2><field name="categ_id" /></h2>
</div>
<notebook>
<page string="Information">
<group>
<field name="default_code"/>
<field name="ean13" placeholder="5901234123457" />
<field groups="product.group_product_variant" name="variants" />
</group>
<group>
<field name="sale_ok"/>
<field name="purchase_ok"/>
</group>
<group string="Procurement">
<field name="type"/>
<field name="procure_method"/>
<field name="supply_method"/>
</group>
<group string="Base Prices">
<field name="list_price"/>
<field name="cost_method"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
<field name="price_margin" groups="product.group_product_variant"/>
<field name="price_extra" groups="product.group_product_variant"/>
</group>
<group groups="product.group_stock_packaging" string="Weights">
<field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
<field name="weight" attrs="{'readonly':[('type','=','service')]}"/>
<field name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
</group>
<group name="status" string="Status">
<field name="state"/>
<field name="product_manager"/>
</group>
<group name="uom" groups="product.group_uom" string="Unit of Measure">
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
<field name="uom_po_id"/>
</group>
<group name="uos" groups="product.group_uos" string="Second Unit of Measure">
<field name="uos_id"/>
<field name="uos_coeff"/>
<field name="mes_type"/>
</group>
</group>
</page>
<page string="Procurement &amp; Locations">
<group>
<group name="delay" string="Delays">
<field name="sale_delay" attrs="{'readonly':[('sale_ok','=',0)]}"/>
<field name="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
<field name="warranty"/>
</group>
<group name="store" string="Storage Localisation">
<field name="loc_rack" attrs="{'readonly':[('type','=','service')]}" />
<field name="loc_row" attrs="{'readonly':[('type','=','service')]}"/>
<field name="loc_case" attrs="{'readonly':[('type','=','service')]}"/>
</group>
<group name="misc" string="Miscellaneous">
<field name="active"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
</group>
</page>
<page string="Suppliers">
<field name="seller_ids" context="{'uom_id': uom_id}"/>
</page>
<page string="Descriptions">
<separator string="Description"/>
<field name="description"/>
<separator string="Sale Description"/>
<field name="description_sale" placeholder="This note will be displayed on quotations..."/>
<separator string="Purchase Description"/>
<field name="description_purchase" placeholder="This note will be displayed on requests for quotation..."/>
</page>
<page groups="product.group_stock_packaging" string="Packaging">
<field name="packaging">
<form string="Packaging" version="7.0">
<group col="4">
<field name="ean"/>
<field name="sequence" invisible="1"/>
<newline/>
<field name="qty"/>
<field name="ul"/>
<field name="weight_ul"/>
<separator colspan="4" string="Palletization"/>
<field name="ul_qty"/>
<field name="rows"/>
<field name="weight"/>
<separator colspan="4" string="Pallet Dimension"/>
<field name="height"/>
<field name="width"/>
<field name="length"/>
<group>
<field name="default_code"/>
<field name="ean13" placeholder="5901234123457" />
<field groups="product.group_product_variant" name="variants" />
</group>
<separator colspan="4" string="Description"/>
<field name="name"/>
</form>
</field>
</page>
</notebook>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
<group>
<field name="sale_ok"/>
<field name="purchase_ok"/>
</group>
<group string="Procurement">
<field name="type"/>
<field name="procure_method"/>
<field name="supply_method"/>
</group>
<group string="Prices">
<field name="list_price"/>
<field name="cost_method"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
<field name="price_margin" groups="product.group_product_variant"/>
<field name="price_extra" groups="product.group_product_variant"/>
</group>
<group groups="product.group_stock_packaging" string="Weights">
<field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
<field name="weight" attrs="{'readonly':[('type','=','service')]}"/>
<field name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
</group>
<group name="uom" groups="product.group_uom" string="Unit of Measure">
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
<field name="uom_po_id"/>
<field name="uos_id"/>
<field name="uos_coeff"/>
<field name="mes_type"/>
</group>
<group name="status" string="Status">
<field name="state"/>
<field name="product_manager"/>
</group>
</group>
</page>
<page string="Procurement &amp; Locations">
<group>
<group name="delay" string="Delays">
<field name="sale_delay" attrs="{'readonly':[('sale_ok','=',0)]}"/>
<field name="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
<field name="warranty"/>
</group>
<group name="store" string="Storage Localisation">
<field name="loc_rack" attrs="{'readonly':[('type','=','service')]}" />
<field name="loc_row" attrs="{'readonly':[('type','=','service')]}"/>
<field name="loc_case" attrs="{'readonly':[('type','=','service')]}"/>
</group>
<group name="misc" string="Miscellaneous">
<field name="active"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
</group>
</page>
<page string="Suppliers">
<field name="seller_ids" context="{'uom_id': uom_id}"/>
</page>
<page string="Descriptions">
<separator string="Description"/>
<field name="description"/>
<separator string="Sale Description"/>
<field name="description_sale" placeholder="This note will be displayed on quotations..."/>
<separator string="Purchase Description"/>
<field name="description_purchase" placeholder="This note will be displayed on requests for quotation..."/>
</page>
<page groups="product.group_stock_packaging" string="Packaging">
<field name="packaging">
<form string="Packaging" version="7.0">
<group col="4">
<field name="ean"/>
<field name="sequence" invisible="1"/>
<newline/>
<field name="qty"/>
<field name="ul"/>
<field name="weight_ul"/>
<separator colspan="4" string="Palletization"/>
<field name="ul_qty"/>
<field name="rows"/>
<field name="weight"/>
<separator colspan="4" string="Pallet Dimension"/>
<field name="height"/>
<field name="width"/>
<field name="length"/>
</group>
<separator colspan="4" string="Description"/>
<field name="name"/>
</form>
</field>
</page>
</notebook>
</sheet>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>

View File

@ -212,7 +212,7 @@ class sale_order(osv.osv):
('shipping_except', 'Shipping Exception'),
('invoice_except', 'Invoice Exception'),
('done', 'Done'),
], 'Order State', readonly=True, help="Gives the state of the quotation or sales order. \nThe exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception). \nThe 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to run on the order date.", select=True),
], 'Status', readonly=True, help="Gives the state of the quotation or sales order. \nThe exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception). \nThe 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to run on the order date.", select=True),
'date_order': fields.date('Date', required=True, readonly=True, select=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}),
'create_date': fields.datetime('Creation Date', readonly=True, select=True, help="Date on which sales order is created."),
'date_confirm': fields.date('Confirmation Date', readonly=True, select=True, help="Date on which sales order is confirmed."),

View File

@ -90,7 +90,6 @@
<field name="user_id"/>
<field name="picked_rate" widget="progressbar"/>
<field name="invoiced_rate" widget="progressbar"/>
<field name="amount_untaxed" sum="Total Tax Excluded"/>
<field name="amount_total" sum="Total Tax Included"/>
<field name="state"/>
</tree>
@ -149,11 +148,16 @@
<page string="Order Lines">
<field name="order_line">
<form string="Sales Order Lines" version="7.0">
<field name="product_id"
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
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, True, parent.date_order, product_packaging, parent.fiscal_position, False, context)"/>
<field name="name" placeholder="Porduct/Service characteristics"/>
<group>
<header>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
</header>
<group col="4" colspan="4">
<group>
<field name="product_id"
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
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, True, parent.date_order, product_packaging, parent.fiscal_position, False, context)"/>
<field name="name" placeholder="Product/Service characteristics"/>
</group>
<group>
<label for="product_uom_qty"/>
<div>
@ -172,14 +176,16 @@
</div>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
</group><group>
</group>
</group>
<group>
<group>
<field name="product_packaging"
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="product.group_stock_packaging"
colspan="3"/>
<field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
<field name="invoiced"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/>
<button name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoices" type="action" icon="terp-document-new"/>
</group>
<group col="4">
@ -189,7 +195,7 @@
<field name="address_allotment_id"/>
</group>
<separator string="Properties" colspan="2"/>
<field name="property_ids"/>
<field name="property_ids" colspan="4" nolabel="1" />
<separator string="Notes" groups="base.group_sale_notes_subtotal"/>
<field name="notes" groups="base.group_sale_notes_subtotal"/>
<div groups="base.group_no_one">

View File

@ -9,9 +9,9 @@
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<data>
<field name="state" position="before">
<xpath expr="/form/header/button[@name='stage_previous']" position="before">
<button string="Convert to Quote" name="%(action_crm_make_sale)d" type="action"/>
</field>
</xpath>
</data>
</field>
</record>

View File

@ -120,6 +120,7 @@ class crm_make_sale(osv.osv_memory):
'res_model': 'sale.order',
'view_id': False,
'type': 'ir.actions.act_window',
'name' : _('Quotation'),
'res_id': new_ids and new_ids[0]
}
else:
@ -130,6 +131,7 @@ class crm_make_sale(osv.osv_memory):
'res_model': 'sale.order',
'view_id': False,
'type': 'ir.actions.act_window',
'name' : _('Quotation'),
'res_id': new_ids
}
return value
@ -145,9 +147,9 @@ class crm_make_sale(osv.osv_memory):
'close': fields.boolean('Close Opportunity', help='Check this to close the opportunity after having created the sale order.'),
}
_defaults = {
'shop_id': _get_shop_id,
'close': False,
'partner_id': _selectPartner,
'shop_id': _get_shop_id,
'close': False,
'partner_id': _selectPartner,
}
crm_make_sale()

View File

@ -62,11 +62,11 @@
<field name="arch" type="xml">
<field name="standard_price" position="replace">
<label string="Cost Price" for="standard_price" align="1.0"/>
<group col="2" colspan="1">
<div>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/>
<button name="%(action_view_change_standard_price)d" string="Update"
type="action" icon="gtk-execute" attrs="{'invisible':[('cost_method','&lt;&gt;','average')]}"/>
</group>
</div>
</field>
</field>
</record>
@ -78,7 +78,7 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="priority">26</field>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/group[@name='properties']" position="before">
<xpath expr="//group[@name='properties']" position="before">
<group groups="stock.group_inventory_valuation">
<separator string="Inventory Valuation" colspan="4"/>
<group colspan="2" col="2">
@ -102,22 +102,20 @@
<field name="type">form</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<group name="status" position="after">
<group colspan="2" col="3">
<separator string="Stocks" colspan="4"/>
<group name="status" position="before">
<group string="Stock and Expected Variations">
<field name="qty_available"/>
<button name="%(action_view_change_product_quantity)d" string="Update" attrs="{'invisible': [('type', '=', 'service')]}"
type="action" icon="gtk-execute" groups="stock.group_stock_manager,stock.group_stock_user"/>
<newline/>
<field name="virtual_available"/>
</group>
<group colspan="2" col="2" name="stock_variations">
<separator string="Expected Stock Variations" colspan="2"/>
<field name="incoming_qty"/>
<label for="virtual_available" />
<div>
<field name="virtual_available" class="oe_form_inline" />
<button name="%(action_view_change_product_quantity)d" string="Update" attrs="{'invisible': [('type', '=', 'service')]}"
type="action" icon="gtk-execute" groups="stock.group_stock_manager,stock.group_stock_user" class="oe_form_inline" />
</div>
<field name="outgoing_qty"/>
</group>
<group colspan="2" col="2" name="lot" groups="stock.group_tracking_lot,stock.group_production_lot">
<separator string="Lots" colspan="4"/>
<group name="lot" groups="stock.group_tracking_lot,stock.group_production_lot" string="Lots">
<field name="track_production" groups="stock.group_production_lot"/>
<field name="track_incoming" groups="stock.group_tracking_lot"/>
<field name="track_outgoing" groups="stock.group_tracking_lot"/>

View File

@ -783,62 +783,62 @@
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
<button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
<field name="state" widget="statusbar"/>
<field name="state" widget="statusbar" status_visible="draft,assigned,done" />
</header>
<group>
<group string="Move Information">
<field name="name" invisible="1"/>
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
<label for="product_qty"/>
<div>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_form_inline"/>
<field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_form_inline"/>
<button name="%(stock.move_scrap)d"
string="Scrap" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
</div>
<label for="product_uos_qty" groups="product.group_uos"/>
<div>
<field name="product_uos_qty" groups="product.group_uos" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" class="oe_form_inline"/>
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_form_inline"/>
</div>
<field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]"/>
</group>
<group string="Move Information">
<field name="name" invisible="1"/>
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
<label for="product_qty"/>
<div>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_form_inline"/>
<field name="product_uom" string="Unit Of Measure" groups="product.group_uom" class="oe_form_inline"/>
<button name="%(stock.move_scrap)d"
string="Scrap" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
</div>
<label for="product_uos_qty" groups="product.group_uos"/>
<div>
<field name="product_uos_qty" groups="product.group_uos" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" class="oe_form_inline"/>
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_form_inline"/>
</div>
<field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]"/>
</group>
<group string="Locations" groups="stock.group_locations">
<field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
</group>
<group string="Dates">
<field name="create_date" invisible="1"/>
<field name="date"/>
<field name="date_expected" on_change="onchange_date(date,date_expected)"/>
</group>
<group string="Dates">
<field name="create_date" invisible="1"/>
<field name="date"/>
<field name="date_expected" on_change="onchange_date(date,date_expected)"/>
</group>
<group string="Locations" groups="stock.group_locations">
<field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
</group>
<group groups="stock.group_tracking_lot" string="Traceability">
<label for="tracking_id"/>
<div>
<field name="tracking_id" groups="stock.group_tracking_lot" class="oe_form_inline"/>
<button name="%(split_into)d" string="New Pack" type="action"
groups="product.group_stock_packaging"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed"/>
</div>
<group groups="stock.group_tracking_lot" string="Traceability">
<label for="tracking_id"/>
<div>
<field name="tracking_id" groups="stock.group_tracking_lot" class="oe_form_inline"/>
<button name="%(split_into)d" string="New Pack" type="action"
groups="product.group_stock_packaging"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed"/>
</div>
<label for="prodlot_id"/>
<div>
<field name="prodlot_id" groups="stock.group_production_lot"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" class="oe_form_inline"/>
<button name="%(track_line)d"
groups="stock.group_tracking_lot"
states="draft,waiting,confirmed,assigned"
string="Split" type="action" icon="terp-stock_effects-object-colorize"/>
</div>
</group>
<label for="prodlot_id"/>
<div>
<field name="prodlot_id" groups="stock.group_production_lot"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" class="oe_form_inline"/>
<button name="%(track_line)d"
groups="stock.group_tracking_lot"
states="draft,waiting,confirmed,assigned"
string="Split" type="action" icon="terp-stock_effects-object-colorize"/>
</div>
</group>
</group>
</form>
</field>
@ -1219,32 +1219,37 @@
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
<label for="product_qty"/>
<div>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" class="oe_form_inline"/>
<field name="product_qty"
on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"
class="oe_form_inline"/>
<field name="product_uom" groups="product.group_uom" class="oe_form_inline"/>
<button name="%(stock.move_scrap)d"
string="Scrap" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
</div>
<label for="product_uso_qty" />
<div>
<field name="product_uos_qty"
groups="product.group_uos"
on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)"
class="oe_form_inline"/>
<field name="product_uos" groups="product.group_uos" colspan="4" class="oe_form_inline"/>
</div>
<field name="name" string="Reason"/>
</group>
<group>
<field name="picking_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="partner_id" context="{'contact_display':'partner'}"/>
</group>
<group string="Move Information">
<field name="name" string="Reason"/>
<field name="product_uos_qty" groups="product.group_uos" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" colspan="4"/>
<field name="product_uos" groups="product.group_uos" colspan="4"/>
</group>
<group string="Picking" name="picking">
<field name="picking_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group string="Dates">
<field name="create_date" groups="base.group_no_one" />
<field name="date" groups="base.group_no_one" />
<field name="date_expected" on_change="onchange_date(date,date_expected)"/>
</group>
<group string="Traceability">
<group>
<label for="tracking_id"/>
<div>
<field name="tracking_id" groups="stock.group_tracking_lot" class="oe_form_inline"/>
@ -1418,16 +1423,13 @@
<field name="product_uos" groups="product.group_uos"/>
</div>
<field name="name" string="Reason"/>
</group><group>
</group>
<group>
<field name="picking_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="partner_id"/>
</group>
<group name="picking">
<field name="picking_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group>
<field name="create_date" groups="base.group_no_one" />
<field name="date" groups="base.group_no_one" />
<field name="date_expected" on_change="onchange_date(date,date_expected)"/>