From d1147c51e9365f4a231f77aaad71b1652c4317f8 Mon Sep 17 00:00:00 2001 From: "Amit Patel (OpenERP)" Date: Tue, 1 May 2012 18:04:46 +0530 Subject: [PATCH] [IMP] bzr revid: apa@tinyerp.com-20120501123446-kykbs2zi3pj0kq9u --- addons/hr_evaluation/hr_evaluation.py | 2 +- addons/hr_expense/hr_expense.py | 2 +- addons/hr_holidays/hr_holidays.py | 4 ++-- addons/marketing_campaign/marketing_campaign.py | 6 ++++-- addons/mrp/mrp.py | 2 +- addons/project/project.py | 4 ++-- addons/project_issue/project_issue.py | 2 +- addons/project_long_term/project_long_term.py | 2 +- addons/project_planning/project_planning.py | 2 +- addons/project_scrum/project_scrum.py | 2 +- addons/purchase/purchase.py | 2 +- addons/sale/sale.py | 2 +- addons/stock/stock.py | 4 ++-- 13 files changed, 19 insertions(+), 17 deletions(-) diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index c409ad19496..3924aeaecbf 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -161,9 +161,9 @@ class hr_evaluation(osv.osv): 'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', required=True), 'state': fields.selection([ ('draft','New'), + ('cancel','Cancelled'), ('wait','Plan In Progress'), ('progress','Waiting Appreciation'), - ('cancel','Cancelled'), ('done','Done'), ], 'State', required=True, readonly=True), 'date_close': fields.date('Ending Date', select=True), diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 71b8b2f0bef..af688db0773 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -79,8 +79,8 @@ class hr_expense_expense(osv.osv): 'company_id': fields.many2one('res.company', 'Company', required=True), 'state': fields.selection([ ('draft', 'New'), - ('confirm', 'Waiting Approval'), ('cancelled', 'Refused'), + ('confirm', 'Waiting Approval'), ('accepted', 'Approved'), ('invoiced', 'Invoiced'), ('paid', 'Reimbursed') diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 7331a6bded9..08f4904a2ce 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -112,8 +112,8 @@ class hr_holidays(osv.osv): _columns = { 'name': fields.char('Description', required=True, size=64), - 'state': fields.selection([('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'), - ('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')], + 'state': fields.selection([('draft', 'New'), ('cancel', 'Cancelled'),('confirm', 'Waiting Approval'), ('refuse', 'Refused'), + ('validate1', 'Waiting Second Approval'), ('validate', 'Approved')], '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.\ \nThe state is \'Refused\', when holiday request is refused by manager.\ diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index ae9b531eb62..38e7da645be 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -648,8 +648,10 @@ class marketing_campaign_workitem(osv.osv): 'res_name': fields.function(_res_name_get, string='Resource Name', fnct_search=_resource_search, type="char", size=64), 'date': fields.datetime('Execution Date', help='If date is not set, this workitem has to be run manually', readonly=True), 'partner_id': fields.many2one('res.partner', 'Partner', select=1, readonly=True), - 'state': fields.selection([('todo', 'To Do'), - ('exception', 'Exception'), ('cancelled', 'Cancelled'),('done', 'Done'), + 'state': fields.selection([ ('todo', 'To Do'), + ('cancelled', 'Cancelled'), + ('exception', 'Exception'), + ('done', 'Done'), ], 'State', readonly=True), 'error_msg' : fields.text('Error Message', readonly=True) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 88908884b26..fbff180ee53 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -481,7 +481,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','New'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','Production Started'),('cancel','Cancelled'),('done','Done')],'State', readonly=True, + 'state': fields.selection([('draft','New'),('cancel','Cancelled'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','Production Started'),('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), diff --git a/addons/project/project.py b/addons/project/project.py index 9d62a66b653..476a62ca33a 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -662,7 +662,7 @@ class task(osv.osv): 'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True), 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."), 'type_id': fields.many2one('project.task.type', 'Stage'), - 'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'),('done', 'Done')], 'State', readonly=True, required=True, + 'state': fields.selection([('draft', 'New'),('cancelled', 'Cancelled'),('open', 'In Progress'),('pending', 'Pending'), ('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\'.'), 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State', @@ -1291,7 +1291,7 @@ class project_task_history(osv.osv): _columns = { 'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select=True), 'type_id': fields.many2one('project.task.type', 'Stage'), - 'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')], 'State'), + 'state': fields.selection([('draft', 'New'), ('cancelled', 'Cancelled'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done')], 'State'), 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State', required=False), 'date': fields.date('Date', select=True), 'end_date': fields.function(_get_date, string='End Date', type="date", store={ diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index a2f41404323..628bf316739 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -179,7 +179,7 @@ class project_issue(crm.crm_case, osv.osv): 'partner_id': fields.many2one('res.partner', 'Partner', select=1), 'company_id': fields.many2one('res.company', 'Company'), 'description': fields.text('Description'), - 'state': fields.selection([('draft', 'New'), ('open', 'In Progress'),('pending', 'Pending'),('cancel', 'Cancelled'), ('done', 'Done') ], 'State', size=16, readonly=True, + 'state': fields.selection([('draft', 'New'), ('cancel', 'Cancelled'), ('open', 'In Progress'),('pending', 'Pending'),('done', 'Done') ], '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\'.\ diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 612bd784bb0..9de76097c9c 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -115,7 +115,7 @@ class project_phase(osv.osv): 'user_force_ids': fields.many2many('res.users', string='Force Assigned Users'), 'user_ids': fields.one2many('project.user.allocation', 'phase_id', "Assigned Users",states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}, help="The ressources on the project can be computed automatically by the scheduler"), - 'state': fields.selection([('draft', 'New'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True, + 'state': fields.selection([('draft', 'New'), ('cancelled', 'Cancelled'),('open', 'In Progress'), ('pending', 'Pending'), ('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\'.'), 'progress': fields.function(_compute_progress, string='Progress', help="Computed based on related tasks"), diff --git a/addons/project_planning/project_planning.py b/addons/project_planning/project_planning.py index 4787aa2603b..bb587218c91 100644 --- a/addons/project_planning/project_planning.py +++ b/addons/project_planning/project_planning.py @@ -128,7 +128,7 @@ class report_account_analytic_planning(osv.osv): 'date_to':fields.date('End Date', required=True, states={'done':[('readonly', True)]}), 'line_ids': fields.one2many('report_account_analytic.planning.line', 'planning_id', 'Planning lines', states={'done':[('readonly', True)]}), 'stat_ids': fields.one2many('report_account_analytic.planning.stat', 'planning_id', 'Planning analysis', readonly=True), - 'state': fields.selection([('draft', 'Draft'), ('open', 'Open'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', required=True), + 'state': fields.selection([('draft', 'Draft'), ('cancel', 'Cancelled'), ('open', 'Open'), ('done', 'Done')], 'Status', required=True), 'business_days': fields.integer('Business Days', required=True, states={'done':[('readonly', True)]}, help='Set here the number of working days within this planning for one person full time'), 'planning_user_ids': one2many_mod3('report_account_analytic.planning.user', 'planning_id', 'Planning By User'), 'planning_account': fields.one2many('report_account_analytic.planning.account', 'planning_id', 'Planning By Account'), diff --git a/addons/project_scrum/project_scrum.py b/addons/project_scrum/project_scrum.py index 85eba636b90..93d2380edf4 100644 --- a/addons/project_scrum/project_scrum.py +++ b/addons/project_scrum/project_scrum.py @@ -109,7 +109,7 @@ class project_scrum_sprint(osv.osv): 'progress': fields.function(_compute, group_operator="avg", type='float', multi="progress", string='Progress (0-100)', help="Computed as: Time Spent / Total Time."), 'effective_hours': fields.function(_compute, multi="effective_hours", string='Effective hours', help="Computed using the sum of the task work done."), 'expected_hours': fields.function(_compute, multi="expected_hours", string='Planned Hours', help='Estimated time to do the task.'), - 'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('cancel','Cancelled'),('done','Done')], 'State', required=True), + 'state': fields.selection([('draft','Draft'),('cancel','Cancelled'),('open','Open'),('pending','Pending'),('done','Done')], 'State', required=True), } _defaults = { 'state': 'draft', diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 002be4aa055..6b2f515547c 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -143,12 +143,12 @@ class purchase_order(osv.osv): STATE_SELECTION = [ ('draft', 'Request for Quotation'), + ('cancel', 'Cancelled'), ('wait', 'Waiting'), ('confirmed', 'Waiting Approval'), ('approved', 'Approved'), ('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), - ('cancel', 'Cancelled'), ('done', 'Done') ] diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 1fc507538e1..fb6da4cf8e2 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -204,12 +204,12 @@ class sale_order(osv.osv): 'client_order_ref': fields.char('Customer Reference', size=64), 'state': fields.selection([ ('draft', 'Quotation'), + ('cancel', 'Cancelled'), ('waiting_date', 'Waiting Schedule'), ('manual', 'To Invoice'), ('progress', 'In Progress'), ('shipping_except', 'Shipping Exception'), ('invoice_except', 'Invoice Exception'), - ('cancel', 'Cancelled'), ('done', 'Done'), ], 'Order State', readonly=True, help="Gives the state of the quotation or sales order. \nThe exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception). \nThe 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to run on the order date.", select=True), 'date_order': fields.date('Date', required=True, readonly=True, select=True, states={'draft': [('readonly', False)]}), diff --git a/addons/stock/stock.py b/addons/stock/stock.py index a17bfd10b24..c62a512d92d 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -629,10 +629,10 @@ class stock_picking(osv.osv): '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', 'New'), + ('cancel', 'Cancelled'), ('auto', 'Waiting Another Operation'), ('confirmed', 'Waiting Availability'), ('assigned', 'Ready to Process'), - ('cancel', 'Cancelled'), ('done', 'Done'), ], 'State', readonly=True, select=True, help="* Draft: not confirmed yet and will not be scheduled until confirmed\n"\ @@ -1630,7 +1630,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', 'New'), ('waiting', 'Waiting Another Move'), ('confirmed', 'Waiting Availability'), ('assigned', 'Available'),('cancel', 'Cancelled'),('done', 'Done')], 'State', readonly=True, select=True, + 'state': fields.selection([('draft', 'New'),('cancel', 'Cancelled'), ('waiting', 'Waiting Another Move'), ('confirmed', 'Waiting Availability'), ('assigned', 'Available'),('done', 'Done')], '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)"),