bzr revid: fp@tinyerp.com-20110924091037-kpy965dboeutk5y4
This commit is contained in:
Fabien Pinckaers 2011-09-24 11:10:37 +02:00
commit c3a79fbc36
45 changed files with 69 additions and 75 deletions

View File

@ -139,7 +139,7 @@ class account_bank_statement(osv.osv):
states={'confirm':[('readonly', True)]}),
'move_line_ids': fields.one2many('account.move.line', 'statement_id',
'Entry lines', states={'confirm':[('readonly',True)]}),
'state': fields.selection([('draft', 'Draft'),
'state': fields.selection([('draft', 'New'),
('open','Open'), # used by cash statements
('confirm', 'Closed')],
'State', required=True, readonly="1",

View File

@ -205,7 +205,7 @@
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/>
<group col="6" colspan="4">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
@ -300,7 +300,7 @@
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/>
<group col="8" colspan="4" groups="base.group_user">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>

View File

@ -596,7 +596,7 @@
</page>
</notebook>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
<field name="balance_end"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
@ -2643,7 +2643,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
</group>
</group>
<group col="8" colspan="4">
<field name="state" colspan="4"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm" colspan="4"/>
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
<button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
<button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>

View File

@ -265,7 +265,7 @@ class account_voucher(osv.osv):
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
'company_currency': fields.related('company_id','currency_id', type='many2one', relation='res.currency', string='Currency', readonly=True),
'state':fields.selection(
[('draft','Draft'),
[('draft','New'),
('proforma','Pro-forma'),
('posted','Posted'),
('cancel','Cancelled')

View File

@ -102,7 +102,7 @@
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<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"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile this record ?"/>
<button name="proforma_voucher" string="Post" states="draft" icon="terp-camera_test"/>

View File

@ -280,7 +280,7 @@
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<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" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile 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)"/>
@ -455,7 +455,7 @@
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<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 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)"/>

View File

@ -149,7 +149,7 @@
</page>
</notebook>
<group col="8" colspan="4">
<field name="state"/>
<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"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
@ -270,7 +270,7 @@
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<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"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">

View File

@ -168,7 +168,7 @@ class account_analytic_account(osv.osv):
'date_start': fields.date('Date Start'),
'date': fields.date('Date End', select=True),
'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
'state': fields.selection([('draft','New'),('open','Started'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
help='* When an account is created its in \'Draft\' state.\
\n* If any associated partner is there, it can be in \'Open\' state.\
\n* If any pending balance is there it can be in \'Pending\'. \

View File

@ -29,8 +29,8 @@ from tools.translate import _
MAX_LEVEL = 15
AVAILABLE_STATES = [
('draft', 'Draft'),
('open', 'Open'),
('draft', 'New'),
('open', 'In Progress'),
('cancel', 'Cancelled'),
('done', 'Closed'),
('pending', 'Pending'),

View File

@ -120,7 +120,7 @@
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
@ -515,7 +515,7 @@
<separator colspan="4"/>
<group col="10" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel" states="draft" type="object" icon="gtk-cancel" />
<button name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" />

View File

@ -107,7 +107,7 @@
<field name="description" nolabel="1" colspan="4" />
<separator colspan="4" />
<group col="8" colspan="4">
<field name="state" select="1" />
<field name="state" widget="statusbar" statusbar_visible="open,done" statusbar_colors='{"pending":"red"}' select="1"/>
<button name="case_cancel" string="Cancel"
states="open,pending" type="object"
icon="gtk-cancel" />

View File

@ -106,7 +106,7 @@
<field name="description" colspan="4" nolabel="1"/>
<separator colspan="4" string=""/>
<group col="8" colspan="4">
<field name="state" select="1"/>
<field name="state" select="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />

View File

@ -110,7 +110,7 @@
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />

View File

@ -69,7 +69,7 @@
<field name="description" colspan="4" nolabel="1" />
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1"/>
<field name="state" select="1" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel"
states="draft,open,pending" string="Cancel"
type="object" icon="gtk-cancel" />

View File

@ -158,7 +158,7 @@ class hr_evaluation(osv.osv):
'survey_request_ids': fields.one2many('hr.evaluation.interview','evaluation_id','Appraisal Forms'),
'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', required=True),
'state': fields.selection([
('draft','Draft'),
('draft','New'),
('wait','Plan In Progress'),
('progress','Waiting Appreciation'),
('done','Done'),

View File

@ -201,7 +201,7 @@
</notebook>
<newline/>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,progress,wait,done" statusbar_colors='{"progress":"blue"}'/>
<button name="button_cancel" string="Cancel" states="draft,wait,progress" type="object"
icon="gtk-cancel"/>
<button name="button_plan_in_progress" string="Start Evaluation" states="draft" type="object"

View File

@ -77,7 +77,7 @@ class hr_expense_expense(osv.osv):
'department_id':fields.many2one('hr.department','Department'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'state': fields.selection([
('draft', 'Draft'),
('draft', 'New'),
('confirm', 'Waiting Approval'),
('accepted', 'Approved'),
('invoiced', 'Invoiced'),

View File

@ -99,11 +99,11 @@
</group>
</form>
</field>
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,invoiced" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
<group col="6" colspan="2">
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" icon="gtk-convert" groups="base.group_hr_user"/>
<button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" icon="gtk-no" groups="base.group_hr_user" />
<button name="confirm" states="draft" string="Confirm" type="workflow" icon="gtk-apply"/>
<button name="confirm" states="draft" string="Submit to Manager" type="workflow" icon="gtk-apply"/>
<button name="invoice" states="accepted" string="Invoice" type="object" icon="gtk-go-forward" groups="base.group_hr_user"/>
<button name="validate" states="confirm" string="Approve" type="workflow" icon="gtk-go-forward" groups="base.group_hr_user"/>
</group>

View File

@ -111,7 +111,7 @@ class hr_holidays(osv.osv):
_columns = {
'name': fields.char('Description', required=True, size=64),
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
'state': fields.selection([('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
'State', readonly=True, help='The state is set to \'Draft\', when a holiday request is created.\
\nThe state is \'Waiting Approval\', when holiday request is confirmed by user.\

View File

@ -83,7 +83,7 @@
<separator string="Reasons" colspan="4"/>
<field name="notes" nolabel="1" colspan="4"/>
<newline/>
<field name="state" colspan="2"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}' colspan="2"/>
<group colspan="2" col="6">
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
@ -126,7 +126,7 @@
<separator string="Reasons" colspan="4"/>
<field name="notes" nolabel="1" colspan="4"/>
<newline/>
<field name="state" colspan="2"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}' colspan="2"/>
<group colspan="2" col="6">
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user"/>
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>

View File

@ -132,7 +132,7 @@
</group>
<separator colspan="4" string="Status"/>
<group col="8" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause"/>

View File

@ -143,8 +143,8 @@
</page>
</notebook>
<group col="6" colspan="4">
<field name="state"/>
<button name="button_confirm" states="draft" string="Submit to Manager" type="object" icon="terp-check"/>
<field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/>
<button name="button_confirm" states="draft" string="Submited to Manager" type="object" icon="terp-check"/>
<button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_user"/>
<button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_user"/>

View File

@ -185,7 +185,7 @@ class idea_idea(osv.osv):
'count_votes': fields.function(_vote_count, string="Count of votes", type="integer"),
'count_comments': fields.function(_comment_count, string="Count of comments", type="integer"),
'category_id': fields.many2one('idea.category', 'Category', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft', 'Draft'),
'state': fields.selection([('draft', 'New'),
('open', 'Opened'),
('close', 'Accepted'),
('cancel', 'Refused')],

View File

@ -247,7 +247,7 @@
</page>
</notebook>
<group colspan="4" col="6">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,close"/>
<button name="idea_open" string="Open" states="draft" icon="gtk-go-forward"/>
<button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/>
<button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/>

View File

@ -138,7 +138,7 @@ class lunch_order(osv.osv):
'cashmove': fields.many2one('lunch.cashmove', 'CashMove' , readonly=True),
'descript': fields.char('Description Order', readonly=True, size=250, \
states = {'draft':[('readonly', False)]}),
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ], \
'state': fields.selection([('draft', 'New'), ('confirmed', 'Confirmed'), ], \
'State', readonly=True, select=True),
'price': fields.function(_price_get, string="Price"),
'category': fields.many2one('lunch.category','Category'),

View File

@ -34,7 +34,7 @@
<newline/>
<separator string="" colspan="4"/>
<group colspan="4" col="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed"/>
<button name="%(action_lunch_order_confirm)d" string="Confirm Order" type="action" icon="gtk-ok" attrs="{'invisible':[('state','=','confirmed')]}"/>
<button name="%(action_lunch_order_cancel)d" string="Cancel Order" type="action" icon="gtk-cancel"/>
</group>

View File

@ -113,7 +113,7 @@ this campaign to be run"),
Test in Realtime - It creates and processes all the activities directly but does not send emails or produce reports.
With Manual Confirmation - the campaigns runs normally, but the user has to validate all workitem manually.
Normal - the campaign runs normally and automatically sends all emails and reports (be very careful with this mode, you're live!)"""),
'state': fields.selection([('draft', 'Draft'),
'state': fields.selection([('draft', 'New'),
('running', 'Running'),
('done', 'Done'),
('cancelled', 'Cancelled'),],
@ -267,7 +267,7 @@ class marketing_campaign_segment(osv.osv):
'"No duplicates" prevents selecting records which have already entered the campaign previously.'\
'If the campaign has a "unique field" set, "no duplicates" will also prevent selecting records which have '\
'the same value for the unique field as other records that already entered the campaign.'),
'state': fields.selection([('draft', 'Draft'),
'state': fields.selection([('draft', 'New'),
('running', 'Running'),
('done', 'Done'),
('cancelled', 'Cancelled')],

View File

@ -36,7 +36,7 @@
<field name="activity_ids" nolabel = "1" colspan="4" context="{'default_object_id': object_id, 'default_campaign_id': active_id}" />
<separator string="" colspan="4" />
<group col="10" colspan="4">
<field name="state" readonly="1" />
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,running,done"/>
<button name="state_cancel_set" string="Cancel" states="running" icon="terp-gtk-stop"/>
<button name="state_running_set" string="Run" states="draft,done,cancelled" icon="gtk-apply"/>
<button name="state_draft_set" string="Set to Draft" states="done,cancelled" icon="gtk-convert"/>
@ -161,7 +161,7 @@
</group>
<separator string="" colspan="4"/>
<group col="6" colspan="4">
<field name="state" readonly="1"/>
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,running,done"/>
<button name="state_cancel_set" string="Cancel" states="running" icon="terp-gtk-stop"/>
<button name="state_running_set" string="Run" states="draft" icon="gtk-apply"/>
<button name="state_done_set" string="Close" states="running" icon="terp-dialog-close"/>
@ -382,7 +382,7 @@
</group>
<separator string="" colspan="4"/>
<group colspan="4" col="11">
<field name="state" readonly="True"/>
<field name="state" readonly="True" widget="statusbar" statusbar_visible="todo,done" statusbar_colors='{"exception":"red"}'/>
<button string="Cancel" states="todo,exception" name="button_cancel" type="object" icon="terp-gtk-stop"/>
<button string="Reset" states="exception,cancelled" name="button_draft" type="object" icon="gtk-undo"/>
<button string="Process" states="todo" name="process" type="object" icon="terp-gtk-go-back-rtl"/>

View File

@ -477,7 +477,7 @@ class mrp_production(osv.osv):
'move_created_ids2': fields.one2many('stock.move', 'production_id', 'Produced Products', domain=[('state','in', ('done', 'cancel'))]),
'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods'),
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Work Centers Utilisation'),
'state': fields.selection([('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'State', readonly=True,
'state': fields.selection([('draft','New'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','Production Started'),('cancel','Cancelled'),('done','Done')],'State', readonly=True,
help='When the production order is created the state is set to \'Draft\'.\n If the order is confirmed the state is set to \'Waiting Goods\'.\n If any exceptions are there, the state is set to \'Picking Exception\'.\
\nIf the stock is available then the state is set to \'Ready to Produce\'.\n When the production gets started then the state is set to \'In Production\'.\n When the production is over, the state is set to \'Done\'.'),
'hour_total': fields.function(_production_calc, type='float', string='Total Hours', multi='workorder', store=True),

View File

@ -700,7 +700,7 @@
</field>
<separator colspan="4"/>
<group col="9" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,ready,in_production,done" statusbar_colors='{"picking_except":"red","confirmed":"blue"}'/>
<button name="button_cancel" states="draft,ready,in_production,picking_except" string="Cancel" icon="gtk-stop"/>
<button name="action_cancel" type="object" states="confirmed" string="Cancel" icon="gtk-stop"/>
<button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/>

View File

@ -430,7 +430,7 @@ class task(osv.osv):
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of tasks."),
'type_id': fields.many2one('project.task.type', 'Stage'),
'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
\n If the task is over, the states is set to \'Done\'.'),
'create_date': fields.datetime('Create Date', readonly=True,select=True),

View File

@ -45,7 +45,7 @@
<newline/>
<separator colspan="4"/>
<group col="9" colspan="8">
<field name="state" select="1" readonly="1"/>
<field name="state" widget="statusbar" statusbar_visible="open,close" statusbar_colors='{"pending":"blue"}' select="1" readonly="1"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/>
<button name="set_template" string="Set as Template" type="object" states="open" icon="gtk-convert" groups="base.group_extended"/>
<button name="set_open" string="Reactivate Project" type="object" states="pending,cancelled,close" icon="gtk-ok"/>
@ -258,7 +258,7 @@
</field>
<newline/>
<group col="11" colspan="4">
<field name="state" select="1"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}' select="1"/>
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel"/>
<button name="do_draft" states="open" string="Draft" type="object" icon="gtk-indent"/>
<button name="do_open" states="pending,draft" string="Start Task" type="object" icon="gtk-execute"/>

View File

@ -196,7 +196,7 @@ class project_issue(crm.crm_case, osv.osv):
domain="[('partner_id','=',partner_id)]"),
'company_id': fields.many2one('res.company', 'Company'),
'description': fields.text('Description'),
'state': fields.selection([('draft', 'New'), ('open', 'To Do'), ('cancel', 'Cancelled'), ('done', 'Closed'),('pending', 'Pending'), ], 'State', size=16, readonly=True,
'state': fields.selection([('draft', 'New'), ('open', 'To Solve'), ('cancel', 'Cancelled'), ('done', 'Closed'),('pending', 'Pending'), ], 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\

View File

@ -83,9 +83,9 @@
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" />
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_open" string="Solve" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_close" string="Close" states="open,draft,pending" type="object" icon="terp-dialog-close"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>

View File

@ -117,7 +117,7 @@ class project_phase(osv.osv):
'task_ids': fields.one2many('project.task', 'phase_id', "Project Tasks", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'resource_ids': fields.one2many('project.resource.allocation', 'phase_id', "Project Resources",states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'responsible_id': fields.many2one('res.users', 'Responsible', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
'state': fields.selection([('draft', 'New'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
help='If the phase is created the state \'Draft\'.\n If the phase is started, the state becomes \'In Progress\'.\n If review is needed the phase is in \'Pending\' state.\
\n If the phase is over, the states is set to \'Done\'.'),
'total_hours': fields.function(_compute, string='Total Hours'),

View File

@ -140,7 +140,7 @@
</field>
<separator string="" colspan="4"/>
<group col="12" colspan="4">
<field name="state" select="1"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}' select="1"/>
<button string="Cancel" name="set_cancel" states="draft,open,pending" icon="gtk-cancel"/>
<button string="Draft" name="set_draft" states="open" icon="gtk-indent"/>
<button string="Pending" name="set_pending" states="open" icon="gtk-media-pause"/>

View File

@ -194,7 +194,7 @@
<button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
</group>
<group col="11" colspan="4">
<field name="state" readonly="1"/>
<field name="state" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue","wait":"blue"}' readonly="1"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>

View File

@ -41,7 +41,7 @@ class purchase_requisition(osv.osv):
'purchase_ids' : fields.one2many('purchase.order','requisition_id','Purchase Orders',states={'done': [('readonly', True)]}),
'line_ids' : fields.one2many('purchase.requisition.line','requisition_id','Products to Purchase',states={'done': [('readonly', True)]}),
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse'),
'state': fields.selection([('draft','Draft'),('in_progress','In Progress'),('cancel','Cancelled'),('done','Done')], 'State', required=True)
'state': fields.selection([('draft','New'),('in_progress','In Progress'),('cancel','Cancelled'),('done','Done')], 'State', required=True)
}
_defaults = {
'date_start': time.strftime('%Y-%m-%d %H:%M:%S'),

View File

@ -75,9 +75,9 @@
</field>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1" readonly ="1"/>
<field name="state" select="1" readonly ="1" widget="statusbar" statusbar_visible="draft,in_progress,done" statusbar_colors='{"in_progress":"blue"}'/>
<button name="tender_cancel" states="draft,in_progress" string="Cancel" type="object" icon="gtk-cancel" />
<button name="tender_in_progress" states="draft" string="Confirm" type="object" icon="gtk-apply" />
<button name="tender_in_progress" states="draft" string="Start" type="object" icon="gtk-apply" />
<button name="tender_reset" states="done,cancel" string="Reset to Draft" type="object" icon="gtk-convert" />
<button name="tender_done" states="in_progress" string="Done" type="object" icon="gtk-jump-to" />
</group>

View File

@ -199,7 +199,7 @@ class sale_order(osv.osv):
'state': fields.selection([
('draft', 'Quotation'),
('waiting_date', 'Waiting Schedule'),
('manual', 'Manual In Progress'),
('manual', 'To Invoice'),
('progress', 'In Progress'),
('shipping_except', 'Shipping Exception'),
('invoice_except', 'Invoice Exception'),

View File

@ -180,7 +180,7 @@
<button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute" states="draft,manual" groups="base.group_extended"/>
</group>
<group col="13" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/>
<button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/>
<button name="ship_recreate" states="shipping_except" string="Recreate Packing" icon="gtk-ok"/>

View File

@ -622,8 +622,8 @@ class stock_picking(osv.osv):
'location_dest_id': fields.many2one('stock.location', 'Dest. Location',help="Location where the system will stock the finished products.", select=True),
'move_type': fields.selection([('direct', 'Partial Delivery'), ('one', 'All at once')], 'Delivery Method', required=True, help="It specifies goods to be delivered all at once or by direct delivery"),
'state': fields.selection([
('draft', 'Draft'),
('auto', 'Waiting'),
('draft', 'New'),
('auto', 'Waiting Another Operation'),
('confirmed', 'Waiting Availability'),
('assigned', 'Ready to Process'),
('done', 'Done'),
@ -1546,7 +1546,7 @@ class stock_move(osv.osv):
'move_history_ids2': fields.many2many('stock.move', 'stock_move_history_ids', 'child_id', 'parent_id', 'Move History (parent moves)'),
'picking_id': fields.many2one('stock.picking', 'Reference', select=True,states={'done': [('readonly', True)]}),
'note': fields.text('Notes'),
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Not Available'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True,
'state': fields.selection([('draft', 'New'), ('waiting', 'Waiting Another Move'), ('confirmed', 'Waiting Availability'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True,
help='When the stock move is created it is in the \'Draft\' state.\n After that, it is set to \'Not Available\' state if the scheduler did not find the products.\n When products are reserved it is set to \'Available\'.\n When the picking is done the state is \'Done\'.\
\nThe state is \'Waiting\' if the move is waiting for another one.'),
'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Account'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"),

View File

@ -799,7 +799,7 @@
</form>
</field>
<group col="10" colspan="4">
<field name="state" readonly="1"/>
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
<button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
<button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-apply"/>
<button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/>
@ -990,7 +990,7 @@
</form>
</field>
<group col="12" colspan="4">
<field name="state" readonly="1"/>
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
<button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
<button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
<button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-yes"/>
@ -1210,7 +1210,7 @@
</form>
</field>
<group col="10" colspan="4">
<field name="state" readonly="1"/>
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
<button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
<button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
<button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/>
@ -1467,7 +1467,7 @@
</group>
<separator colspan="4"/>
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="draft,assigned,done" statusbar_colors='{"waiting":"blue","confirmed":"blue"}'/>
<group col="4" colspan="2">
<button name="action_cancel" states="assigned,confirmed" string="_Cancel" type="object" icon="gtk-cancel"/>
<button name="action_confirm" states="draft" string="Process Later" type="object" icon="gtk-apply"/>

View File

@ -58,7 +58,7 @@ class survey(osv.osv):
help="Set to one if survey is answerable only once"),
'response_user': fields.integer('Maximum Answer per User',
help="Set to one if you require only one Answer per user"),
'state': fields.selection([('draft', 'Draft'), ('open', 'Open'), ('close', 'Closed'), ('cancel', 'Cancelled')], 'Status', readonly=True),
'state': fields.selection([('open', 'Open'), ('close', 'Closed'), ('cancel', 'Cancelled')], 'Status', readonly=True),
'responsible_id': fields.many2one('res.users', 'Responsible', help="User responsible for survey"),
'tot_start_survey': fields.integer("Total Started Survey", readonly=1),
'tot_comp_survey': fields.integer("Total Completed Survey", readonly=1),
@ -70,17 +70,13 @@ class survey(osv.osv):
'invited_user_ids': fields.many2many('res.users', 'survey_invited_user_rel', 'sid', 'uid', 'Invited User'),
}
_defaults = {
'state': lambda * a: "draft",
'state': lambda * a: "open",
'tot_start_survey': lambda * a: 0,
'tot_comp_survey': lambda * a: 0,
'send_response': lambda * a: 1,
'response_user': lambda * a:1,
}
def survey_draft(self, cr, uid, ids, arg):
self.write(cr, uid, ids, {'state': 'draft'})
return True
def survey_open(self, cr, uid, ids, arg):
self.write(cr, uid, ids, {'state': 'open', 'date_open': strftime("%Y-%m-%d %H:%M:%S")})
return True

View File

@ -180,14 +180,12 @@
</form>
</field>
<group col="9" colspan="4">
<field name="state"/>
<field name="state" widget="statusbar" statusbar_visible="open,close"/>
<button name="survey_cancel"
string="Cancel" states="open" type="object" icon="gtk-cancel"/>
<button name="survey_draft"
string="Set to draft" states="cancel,close" type="object"
icon="gtk-new"/>
<button name="survey_open" string="Open"
states="draft" type="object" icon="gtk-go-forward"/>
<button name="survey_open"
string="Open" states="cancel,close" type="object"
icon="gtk-go-forward"/>
<button name="survey_close"
string="Close" states="open" type="object" icon="gtk-close"/>
</group>