[IMP] statusbar widget on SO lines

bzr revid: fp@tinyerp.com-20111230113122-g2dmkpngjj3yxnf1
This commit is contained in:
Fabien Pinckaers 2011-12-30 12:31:22 +01:00
parent f5005fdd94
commit 2ebdb9f3ef
2 changed files with 3 additions and 3 deletions

View File

@ -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. \

View File

@ -152,7 +152,7 @@
<field colspan="5" name="tax_id" nolabel="1" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','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)]}"/>