diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2011-12-30 12:31:22 +0100 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2011-12-30 12:31:22 +0100 |
| commit | 2ebdb9f3ef397181a2df9db94f17ddd972bda272 (patch) | |
| tree | 38460dec423115d3dd52b2e27b2ac6da8c47bbbc | |
| parent | f5005fdd9464599c9c87857837c7274787ded7c2 (diff) | |
[IMP] statusbar widget on SO lines
bzr revid: fp@tinyerp.com-20111230113122-g2dmkpngjj3yxnf1
| -rw-r--r-- | addons/sale/sale.py | 2 | ||||
| -rw-r--r-- | addons/sale/sale_view.xml | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/sale/sale.py b/addons/sale/sale.py index c359c2f5822..af5cb906ec9 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -956,7 +956,7 @@ class sale_order_line(osv.osv): 'number_packages': fields.function(_number_packages, type='integer', string='Number Packages'), 'notes': fields.text('Notes'), 'th_weight': fields.float('Weight', readonly=True, states={'draft': [('readonly', False)]}), - 'state': fields.selection([('draft', 'Draft'),('confirmed', 'Confirmed'),('done', 'Done'),('cancel', 'Cancelled'),('exception', 'Exception')], 'State', required=True, readonly=True, + 'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'State', required=True, readonly=True, help='* The \'Draft\' state is set when the related sales order in draft state. \ \n* The \'Confirmed\' state is set when the related sales order is confirmed. \ \n* The \'Exception\' state is set when the related sales order is set as exception. \ diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 3f74c3aad4a..478c8276a90 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -152,7 +152,7 @@ <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"> <separator colspan="5" string="States"/> - <field name="state"/> + <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/> <field name="invoiced"/> <group attrs="{'invisible':[('invoiced','=',True)]}"> <button colspan="1" name="%(action_view_sale_order_line_make_invoice)d" states="confirmed" string="Make Invoices" type="action" icon="terp-document-new"/> @@ -390,7 +390,7 @@ <separator colspan="4" string="Notes"/> <field colspan="4" name="notes" nolabel="1"/> <separator colspan="4"/> - <field name="state"/> + <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done" statusbar_colors='{"exception":"red","cancel":"red"}'/> <group col="3" colspan="2"> <button name="button_cancel" string="Cancel" type="object" icon="gtk-cancel" states="confirmed,exception"/> <button colspan="1" name="%(action_view_sale_order_line_make_invoice)d" string="Create Invoice" type="action" states="done" icon="gtk-go-forward" attrs="{'invisible': [('invoiced', '=', 1)]}"/> |
