[MERGE] trunk-first_10_clicks-sale-mdi (usability fixes)

bzr revid: rco@openerp.com-20120606135605-w05zcdg3w5gsiw9h
This commit is contained in:
Raphael Collet
2012-06-06 15:56:05 +02:00
7 changed files with 54 additions and 27 deletions
+7 -7
View File
@@ -37,7 +37,7 @@
<field name="name"/>
<field name="account_id" groups="account.group_account_user"/>
<field name="quantity"/>
<field name="uos_id"/>
<field name="uos_id" groups="product.group_uom"/>
<field name="price_unit"/>
<field name="discount"/>
<field name="price_subtotal"/>
@@ -56,10 +56,10 @@
<label string="Quantity" for="quantity" align="1.0"/>
<group colspan="1" col="2">
<field name="quantity" nolabel="1"/>
<field name="uos_id" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)" nolabel="1"/>
<field name="uos_id" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)" nolabel="1" groups="product.group_uom"/>
</group>
<field name="price_unit"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)" groups="account.group_account_user"/>
<field name="discount"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
@@ -270,10 +270,10 @@
</header>
<sheet string="Invoice" layout="auto">
<group colspan="4" col="8" class="oe_form_header">
<field name="journal_id" groups="base.group_user" on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field name="journal_id" groups="account.group_account_user" on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field name="number"/>
<field name="type" invisible="1"/>
<field name="currency_id" width="50"/>
<field name="currency_id" width="50" groups="base.group_multi_company"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
<newline/>
<field string="Customer" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user" context="{'search_default_customer': 1}" options='{"quick_create": false}' domain="[('customer', '=', True)]"/>
@@ -311,9 +311,9 @@
<field name="amount_untaxed"/>
<label string="" colspan="2"/>
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="reconciled" groups="base.group_no_one"/>
<field name="amount_total"/>
<field name="residual"/>
<field name="residual" groups="account.group_account_user"/>
</group>
</page>
<page string="Other Info">
@@ -334,13 +334,13 @@
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"
/>
groups="account.group_account_user"/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','receivable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)"/>
<field name="amount_unreconciled" readonly="1" groups="account.group_account_user"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)" groups="account.group_account_user"/>
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
</tree>
</field>
+3 -3
View File
@@ -360,7 +360,7 @@
action="product_category_action"
id="product.menu_products_category"
parent="base.menu_product"
sequence="0"/>
sequence="0" groups="base.group_no_one"/>
<record id="product_category_action_form" model="ir.actions.act_window">
<field name="name">Product Categories</field>
<field name="type">ir.actions.act_window</field>
@@ -416,7 +416,7 @@
<group col="2" colspan="2">
<separator string="Unit of Measure Properties" colspan="4"/>
<field name="name" select="1"/>
<field name="category_id" select="1" widget="selection"/>
<field name="category_id" select="1"/>
<field name="active"/>
</group>
<group col="4" colspan="4">
@@ -469,7 +469,7 @@
<field name="view_mode">tree,form</field>
<field name="help">Create and manage the units of measure categories you want to be used in your system. If several units of measure are in the same category, they can be converted to each other. For example, in the unit of measure category "Time", you will have the following UoM: Hours, Days.</field>
</record>
<menuitem action="product_uom_categ_form_action" id="menu_product_uom_categ_form_action" parent="base.menu_base_config" sequence="25" groups="product.group_uom"/>
<menuitem action="product_uom_categ_form_action" id="menu_product_uom_categ_form_action" parent="base.menu_base_config" sequence="25" groups="base.group_no_one"/>
<record id="product_ul_form_view" model="ir.ui.view">
<field name="name">product.ul.form.view</field>
+20
View File
@@ -726,6 +726,26 @@ class sale_order(osv.osv):
self.cancel_send_note(cr, uid, [sale.id], context=None)
self.write(cr, uid, ids, {'state': 'cancel'})
return True
def action_button_confirm(self, cr, uid, ids, context=None):
assert len(ids) == 1, 'This option should only be used for a single id at a time'
wf_service = netsvc.LocalService('workflow')
wf_service.trg_validate(uid, 'sale.order', ids[0], 'order_confirm', cr)
# redisplay the record as a sale order
view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sale', 'view_order_form')
view_id = view_ref and view_ref[1] or False,
return {
'type': 'ir.actions.act_window',
'name': _('Sales Order'),
'res_model': 'sale.order',
'res_id': ids[0],
'view_type': 'form',
'view_mode': 'form',
'view_id': view_id,
'target': 'current',
'nodestroy': True,
}
def action_wait(self, cr, uid, ids, context=None):
for o in self.browse(cr, uid, ids):
+13 -6
View File
@@ -107,8 +107,8 @@
<button name="manual_invoice" states="manual" string="Create Final Invoice" type="object"/>
<button name="print_quotation" string="Send by Post" type="object" states="draft" class="oe_form_button_hi"/>
<button name="print_quotation" string="Send by Post" type="object" states="sent"/>
<button name="order_confirm" states="draft" string="Confirm"/>
<button name="order_confirm" states="sent" string="Confirm" class="oe_form_button_hi"/>
<button name="action_button_confirm" states="draft" string="Confirm" type="object"/>
<button name="action_button_confirm" states="sent" string="Confirm" class="oe_form_button_hi" type="object"/>
<button name="action_view_invoice" string="Open Invoice" type="object"
attrs="{'invisible': ['|','|',('state', '!=','progress'), ('invoiced', '=', True),('order_policy','=','picking')]}"/>
<button name="action_view_delivery" string="Open Delivery Order" type="object"
@@ -126,11 +126,10 @@
<field name="name"/>
<field name="date_order"/>
<field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection" groups="stock.group_locations"/>
<field name="client_order_ref"/>
</group>
<group col="2" colspan="2">
<field name="invoiced"/>
<field name="shipped"/>
<field name="invoiced" invisible="True"/>
<field name="shipped" invisible="True"/>
</group>
</group>
<notebook colspan="5">
@@ -155,7 +154,7 @@
<field
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"
name="product_uom_qty" string="Quantity"
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)"/>
<group colspan="1">
<field name="product_uom" nolabel="1" groups="product.group_uom"
@@ -236,6 +235,7 @@
<separator string="References" colspan="2"/>
<field name="user_id"/>
<field groups="base.group_no_one" name="origin"/>
<field name="client_order_ref"/>
</group>
<group name="sale_pay" colspan="2" col="2">
<separator string="Conditions" colspan="2"/>
@@ -346,6 +346,13 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="context">{"search_default_draft":1}</field>
<field name="search_view_id" ref="view_sales_order_filter"/>
<field name="help">
Click here to create a new quotation.
&lt;p&gt;
The "Quotation" is the first step of the Sales flow. Manage your sales from quotation to invoice.
&lt;p&gt;
You will be able to sell products (manage deliveries) as well as services (create projects).
</field>
</record>
<menuitem id="menu_sale_quotations"
+7 -7
View File
@@ -728,7 +728,7 @@
<group colspan="2" col="2">
<field name="date"/>
<field name="min_date" readonly="1"/>
<field name="stock_journal_id" widget="selection"/>
<field name="stock_journal_id" widget="selection" groups="account.group_account_user"/>
</group>
</group>
<notebook colspan="4">
@@ -761,7 +761,7 @@
groups="product.group_stock_packaging"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed"/>
<field name="location_dest_id"/>
<field name="location_dest_id" groups="stock.group_locations"/>
<field name="date_expected" string="Date Expected"/>
<field name="state"/>
</tree>
@@ -781,7 +781,7 @@
<field name="product_packaging" groups="product.group_stock_packaging" domain="[('product_id','=',product_id)]" colspan="4"/>
</group>
<group colspan="2" col="2">
<group colspan="2" col="2" groups="stock.group_locations">
<separator string="Locations" colspan="2" />
<field name="location_id" domain="[('usage','&lt;&gt;','view')]"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
@@ -910,7 +910,7 @@
<field name="origin"/>
<field name="min_date"/>
<field name="backorder_id"/>
<field name="stock_journal_id"/>
<field name="stock_journal_id" groups="account.group_account_user"/>
<field name="invoice_state"/>
<field name="state"/>
</tree>
@@ -934,16 +934,16 @@
<xpath expr="/form/header/button[@name='action_process']" position="replace">
<button name="action_process" states="assigned" string="Deliver" type="object" icon="gtk-go-forward"/>
</xpath>
<xpath expr="/form/header/div[@class='oe_right']/field[@name='state']" position="replace">
<xpath expr="/form/header/field[@name='state']" position="replace">
<field name="state" nolabel="1" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
</xpath>
<xpath expr="/form/sheet/group/group/field[@name='partner_id']" position="replace">
<field name="partner_id" on_change="onchange_partner_in(partner_id)" colspan="4" string="Customer"/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_form_bottom">
<footer>
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</footer>
</xpath>
</data>
</field>
@@ -24,7 +24,7 @@
<field name="quantity" />
<field name="product_uom" />
<field name="tracking" invisible="1"/>
<field name="prodlot_id" domain="[('product_id', '=', product_id)]" invisible="context.get('hide_tracking',False)" attrs="{'required':[('tracking','=',True)]}"/>
<field name="prodlot_id" domain="[('product_id', '=', product_id)]" invisible="context.get('hide_tracking',False)" attrs="{'required':[('tracking','=',True)]}" groups="stock.group_production_lot"/>
<!-- Removed as this feature is not logic: price must be updated upon reception of invoice -->
<field name="update_cost" invisible="1"/>
<field name="cost" invisible="1"/>