diff --git a/addons/account/account.py b/addons/account/account.py index fd69058ffab..cfe2d7c19c8 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -169,7 +169,7 @@ class account_account_type(osv.osv): _columns = { 'name': fields.char('Account Type', size=64, required=True, translate=True), - 'code': fields.char('Code', size=32, required=True), + 'code': fields.char('Code', size=32, required=True, select=True), 'close_method': fields.selection([('none', 'None'), ('balance', 'Balance'), ('detail', 'Detail'), ('unreconciled', 'Unreconciled')], 'Deferral Method', required=True, help="""Set here the method that will be used to generate the end of year journal entries for all the accounts of this type. 'None' means that nothing will be done. diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 53195c345f9..11e474bf16f 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -127,8 +127,8 @@ class account_bank_statement(osv.osv): _name = "account.bank.statement" _description = "Bank Statement" _columns = { - 'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='If you enter a statement name other than /, its created accounting entries move name will be the statement name appended with /1, /2, /3, etc. This allows statement entries to have a reference to the bank statement they appeared on.'), # readonly for account_cash_statement - 'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}), + 'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), # readonly for account_cash_statement + 'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}, select=True), 'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'period_id': fields.many2one('account.period', 'Period', required=True, @@ -471,7 +471,7 @@ class account_bank_statement_line(osv.osv): 'Moves'), 'ref': fields.char('Reference', size=32), 'note': fields.text('Notes'), - 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bank statement lines."), + 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of bank statement lines."), 'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), } _defaults = { diff --git a/addons/account/report/account_report.py b/addons/account/report/account_report.py index 6666b1ccd83..9f81f295d74 100644 --- a/addons/account/report/account_report.py +++ b/addons/account/report/account_report.py @@ -247,7 +247,7 @@ class report_account_sales(osv.osv): _description = "Report of the Sales by Account" _auto = False _columns = { - 'name': fields.char('Year', size=64, required=False, readonly=True), + 'name': fields.char('Year', size=64, required=False, readonly=True, select=True), 'period_id': fields.many2one('account.period', 'Force Period', readonly=True), 'product_id': fields.many2one('product.product', 'Product', readonly=True), 'quantity': fields.float('Quantity', readonly=True), @@ -257,7 +257,7 @@ class report_account_sales(osv.osv): 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True), } - _order = 'name desc,amount_total desc' + _order = 'name desc' def init(self, cr): tools.drop_view_if_exists(cr, 'report_account_sales') diff --git a/addons/account_invoice_layout/account_invoice_layout.py b/addons/account_invoice_layout/account_invoice_layout.py index b0fb92c9abb..68ae537f20e 100644 --- a/addons/account_invoice_layout/account_invoice_layout.py +++ b/addons/account_invoice_layout/account_invoice_layout.py @@ -160,7 +160,7 @@ class account_invoice_line(osv.osv): ('line','Separator Line'), ('break','Page Break'),] ,'Type', select=True, required=True), - 'sequence': fields.integer('Sequence Number', help="Gives the sequence order when displaying a list of invoice lines."), + 'sequence': fields.integer('Sequence Number', select=True, help="Gives the sequence order when displaying a list of invoice lines."), 'functional_field': fields.function(_fnct, arg=None, fnct_inv=None, fnct_inv_arg=None, type='char', fnct_search=None, obj=None, store=False, string="Source Account"), } diff --git a/addons/auction/auction.py b/addons/auction/auction.py index c97cf6f2ded..e701e399acf 100644 --- a/addons/auction/auction.py +++ b/addons/auction/auction.py @@ -367,7 +367,7 @@ class auction_lots(osv.osv): 'important':fields.boolean('To be Emphatized'), 'product_id':fields.many2one('product.product', 'Product', required=True), 'obj_desc': fields.text('Object Description'), - 'obj_num': fields.integer('Catalog Number'), + 'obj_num': fields.integer('Catalog Number', select=True), 'obj_ret': fields.float('Price retired', help="Object Ret"), 'obj_comm': fields.boolean('Commission'), 'obj_price': fields.float('Adjudication price', help="Object Price"), diff --git a/addons/base_contact/base_contact.py b/addons/base_contact/base_contact.py index 420894f23d9..313ba3189f9 100644 --- a/addons/base_contact/base_contact.py +++ b/addons/base_contact/base_contact.py @@ -35,7 +35,7 @@ class res_partner_contact(osv.osv): return result _columns = { - 'name': fields.function(_name_get_full, string='Name', size=64, type="char", store=True), + 'name': fields.function(_name_get_full, string='Name', size=64, type="char", store=True, select=True), 'last_name': fields.char('Last Name', size=64, required=True), 'first_name': fields.char('First Name', size=64), 'mobile': fields.char('Mobile', size=64), @@ -65,7 +65,7 @@ class res_partner_contact(osv.osv): 'active' : lambda *a: True, } - _order = "name,first_name" + _order = "name" def name_search(self, cr, uid, name='', args=None, operator='ilike', context=None, limit=None): if not args: diff --git a/addons/base_report_creator/base_report_creator.py b/addons/base_report_creator/base_report_creator.py index ff26ad81572..c85a943e84c 100644 --- a/addons/base_report_creator/base_report_creator.py +++ b/addons/base_report_creator/base_report_creator.py @@ -545,7 +545,7 @@ class report_creator_field(osv.osv): _rec_name = 'field_id' _order = "sequence,id" _columns = { - 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of fields."), + 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of fields."), 'field_id': fields.many2one('ir.model.fields', 'Field'), 'report_id': fields.many2one('base_report_creator.report', 'Report', on_delete='cascade'), 'group_method': fields.selection([('group', 'Grouped'), diff --git a/addons/board/board.py b/addons/board/board.py index dd3d75e1dca..c63013a085c 100644 --- a/addons/board/board.py +++ b/addons/board/board.py @@ -178,13 +178,13 @@ class board_line(osv.osv): _columns = { 'name': fields.char('Title', size=64, required=True), 'sequence': fields.integer('Sequence', help="Gives the sequence order\ - when displaying a list of board lines."), + when displaying a list of board lines.", select=True), 'height': fields.integer('Height'), 'width': fields.integer('Width'), 'board_id': fields.many2one('board.board', 'Dashboard', required=True, ondelete='cascade'), 'action_id': fields.many2one('ir.actions.act_window', 'Action', required=True), 'position': fields.selection([('left','Left'), - ('right','Right')], 'Position', required=True) + ('right','Right')], 'Position', required=True, select=True) } _defaults = { 'position': lambda *args: 'left' diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index de527f96d80..5619a1d1eaf 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -174,7 +174,7 @@ class crm_lead(crm_case, osv.osv): 'optin': fields.boolean('Opt-In', help="If opt-in is checked, this contact has accepted to receive emails."), 'optout': fields.boolean('Opt-Out', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."), 'type':fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'), ],'Type', help="Type is used to separate Leads and Opportunities"), - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), + 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True), 'date_closed': fields.datetime('Closed', readonly=True), 'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('section_ids', '=', section_id)]"), 'user_id': fields.many2one('res.users', 'Salesman'), @@ -201,7 +201,7 @@ class crm_lead(crm_case, osv.osv): 'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128), 'phone': fields.char("Phone", size=64), 'date_deadline': fields.date('Expected Closing'), - 'date_action': fields.date('Next Action Date'), + 'date_action': fields.date('Next Action Date', select=True), 'title_action': fields.char('Next Action', size=64), 'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('section_ids', '=', section_id)]"), 'color': fields.integer('Color Index'), diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index 7875d6a2f1a..fb6b8f90bda 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -55,7 +55,7 @@ class crm_claim(crm.crm_case, osv.osv): 'write_date': fields.datetime('Update Date' , readonly=True), 'date_deadline': fields.date('Deadline'), 'date_closed': fields.datetime('Closed', readonly=True), - 'date': fields.datetime('Claim Date'), + 'date': fields.datetime('Claim Date', select=True), 'ref' : fields.reference('Reference', selection=crm._links_get, size=128), 'categ_id': fields.many2one('crm.case.categ', 'Category', \ domain="[('section_id','=',section_id),\ diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 17f48f855fb..265a627a011 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -268,7 +268,7 @@ class hr_expense_line(osv.osv): 'description': fields.text('Description'), 'analytic_account': fields.many2one('account.analytic.account','Analytic account'), 'ref': fields.char('Reference', size=32), - 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of expense lines."), + 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of expense lines."), } _defaults = { 'unit_quantity': 1, diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 746c2764315..22e0df5f6b0 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -118,7 +118,7 @@ class hr_holidays(osv.osv): \nThe state is \'Refused\', when holiday request is refused by manager.\ \nThe state is \'Approved\', when holiday request is approved by manager.'), 'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True), - 'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}), + 'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}, select=True), 'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}), 'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}), 'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'), @@ -129,7 +129,7 @@ class hr_holidays(osv.osv): 'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}), 'number_of_days': fields.function(_compute_number_of_days, string='Number of Days', store=True), 'case_id': fields.many2one('crm.meeting', 'Meeting'), - 'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone"), + 'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True), 'parent_id': fields.many2one('hr.holidays', 'Parent'), 'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',), 'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True), diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index aaf215c87f5..ce84079cc11 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -720,8 +720,8 @@ class hr_payslip_worked_days(osv.osv): _description = 'Payslip Worked Days' _columns = { 'name': fields.char('Description', size=256, required=True), - 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade'), - 'sequence': fields.integer('Sequence', required=True,), + 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True), + 'sequence': fields.integer('Sequence', required=True, select=True), 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"), 'number_of_days': fields.float('Number of Days'), 'number_of_hours': fields.float('Number of Hours'), @@ -742,8 +742,8 @@ class hr_payslip_input(osv.osv): _description = 'Payslip Input' _columns = { 'name': fields.char('Description', size=256, required=True), - 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade'), - 'sequence': fields.integer('Sequence', required=True,), + 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True), + 'sequence': fields.integer('Sequence', required=True, select=True), 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"), 'amount': fields.float('Amount', help="It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01."), 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"), @@ -762,7 +762,7 @@ class hr_salary_rule(osv.osv): _columns = { 'name':fields.char('Name', size=256, required=True, readonly=False), 'code':fields.char('Code', size=64, required=True, help="The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive."), - 'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence'), + 'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence', select=True), 'quantity': fields.char('Quantity', size=256, help="It is used in computation for percentage and fixed amount.For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days."), 'category_id':fields.many2one('hr.salary.rule.category', 'Category', required=True), 'active':fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the salary rule without removing it."), @@ -930,7 +930,7 @@ class hr_payslip_line(osv.osv): 'slip_id':fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade'), 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True), 'employee_id':fields.many2one('hr.employee', 'Employee', required=True), - 'contract_id':fields.many2one('hr.contract', 'Contract', required=True), + 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True), 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')), 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')), 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ), diff --git a/addons/idea/idea.py b/addons/idea/idea.py index 7645b17a348..7960153019c 100644 --- a/addons/idea/idea.py +++ b/addons/idea/idea.py @@ -54,7 +54,7 @@ class idea_category(osv.osv): 'name': fields.char('Category', size=64, required=True), 'complete_name': fields.function(_categ_name_get_fnc, type="char", string='Name'), 'summary': fields.text('Summary'), - 'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null'), + 'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null', select=True), 'child_ids': fields.one2many('idea.category', 'parent_id', 'Child Categories'), 'visibility':fields.boolean('Open Idea?', required=False, help="If True creator of the idea will be visible to others"), } diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index c8f0b6b7e21..635e5878ae7 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -436,7 +436,7 @@ class mrp_production(osv.osv): _columns = { 'name': fields.char('Reference', size=64, required=True), 'origin': fields.char('Source Document', size=64, help="Reference of the document that generated this production order request."), - 'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority'), + 'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', select=True), 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product UoM'), required=True, states={'draft':[('readonly',False)]}, readonly=True), diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 7bdb883e98e..12e30ca9b0b 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -93,7 +93,7 @@ class mrp_production_workcenter_line(osv.osv): "* When the user cancels the work order it will be set in 'Canceled' state.\n" \ "* When order is completely processed that time it is set in 'Finished' state."), 'date_start_date': fields.function(_get_date_date, string='Start Date', type='date'), - 'date_planned': fields.datetime('Scheduled Date'), + 'date_planned': fields.datetime('Scheduled Date', select=True), 'date_planned_end': fields.function(_get_date_end, string='End Date', type='datetime'), 'date_start': fields.datetime('Start Date'), 'date_finished': fields.datetime('End Date'), diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 91461f794cc..5ee3662b5a6 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -87,8 +87,8 @@ class procurement_order(osv.osv): 'origin': fields.char('Source Document', size=64, help="Reference of the document that created this Procurement.\n" "This is automatically completed by OpenERP."), - 'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', required=True), - 'date_planned': fields.datetime('Scheduled date', required=True), + 'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', required=True, select=True), + 'date_planned': fields.datetime('Scheduled date', required=True, select=True), 'date_close': fields.datetime('Date Closed'), 'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True), 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True, states={'draft':[('readonly',False)]}, readonly=True), diff --git a/addons/product/product.py b/addons/product/product.py index c67b1f6c029..a0d3901ed70 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -212,11 +212,11 @@ class product_category(osv.osv): _name = "product.category" _description = "Product Category" _columns = { - 'name': fields.char('Name', size=64, required=True, translate=True), + 'name': fields.char('Name', size=64, required=True, translate=True, select=True), 'complete_name': fields.function(_name_get_fnc, type="char", string='Name'), 'parent_id': fields.many2one('product.category','Parent Category', select=True), 'child_id': fields.one2many('product.category', 'parent_id', string='Child Categories'), - 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."), + 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of product categories."), 'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type'), } @@ -494,7 +494,7 @@ class product_product(osv.osv): 'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Sale Price')), 'code': fields.function(_product_code, type='char', string='Reference'), 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'), - 'default_code' : fields.char('Reference', size=64), + 'default_code' : fields.char('Reference', size=64, select=True), 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the product without removing it."), 'variants': fields.char('Variants', size=64), 'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"), @@ -503,7 +503,7 @@ class product_product(osv.osv): 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Sale Price')), 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Sale Price')), 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'), - 'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True), + 'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True, select=True), 'color': fields.integer('Color Index'), 'product_image': fields.binary('Image'), } diff --git a/addons/project/project.py b/addons/project/project.py index 02fdcf411e2..f682319f017 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -580,10 +580,10 @@ class task(osv.osv): _columns = { 'active': fields.function(_is_template, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."), - 'name': fields.char('Task Summary', size=128, required=True), + 'name': fields.char('Task Summary', size=128, required=True, select=True), 'description': fields.text('Description'), - '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."), + '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'), ('done', 'Done'), ('cancelled', 'Cancelled')], '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.\ diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 9d61e9fe850..b950bfd0b34 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -221,7 +221,7 @@ class project_issue(crm.crm_case, osv.osv): 'date': fields.datetime('Date'), 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."), 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('object_id.model', '=', 'crm.project.bug')]"), - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), + 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True), 'version_id': fields.many2one('project.issue.version', 'Version'), 'type_id': fields.many2one ('project.task.type', 'Stages', domain="[('project_ids', '=', project_id)]"), 'project_id':fields.many2one('project.project', 'Project'), diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index d402f16991a..1be274bc4f6 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -101,14 +101,14 @@ class project_phase(osv.osv): _columns = { 'name': fields.char("Name", size=64, required=True), - 'date_start': fields.datetime('Start Date', help="It's computed by the scheduler according the project date or the end date of the previous phase.", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), + 'date_start': fields.datetime('Start Date', select=True, help="It's computed by the scheduler according the project date or the end date of the previous phase.", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'date_end': fields.datetime('End Date', help=" It's computed by the scheduler according to the start date and the duration.", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'constraint_date_start': fields.datetime('Minimum Start Date', help='force the phase to start after this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'constraint_date_end': fields.datetime('Deadline', help='force the phase to finish before this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), - 'project_id': fields.many2one('project.project', 'Project', required=True), + 'project_id': fields.many2one('project.project', 'Project', required=True, select=True), 'next_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'prv_phase_id', 'next_phase_id', 'Next Phases', states={'cancelled':[('readonly',True)]}), 'previous_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'next_phase_id', 'prv_phase_id', 'Previous Phases', states={'cancelled':[('readonly',True)]}), - 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of phases."), + 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of phases."), 'duration': fields.float('Duration', required=True, help="By default in days", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'product_uom': fields.many2one('product.uom', 'Duration UoM', required=True, help="UoM (Unit of Measure) is the unit of measurement for Duration", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'task_ids': fields.one2many('project.task', 'phase_id', "Project Tasks", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}), diff --git a/addons/project_planning/project_planning.py b/addons/project_planning/project_planning.py index 701a9a12cd6..419b8474d21 100644 --- a/addons/project_planning/project_planning.py +++ b/addons/project_planning/project_planning.py @@ -196,9 +196,9 @@ class report_account_analytic_planning_line(osv.osv): return result _columns = { - 'account_id': fields.many2one('account.analytic.account', 'Analytic account'), + 'account_id': fields.many2one('account.analytic.account', 'Analytic account', select=True), 'planning_id': fields.many2one('report_account_analytic.planning', 'Planning', required=True, ondelete='cascade'), - 'user_id': fields.many2one('res.users', 'User'), + 'user_id': fields.many2one('res.users', 'User', select=True), 'amount': fields.float('Quantity', required=True), 'amount_unit': fields.many2one('product.uom', 'Qty UoM', required=True), 'note': fields.text('Note', size=64), @@ -541,8 +541,8 @@ WHERE user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.i return result _columns = { - 'planning_id': fields.many2one('report_account_analytic.planning', 'Planning'), - 'user_id': fields.many2one('res.users', 'User'), + 'planning_id': fields.many2one('report_account_analytic.planning', 'Planning', select=True), + 'user_id': fields.many2one('res.users', 'User', select=True), 'manager_id': fields.many2one('res.users', 'Manager'), 'account_id': fields.many2one('account.analytic.account', 'Account'), 'sum_amount': fields.float('Planned Days', required=True), diff --git a/addons/resource/resource.py b/addons/resource/resource.py index edb900bf2fc..fb3d8c0980e 100644 --- a/addons/resource/resource.py +++ b/addons/resource/resource.py @@ -260,9 +260,9 @@ class resource_calendar_attendance(osv.osv): _columns = { 'name' : fields.char("Name", size=64, required=True), - 'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of week', required=True), + 'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of week', required=True, select=True), 'date_from' : fields.date('Starting date'), - 'hour_from' : fields.float('Work from', size=8, required=True, help="Working time will start from"), + 'hour_from' : fields.float('Work from', size=8, required=True, help="Working time will start from", select=True), 'hour_to' : fields.float("Work to", size=8, required=True, help="Working time will end at"), 'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True), } diff --git a/addons/sale_layout/sale_layout.py b/addons/sale_layout/sale_layout.py index 7c15713d3b3..ef63ad596ac 100644 --- a/addons/sale_layout/sale_layout.py +++ b/addons/sale_layout/sale_layout.py @@ -118,7 +118,7 @@ class sale_order_line(osv.osv): ('line', 'Separator Line'), ('break', 'Page Break'),] ,'Line Type', select=True, required=True), - 'sequence': fields.integer('Line Sequence'), + 'sequence': fields.integer('Line Sequence', select=True), 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}), 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2)), 'product_uom': fields.many2one('product.uom', 'Product UoM'), diff --git a/addons/stock_planning/stock_planning.py b/addons/stock_planning/stock_planning.py index 6ffb0140eb0..d104d57c62b 100644 --- a/addons/stock_planning/stock_planning.py +++ b/addons/stock_planning/stock_planning.py @@ -449,7 +449,7 @@ class stock_planning(osv.osv): 'history': fields.text('Procurement History', readonly=True, help = "History of procurement or internal supply of this planning line."), 'state' : fields.selection([('draft','Draft'),('done','Done')],'State',readonly=True), 'period_id': fields.many2one('stock.period' , 'Period', required=True, \ - help = 'Period for this planning. Requisition will be created for beginning of the period.'), + help = 'Period for this planning. Requisition will be created for beginning of the period.', select=True), 'warehouse_id': fields.many2one('stock.warehouse','Warehouse', required=True), 'product_id': fields.many2one('product.product' , 'Product', required=True, help = 'Product which this planning is created for.'), 'product_uom_categ' : fields.many2one('product.uom.categ', 'Product UoM Category'), # Invisible field for product_uom domain