Divyesh Makwana(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-first_10_clicks-sale-mdi into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-first_10_clicks-sale-mdi/+merge/106566
Hello Sir,
In Order to improve user experience, i have improved the following things:
1. Improved the menu-tips.
2. Added status bar and action buttons on the top bar above the form and
the history and comments on the bottom bar below the form.
3. Highlighted some buttons in form view.
4. Restricted some fields to appropriate groups.
Thanks,
Divyesh
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-first_10_clicks-sale-mdi/+merge/106566
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-first_10_clicks-sale-mdi.
=== modified file 'account_voucher/voucher_payment_receipt_view.xml'
--- account_voucher/voucher_payment_receipt_view.xml 2012-05-07 18:13:46 +0000
+++ account_voucher/voucher_payment_receipt_view.xml 2012-05-21 05:43:19 +0000
@@ -292,8 +292,18 @@
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Customer Payment">
- <group col="6" colspan="4">
+ <form layout="manual">
+ <div class="oe_form_topbar">
+ <button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
+ <button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile and cancel this record ?"/>
+ <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
+ <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
+ <div class="oe_right">
+ <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}' nolabel="1"/>
+ </div>
+ </div>
+ <sheet string="Customer Payment" layout="auto">
+ <group col="6" colspan="4" class="oe_form_header">
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="currency_id" invisible="1"/>
<field name="amount"
@@ -324,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>
@@ -401,13 +411,7 @@
</field>
</page>
</notebook>
- <group col="10" colspan="4">
- <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
- <button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
- <button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile and cancel this record ?"/>
- <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
- <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
- </group>
+ </sheet>
</form>
</field>
</record>
=== modified file 'delivery/delivery_view.xml'
--- delivery/delivery_view.xml 2012-05-16 16:01:15 +0000
+++ delivery/delivery_view.xml 2012-05-21 05:43:19 +0000
@@ -263,7 +263,7 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
- <xpath expr="//button[@name='order_confirm']" position="after">
+ <xpath expr="//button[@name='action_button_confirm']" position="after">
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':active_id}"/>
</xpath>
</field>
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2012-05-16 16:01:15 +0000
+++ product/product_view.xml 2012-05-21 05:43:19 +0000
@@ -351,7 +351,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>
@@ -407,7 +407,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">
@@ -460,7 +460,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>
=== modified file 'sale/__openerp__.py'
--- sale/__openerp__.py 2012-05-07 18:13:46 +0000
+++ sale/__openerp__.py 2012-05-21 05:43:19 +0000
@@ -66,7 +66,7 @@
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images': ['images/deliveries_to_invoice.jpeg','images/sale_dashboard.jpeg','images/Sale_order_line_to_invoice.jpeg','images/sale_order.jpeg','images/sales_analysis.jpeg'],
- 'depends': ['stock', 'procurement', 'board', 'account_voucher'],
+ 'depends': ['stock', 'procurement', 'board', 'account_voucher', 'share'],
'init_xml': [],
'update_xml': [
'wizard/sale_make_invoice_advance.xml',
=== modified file 'sale/sale.py'
--- sale/sale.py 2012-05-16 16:01:15 +0000
+++ sale/sale.py 2012-05-21 05:43:19 +0000
@@ -642,6 +642,26 @@
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):
+ wf_service = netsvc.LocalService('workflow')
+ for id in ids:
+ wf_service.trg_validate(uid, 'sale.order', id, 'order_confirm', cr)
+
+ result = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sale', 'view_order_form')
+ view_id = result and result[1] or False,
+
+ return {
+ 'name': _('Sales Order'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'view_id': view_id,
+ 'res_model': 'sale.order',
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ 'res_id': ids and ids[0] or False,
+ }
def action_wait(self, cr, uid, ids, context=None):
for o in self.browse(cr, uid, ids):
=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml 2012-05-16 16:47:25 +0000
+++ sale/sale_view.xml 2012-05-21 05:43:19 +0000
@@ -102,13 +102,13 @@
<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="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object" class="oe_form_button_hi"/>
<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="%(report_sale_order)d" string="Print Quotation" type="action" icon="gtk-print" states="draft" class="oe_form_button_hi"/>
+ <button name="action_button_confirm" states="draft" string="Confirm Order" icon="gtk-apply" class="oe_form_button_hi" type="object"/>
<button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute" states="draft,manual"/>
<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"}'/>
@@ -344,6 +344,7 @@
<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">Create a quotation and send it to your customer. Once confirmed, it is converted to a sale order. From that point on, you can control how the sale order is invoiced, and how products are delivered.</field>
</record>
<menuitem id="menu_sale_quotations"
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2012-05-16 16:01:15 +0000
+++ stock/stock_view.xml 2012-05-21 05:43:19 +0000
@@ -729,7 +729,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">
@@ -762,7 +762,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>
@@ -782,7 +782,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','<>','view')]"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
@@ -911,7 +911,7 @@
<field name="min_date"/>
<field name="backorder_id"/>
<field name="invoice_state"/>
- <field name="stock_journal_id" widget="selection"/>
+ <field name="stock_journal_id" widget="selection" groups="account.group_account_user"/>
<field name="state"/>
<button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
</tree>
=== modified file 'stock/wizard/stock_partial_picking_view.xml'
--- stock/wizard/stock_partial_picking_view.xml 2012-05-16 16:01:15 +0000
+++ stock/wizard/stock_partial_picking_view.xml 2012-05-21 05:43:19 +0000
@@ -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"/>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp