_name = "account.payment.term"
_description = "Payment Term"
_columns = {
- 'name': fields.char('Payment Term', size=64, translate=True, required=True),
+ 'name': fields.char('Payment Term', translate=True, required=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the payment term without removing it."),
'note': fields.text('Description', translate=True),
'line_ids': fields.one2many('account.payment.term.line', 'payment_id', 'Terms'),
return obj_financial_report.write(cr, uid, [financial_report_ref[field_value].id], {'account_type_ids': [(4, account_type_id)]})
_columns = {
- 'name': fields.char('Account Type', size=64, required=True, translate=True),
+ 'name': fields.char('Account Type', required=True, translate=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.
return True
_columns = {
- 'name': fields.char('Name', size=256, required=True, select=True),
+ 'name': fields.char('Name', required=True, select=True),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
'code': fields.char('Code', size=64, required=True, select=1),
'type': fields.selection([
_description = "Journal"
_columns = {
'with_last_closing_balance' : fields.boolean('Opening With Last Closing Balance'),
- 'name': fields.char('Journal Name', size=64, required=True),
+ 'name': fields.char('Journal Name', required=True),
'code': fields.char('Code', size=5, required=True, help="The code will be displayed on reports."),
'type': fields.selection([('sale', 'Sale'),('sale_refund','Sale Refund'), ('purchase', 'Purchase'), ('purchase_refund','Purchase Refund'), ('cash', 'Cash'), ('bank', 'Bank and Checks'), ('general', 'General'), ('situation', 'Opening/Closing Situation')], 'Type', size=32, required=True,
help="Select 'Sale' for customer invoices journals."\
_name = "account.fiscalyear"
_description = "Fiscal Year"
_columns = {
- 'name': fields.char('Fiscal Year', size=64, required=True),
+ 'name': fields.char('Fiscal Year', required=True),
'code': fields.char('Code', size=6, required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'date_start': fields.date('Start Date', required=True),
_name = "account.period"
_description = "Account period"
_columns = {
- 'name': fields.char('Period Name', size=64, required=True),
+ 'name': fields.char('Period Name', required=True),
'code': fields.char('Code', size=12),
- 'special': fields.boolean('Opening/Closing Period', size=12,
- help="These periods can overlap."),
+ 'special': fields.boolean('Opening/Closing Period',help="These periods can overlap."),
'date_start': fields.date('Start of Period', required=True, states={'done':[('readonly',True)]}),
'date_stop': fields.date('End of Period', required=True, states={'done':[('readonly',True)]}),
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
return result
_columns = {
- 'name': fields.char('Journal-Period Name', size=64, required=True),
+ 'name': fields.char('Journal-Period Name', required=True),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, ondelete="cascade"),
'period_id': fields.many2one('account.period', 'Period', required=True, ondelete="cascade"),
- 'icon': fields.function(_icon_get, string='Icon', type='char', size=32),
+ 'icon': fields.function(_icon_get, string='Icon', type='char'),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the journal period without removing it."),
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'Status', required=True, readonly=True,
help='When journal period is created. The status is \'Draft\'. If a report is printed it comes to \'Printed\' status. When all transactions are done, it comes in \'Done\' status.'),
return [line.move_id.id for line in line_obj.browse(cr, uid, ids, context=context)]
_columns = {
- 'name': fields.char('Number', size=64, required=True),
- 'ref': fields.char('Reference', size=64),
+ 'name': fields.char('Number', required=True),
+ 'ref': fields.char('Reference'),
'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'posted':[('readonly',True)]}),
'state': fields.selection([('draft','Unposted'), ('posted','Posted')], 'Status', required=True, readonly=True,
_name = "account.move.reconcile"
_description = "Account Reconciliation"
_columns = {
- 'name': fields.char('Name', size=64, required=True),
- 'type': fields.char('Type', size=16, required=True),
+ 'name': fields.char('Name', required=True),
+ 'type': fields.char('Type', required=True),
'line_id': fields.one2many('account.move.line', 'reconcile_id', 'Entry Lines'),
'line_partial_ids': fields.one2many('account.move.line', 'reconcile_partial_id', 'Partial Entry lines'),
'create_date': fields.date('Creation date', readonly=True),
_description = 'Tax Code'
_rec_name = 'code'
_columns = {
- 'name': fields.char('Tax Case Name', size=64, required=True, translate=True),
+ 'name': fields.char('Tax Case Name', required=True, translate=True),
'code': fields.char('Case Code', size=64),
'info': fields.text('Description'),
'sum': fields.function(_sum_year, string="Year Sum"),
_name = 'account.tax'
_description = 'Tax'
_columns = {
- 'name': fields.char('Tax Name', size=64, required=True, translate=True, help="This name will be displayed on reports"),
+ 'name': fields.char('Tax Name', required=True, translate=True, help="This name will be displayed on reports"),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the tax lines from the lowest sequences to the higher ones. The order is important if you have a tax with several tax children. In this case, the evaluation order is important."),
'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For taxes of type percentage, enter % ratio between 0-1."),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the tax without removing it."),
help="The computation method for the tax amount."),
'applicable_type': fields.selection( [('true','Always'), ('code','Given by Python Code')], 'Applicability', required=True,
help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
- 'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
+ 'domain':fields.char('Domain', help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
'account_collected_id':fields.many2one('account.account', 'Invoice Tax Account', help="Set the account that will be set by default on invoice tax lines for invoices. Leave empty to use the expense account."),
'account_paid_id':fields.many2one('account.account', 'Refund Tax Account', help="Set the account that will be set by default on invoice tax lines for refunds. Leave empty to use the expense account."),
'account_analytic_collected_id':fields.many2one('account.analytic.account', 'Invoice Tax Analytic Account', help="Set the analytic account that will be used by default on the invoice tax lines for invoices. Leave empty if you don't want to use an analytic account on the invoice tax lines by default."),
_name = "account.model"
_description = "Account Model"
_columns = {
- 'name': fields.char('Model Name', size=64, required=True, help="This is a model for recurring accounting entries"),
+ 'name': fields.char('Model Name', required=True, help="This is a model for recurring accounting entries"),
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
'lines_id': fields.one2many('account.model.line', 'model_id', 'Model Entries'),
_name = "account.model.line"
_description = "Account Model Entries"
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the resources from lower sequences to higher ones."),
'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account'), help="The optional quantity on entries."),
'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
_name = "account.subscription"
_description = "Account Subscription"
_columns = {
- 'name': fields.char('Name', size=64, required=True),
- 'ref': fields.char('Reference', size=16),
+ 'name': fields.char('Name', required=True),
+ 'ref': fields.char('Reference'),
'model_id': fields.many2one('account.model', 'Model', required=True),
'date_start': fields.date('Start Date', required=True),
'period_total': fields.integer('Number of Periods', required=True),
_description ='Templates for Accounts'
_columns = {
- 'name': fields.char('Name', size=256, required=True, select=True),
+ 'name': fields.char('Name', required=True, select=True),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
'code': fields.char('Code', size=64, required=True, select=1),
'type': fields.selection([
_order = 'code'
_rec_name = 'code'
_columns = {
- 'name': fields.char('Tax Case Name', size=64, required=True),
+ 'name': fields.char('Tax Case Name', required=True),
'code': fields.char('Case Code', size=64),
'info': fields.text('Description'),
'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True),
_description= "Templates for Account Chart"
_columns={
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'parent_id': fields.many2one('account.chart.template', 'Parent Chart Template'),
'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"),
'visible': fields.boolean('Can be Visible?', help="Set this to False if you don't want this template to be used actively in the wizard that generate Chart of Accounts from templates, this is useful when you want to generate accounts of this template only when loading its child template."),
_columns = {
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
- 'name': fields.char('Tax Name', size=64, required=True),
+ 'name': fields.char('Tax Name', required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."),
'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."),
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
- 'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
+ 'domain':fields.char('Domain', help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
'account_collected_id':fields.many2one('account.account.template', 'Invoice Tax Account'),
'account_paid_id':fields.many2one('account.account.template', 'Refund Tax Account'),
'parent_id':fields.many2one('account.tax.template', 'Parent Tax Account', select=True),
_description = 'Template for Fiscal Position'
_columns = {
- 'name': fields.char('Fiscal Position Template', size=64, required=True),
+ 'name': fields.char('Fiscal Position Template', required=True),
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'account_ids': fields.one2many('account.fiscal.position.account.template', 'position_id', 'Account Mapping'),
'tax_ids': fields.one2many('account.fiscal.position.tax.template', 'position_id', 'Tax Mapping'),
_name='account.bank.accounts.wizard'
_columns = {
- 'acc_name': fields.char('Account Name.', size=64, required=True),
+ 'acc_name': fields.char('Account Name.', required=True),
'bank_account_id': fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True, ondelete='cascade'),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
- 'account_type': fields.selection([('cash','Cash'), ('check','Check'), ('bank','Bank')], 'Account Type', size=32),
+ 'account_type': fields.selection([('cash','Cash'), ('check','Check'), ('bank','Bank')], 'Account Type'),
}
'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True),
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True),
'code': fields.char('Code', size=8),
- 'ref': fields.char('Ref.', size=64),
+ 'ref': fields.char('Ref.'),
'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account Currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),
'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount Currency', store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True),
}
_description = "Bank Statement"
_inherit = ['mail.thread']
_columns = {
- 'name': fields.char('Reference', size=64, 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
+ 'name': fields.char('Reference', 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)]}),
return res
_columns = {
- 'name': fields.char('Report Name', size=128, required=True, translate=True),
+ 'name': fields.char('Report Name', required=True, translate=True),
'parent_id': fields.many2one('account.financial.report', 'Parent'),
'children_ids': fields.one2many('account.financial.report', 'parent_id', 'Account Report'),
'sequence': fields.integer('Sequence'),
},
}
_columns = {
- 'name': fields.char('Reference/Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
+ 'name': fields.char('Reference/Description', select=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'origin': fields.char('Source Document', help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
'supplier_invoice_number': fields.char('Supplier Invoice Number', size=64, help="The reference of this invoice as provided by the supplier.", readonly=True, states={'draft':[('readonly',False)]}),
'type': fields.selection([
('out_invoice','Customer Invoice'),
],'Type', readonly=True, select=True, change_default=True, track_visibility='always'),
'number': fields.related('move_id','name', type='char', readonly=True, size=64, relation='account.move', store=True, string='Number'),
- 'internal_number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
- 'reference': fields.char('Invoice Reference', size=64, help="The partner reference of this invoice."),
+ 'internal_number': fields.char('Invoice Number', readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
+ 'reference': fields.char('Invoice Reference', help="The partner reference of this invoice."),
'reference_type': fields.selection(_get_reference_type, 'Payment Reference',
required=True, readonly=True, states={'draft':[('readonly',False)]}),
'comment': fields.text('Additional Information'),
},
help="Remaining amount due."),
'payment_ids': fields.function(_compute_lines, relation='account.move.line', type="many2many", string='Payments'),
- 'move_name': fields.char('Journal Entry', size=64, readonly=True, states={'draft':[('readonly',False)]}),
+ 'move_name': fields.char('Journal Entry', readonly=True, states={'draft':[('readonly',False)]}),
'user_id': fields.many2one('res.users', 'Salesperson', readonly=True, track_visibility='onchange', states={'draft':[('readonly',False)]}),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True, states={'draft':[('readonly',False)]}),
'commercial_partner_id': fields.related('partner_id', 'commercial_partner_id', string='Commercial Entity', type='many2one',
_order = "invoice_id,sequence,id"
_columns = {
'name': fields.text('Description', required=True),
- 'origin': fields.char('Source Document', size=256, help="Reference of the document that produced this invoice."),
+ 'origin': fields.char('Source Document', help="Reference of the document that produced this invoice."),
'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."),
'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True),
'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null', select=True),
_columns = {
'invoice_id': fields.many2one('account.invoice', 'Invoice Line', ondelete='cascade', select=True),
- 'name': fields.char('Tax Description', size=64, required=True),
+ 'name': fields.char('Tax Description', required=True),
'account_id': fields.many2one('account.account', 'Tax Account', required=True, domain=[('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')]),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
'base': fields.float('Base', digits_compute=dp.get_precision('Account')),
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'quantity': fields.float('Quantity', digits=(16,2), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very useful for some reports."),
'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
'product_id': fields.many2one('product.product', 'Product'),
'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
'move_id': fields.many2one('account.move', 'Journal Entry', ondelete="cascade", help="The move of this entry line.", select=2, required=True),
'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Internal Note'),
- 'ref': fields.related('move_id', 'ref', string='Reference', type='char', size=64, store=True),
+ 'ref': fields.related('move_id', 'ref', string='Reference', type='char', store=True),
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
_name = 'account.fiscal.position'
_description = 'Fiscal Position'
_columns = {
- 'name': fields.char('Fiscal Position', size=64, required=True),
+ 'name': fields.char('Fiscal Position', required=True),
'active': fields.boolean('Active', help="By unchecking the active field, you may hide a fiscal position without deleting it."),
'company_id': fields.many2one('res.company', 'Company'),
'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Account Mapping'),
_name = 'account.analytic.journal'
_description = 'Analytic Journal'
_columns = {
- 'name': fields.char('Journal Name', size=64, required=True),
+ 'name': fields.char('Journal Name', required=True),
'code': fields.char('Journal Code', size=8),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the analytic journal without removing it."),
- 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."),
+ 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."),
'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
'company_id': fields.many2one('res.company', 'Company', required=True),
}
'date': fields.date('Effective Date', readonly=True),
'date_created': fields.date('Date Created', readonly=True),
'date_maturity': fields.date('Date Maturity', readonly=True),
- 'ref': fields.char('Reference', size=64, readonly=True),
+ 'ref': fields.char('Reference', readonly=True),
'nbr': fields.integer('# of Items', readonly=True),
'debit': fields.float('Debit', readonly=True),
'credit': fields.float('Credit', readonly=True),
_description = 'A Temporary table used for Dashboard view'
_columns = {
- 'name': fields.char('Range',size=64)
+ 'name': fields.char('Range')
}
return res
_columns = {
- 'name': fields.char('Month Range', size=7, readonly=True),
+ 'name': fields.char('Month Range', size=24, readonly=True),
'balance': fields.function(_calc_bal, string='Balance', readonly=True),
}
_description = "Report of Invoices Created within Last 15 days"
_auto = False
_columns = {
- 'name': fields.char('Description', size=64, readonly=True),
+ 'name': fields.char('Description', readonly=True),
'type': fields.selection([
('out_invoice','Customer Invoice'),
('in_invoice','Supplier Invoice'),
('out_refund','Customer Refund'),
('in_refund','Supplier Refund'),
],'Type', readonly=True),
- 'number': fields.char('Invoice Number', size=32, readonly=True),
+ 'number': fields.char('Invoice Number', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'amount_untaxed': fields.float('Untaxed', readonly=True),
'amount_total': fields.float('Total', readonly=True),
('paid','Done'),
('cancel','Cancelled')
],'Status', readonly=True),
- 'origin': fields.char('Source Document', size=64, readonly=True, help="Reference of the document that generated this invoice report."),
+ 'origin': fields.char('Source Document', readonly=True, help="Reference of the document that generated this invoice report."),
'create_date': fields.datetime('Create Date', readonly=True)
}
_order = 'create_date'
_description = "Report of the Sales by Account Type"
_auto = False
_columns = {
- 'name': fields.char('Year', size=64, required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=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),
_description = "Report of the Sales by Account"
_auto = False
_columns = {
- 'name': fields.char('Year', size=64, required=False, readonly=True, select=True),
+ 'name': fields.char('Year', 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),
_columns = {
'enable_filter': fields.boolean('Enable Comparison'),
'account_report_id': fields.many2one('account.financial.report', 'Account Reports', required=True),
- 'label_filter': fields.char('Column Label', size=32, help="This label will be displayed on report to show the balance computed for the given comparison filter."),
+ 'label_filter': fields.char('Column Label', help="This label will be displayed on report to show the balance computed for the given comparison filter."),
'fiscalyear_id_cmp': fields.many2one('account.fiscalyear', 'Fiscal Year', help='Keep empty for all open fiscal year'),
'filter_cmp': fields.selection([('filter_no', 'No Filters'), ('filter_date', 'Date'), ('filter_period', 'Periods')], "Filter by", required=True),
'period_from_cmp': fields.many2one('account.period', 'Start Period'),
'New Fiscal Year', required=True),
'journal_id': fields.many2one('account.journal', 'Opening Entries Journal', domain="[('type','=','situation')]", required=True, help='The best practice here is to use a journal dedicated to contain the opening entries of all fiscal years. Note that you should define it with default debit/credit accounts, of type \'situation\' and with a centralized counterpart.'),
'period_id': fields.many2one('account.period', 'Opening Entries Period', required=True),
- 'report_name': fields.char('Name of new entries',size=64, required=True, help="Give name of the new entries"),
+ 'report_name': fields.char('Name of new entries', required=True, help="Give name of the new entries"),
}
_defaults = {
'report_name': lambda self, cr, uid, context: _('End of Fiscal Year Entry'),
'date': fields.date('Date', help='This date will be used as the invoice date for credit note and period will be chosen accordingly!'),
'period': fields.many2one('account.period', 'Force period'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the credit note that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
- 'description': fields.char('Reason', size=128, required=True),
+ 'description': fields.char('Reason', required=True),
'filter_refund': fields.selection([('refund', 'Create a draft refund'), ('cancel', 'Cancel: create refund and reconcile'),('modify', 'Modify: create refund, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Refund base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
}
'journal_id': fields.many2one('account.journal','Write-Off Journal', required=True),
'writeoff_acc_id': fields.many2one('account.account','Write-Off account', required=True),
'date_p': fields.date('Date'),
- 'comment': fields.char('Comment', size= 64, required=True),
+ 'comment': fields.char('Comment', required=True),
'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('parent_id', '!=', False)]),
}
_defaults = {
class CashBox(osv.osv_memory):
_register = False
_columns = {
- 'name' : fields.char('Reason', size=64, required=True),
+ 'name' : fields.char('Reason', required=True),
# Attention, we don't set a domain, because there is a journal_type key
# in the context of the action
'amount' : fields.float('Amount',
_columns = CashBox._columns.copy()
_columns.update({
- 'ref' : fields.char('Reference', size=32),
+ 'ref' : fields.char('Reference'),
})
def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):
_name = "account.analytic.plan"
_description = "Analytic Plan"
_columns = {
- 'name': fields.char('Analytic Plan', size=64, required=True, select=True),
+ 'name': fields.char('Analytic Plan', required=True, select=True),
'plan_ids': fields.one2many('account.analytic.plan.line', 'plan_id', 'Analytic Plans'),
}
_order = "sequence, id"
_columns = {
'plan_id': fields.many2one('account.analytic.plan','Analytic Plan',required=True),
- 'name': fields.char('Axis Name', size=64, required=True, select=True),
+ 'name': fields.char('Axis Name', required=True, select=True),
'sequence': fields.integer('Sequence'),
'root_analytic_id': fields.many2one('account.analytic.account', 'Root Account', help="Root account of this plan.", required=False),
'min_required': fields.float('Minimum Allowed (%)'),
_name = "account.analytic.plan.instance"
_description = "Analytic Plan Instance"
_columns = {
- 'name': fields.char('Analytic Distribution', size=64),
+ 'name': fields.char('Analytic Distribution'),
'code': fields.char('Distribution Code', size=16),
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal' ),
'account_ids': fields.one2many('account.analytic.plan.instance.line', 'plan_id', 'Account Id'),
_description = 'Asset category'
_columns = {
- 'name': fields.char('Name', size=64, required=True, select=1),
+ 'name': fields.char('Name', required=True, select=1),
'note': fields.text('Note'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
'account_asset_id': fields.many2one('account.account', 'Asset Account', required=True, domain=[('type','=','other')]),
_columns = {
'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
'entry_count': fields.function(_entry_count, string='# Asset Entries', type='integer'),
- 'name': fields.char('Asset Name', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'name': fields.char('Asset Name', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}),
'purchase_value': fields.float('Gross Value', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),
return res
_columns = {
- 'name': fields.char('Depreciation Name', size=64, required=True, select=1),
+ 'name': fields.char('Depreciation Name', required=True, select=1),
'sequence': fields.integer('Sequence', required=True),
'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True, ondelete='cascade'),
'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
_name = 'account.asset.history'
_description = 'Asset history'
_columns = {
- 'name': fields.char('History name', size=64, select=1),
+ 'name': fields.char('History name', select=1),
'user_id': fields.many2one('res.users', 'User', required=True),
'date': fields.date('Date', required=True),
'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True),
_description = "Assets Analysis"
_auto = False
_columns = {
- 'name': fields.char('Year', size=16, required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'purchase_date': fields.date('Purchase Date', readonly=True),
'depreciation_date': fields.date('Depreciation Date', readonly=True),
'asset_id': fields.many2one('account.asset.asset', string='Asset', readonly=True),
_description = 'Modify Asset'
_columns = {
- 'name': fields.char('Reason', size=64, required=True),
+ 'name': fields.char('Reason', required=True),
'method_number': fields.integer('Number of Depreciations', required=True),
'method_period': fields.integer('Period Length'),
'method_end': fields.date('Ending date'),
_description = 'Batch Payment Info'
_columns = {
- 'name': fields.char('OBI', size=128, required=True, help="Originator to Beneficiary Information"),
+ 'name': fields.char('OBI', required=True, help="Originator to Beneficiary Information"),
'code': fields.char('Code', size=64, required=True),
'parent_id': fields.many2one('account.bank.statement.line.global', 'Parent Code', ondelete='cascade'),
'child_ids': fields.one2many('account.bank.statement.line.global', 'parent_id', 'Child Codes'),
_description = "Budgetary Position"
_columns = {
'code': fields.char('Code', size=64, required=True),
- 'name': fields.char('Name', size=256, required=True),
+ 'name': fields.char('Name', required=True),
'account_ids': fields.many2many('account.account', 'account_budget_rel', 'budget_id', 'account_id', 'Accounts'),
'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'general_budget_id', 'Budget Lines'),
'company_id': fields.many2one('res.company', 'Company', required=True),
_description = "Budget"
_columns = {
- 'name': fields.char('Name', size=64, required=True, states={'done':[('readonly',True)]}),
+ 'name': fields.char('Name', required=True, states={'done':[('readonly',True)]}),
'code': fields.char('Code', size=16, required=True, states={'done':[('readonly',True)]}),
'creating_user_id': fields.many2one('res.users', 'Responsible User'),
'validating_user_id': fields.many2one('res.users', 'Validate User', readonly=True),
return journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
_columns = {
- 'amount_in_word' : fields.char("Amount in Word" , size=128, readonly=True, states={'draft':[('readonly',False)]}),
+ 'amount_in_word' : fields.char("Amount in Word", readonly=True, states={'draft':[('readonly',False)]}),
'allow_check' : fields.related('journal_id', 'allow_check_writing', type='boolean', string='Allow Check Writing'),
- 'number': fields.char('Number', size=32),
+ 'number': fields.char('Number'),
}
def _amount_to_text(self, cr, uid, amount, currency_id, context=None):
_name = 'account_followup.followup.line'
_description = 'Follow-up Criteria'
_columns = {
- 'name': fields.char('Follow-Up Action', size=64, required=True),
+ 'name': fields.char('Follow-Up Action', required=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of follow-up lines."),
'delay': fields.integer('Due Days', help="The number of days after the due date of the invoice to wait before sending the reminder. Could be negative if you want to send a polite alert beforehand.", required=True),
'followup_id': fields.many2one('account_followup.followup', 'Follow Ups', required=True, ondelete="cascade"),
_name= 'payment.mode'
_description= 'Payment Mode'
_columns = {
- 'name': fields.char('Name', size=64, required=True, help='Mode of Payment'),
+ 'name': fields.char('Name', required=True, help='Mode of Payment'),
'bank_id': fields.many2one('res.partner.bank', "Bank account",
required=True,help='Bank Account for the Payment Mode'),
'journal': fields.many2one('account.journal', 'Journal', required=True,
_columns = {
'date_scheduled': fields.date('Scheduled Date', states={'done':[('readonly', True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
- 'reference': fields.char('Reference', size=128, required=1, states={'done': [('readonly', True)]}),
+ 'reference': fields.char('Reference', required=1, states={'done': [('readonly', True)]}),
'mode': fields.many2one('payment.mode', 'Payment Mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Payment Mode to be applied.'),
'state': fields.selection([
('draft', 'Draft'),
return res
_columns = {
- 'name': fields.char('Your Reference', size=64, required=True),
- 'communication': fields.char('Communication', size=64, required=True, help="Used as the message between ordering customer and current company. Depicts 'What do you want to say to the recipient about this order ?'"),
- 'communication2': fields.char('Communication 2', size=64, help='The successor message of Communication.'),
+ 'name': fields.char('Your Reference', required=True),
+ 'communication': fields.char('Communication', required=True, help="Used as the message between ordering customer and current company. Depicts 'What do you want to say to the recipient about this order ?'"),
+ 'communication2': fields.char('Communication 2', help='The successor message of Communication.'),
'move_line_id': fields.many2one('account.move.line', 'Entry line', domain=[('reconcile_id', '=', False), ('account_id.type', '=', 'payable')], help='This Entry Line will be referred for the information of the ordering customer.'),
'amount_currency': fields.float('Amount in Partner Currency', digits=(16, 2),
required=True, help='Payment amount in the partner currency'),
_inherit = 'account.move'
_columns = {
- 'internal_sequence_number': fields.char('Internal Number', size=64, readonly=True, help='Internal Sequence Number'),
+ 'internal_sequence_number': fields.char('Internal Number', readonly=True, help='Internal Sequence Number'),
}
def post(self, cr, uid, ids, context=None):
_inherit = 'res.config.installer'
_columns = {
- 'name': fields.char('Name',size=64, required=True),
- 'prefix': fields.char('Prefix',size=64, help="Prefix value of the record for the sequence"),
- 'suffix': fields.char('Suffix',size=64, help="Suffix value of the record for the sequence"),
+ 'name': fields.char('Name', required=True),
+ 'prefix': fields.char('Prefix', size=64, help="Prefix value of the record for the sequence"),
+ 'suffix': fields.char('Suffix', size=64, help="Suffix value of the record for the sequence"),
'number_next': fields.integer('Next Number', required=True, help="Next number of this sequence"),
'number_increment': fields.integer('Increment Number', required=True, help="The next number of the sequence will be incremented by this number"),
'padding' : fields.integer('Number padding', required=True, help="OpenERP will automatically adds some '0' on the left of the 'Next Number' to get the required padding size."),
_order = "sequence"
_columns = {
- 'name': fields.char('Test Name', size=256, required=True, select=True, translate=True),
+ 'name': fields.char('Test Name', required=True, select=True, translate=True),
'desc': fields.text('Test Description', select=True, translate=True),
'code_exec': fields.text('Python code', required=True),
'active': fields.boolean('Active'),
('payment','Payment'),
('receipt','Receipt'),
],'Default Type', readonly=True, states={'draft':[('readonly',False)]}),
- 'name':fields.char('Memo', size=256, readonly=True, states={'draft':[('readonly',False)]}),
+ 'name':fields.char('Memo', readonly=True, states={'draft':[('readonly',False)]}),
'date':fields.date('Date', readonly=True, select=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}),
('cancel','Cancelled'),
('proforma','Pro-forma'),
('posted','Posted')
- ], 'Status', readonly=True, size=32, track_visibility='onchange',
+ ], 'Status', readonly=True, track_visibility='onchange',
help=' * The \'Draft\' status is used when a user is encoding a new and unconfirmed Voucher. \
\n* The \'Pro-forma\' when voucher is in Pro-forma status,voucher does not have an voucher number. \
\n* The \'Posted\' status is used when user create voucher,a voucher number is generated and voucher entries are created in account \
\n* The \'Cancelled\' status is used when user cancel voucher.'),
'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
- 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
- 'number': fields.char('Number', size=32, readonly=True,),
+ 'reference': fields.char('Ref #', readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
+ 'number': fields.char('Number', readonly=True,),
'move_id':fields.many2one('account.move', 'Account Entry'),
'move_ids': fields.related('move_id','line_id', type='one2many', relation='account.move.line', string='Journal Items', readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', change_default=1, readonly=True, states={'draft':[('readonly',False)]}),
('with_writeoff', 'Reconcile Payment Balance'),
], 'Payment Difference', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="This field helps you to choose what you want to do with the eventual difference between the paid amount and the sum of allocated amounts. You can either choose to keep open this difference on the partner's account, or reconcile it with the payment(s)"),
'writeoff_acc_id': fields.many2one('account.account', 'Counterpart Account', readonly=True, states={'draft': [('readonly', False)]}),
- 'comment': fields.char('Counterpart Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
+ 'comment': fields.char('Counterpart Comment', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),
'writeoff_amount': fields.function(_get_writeoff_amount, string='Difference Amount', type='float', readonly=True, help="Computed as the difference between the amount stated in the voucher and the sum of allocation on the voucher lines."),
'payment_rate_currency_id': fields.many2one('res.currency', 'Payment Rate Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
_columns = {
'voucher_id':fields.many2one('account.voucher', 'Voucher', required=1, ondelete='cascade'),
- 'name':fields.char('Description', size=256),
+ 'name':fields.char('Description',),
'account_id':fields.many2one('account.account','Account', required=True),
'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
'untax_amount':fields.float('Untax Amount'),
return result
_columns = {
- 'name': fields.char('Account/Contract Name', size=128, required=True, track_visibility='onchange'),
+ 'name': fields.char('Account/Contract Name', required=True, track_visibility='onchange'),
'complete_name': fields.function(_get_full_name, type='char', string='Full Name'),
'code': fields.char('Reference', select=True, track_visibility='onchange'),
'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Contract')], 'Type of Account', required=True,
_description = 'Analytic Line'
_columns = {
- 'name': fields.char('Description', size=256, required=True),
+ 'name': fields.char('Description', required=True),
'date': fields.date('Date', required=True, select=True),
'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
_rec_name = 'field_id'
_columns = {
- 'model_name': fields.char('Object Name', size=128, required=True),
+ 'model_name': fields.char('Object Name', required=True),
'model_id': fields.many2one('ir.model', 'Object', ondelete='set null'),
- 'field_name': fields.char('Field Name', size=128, required=True),
+ 'field_name': fields.char('Field Name', required=True),
'field_id': fields.many2one('ir.model.fields', 'Field', ondelete='set null'),
'state': fields.selection(selection=FIELD_STATES, String='Status', required=True, readonly=True),
}
'date': fields.datetime('Date', required=True, readonly=True),
'field_ids': fields.many2many('ir.model.fields.anonymization', 'anonymized_field_to_history_rel', 'field_id', 'history_id', 'Fields', readonly=True),
'state': fields.selection(selection=ANONYMIZATION_HISTORY_STATE, string='Status', required=True, readonly=True),
- 'direction': fields.selection(selection=ANONYMIZATION_DIRECTION, string='Direction', required=True, readonly=True),
+ 'direction': fields.selection(selection=ANONYMIZATION_DIRECTION, string='Direction', size=20, required=True, readonly=True),
'msg': fields.text('Message', readonly=True),
- 'filepath': fields.char(string='File path', size=256, readonly=True),
+ 'filepath': fields.char(string='File path', readonly=True),
}
return res
_columns = {
- 'name': fields.char(size=64, string='File Name'),
+ 'name': fields.char(string='File Name'),
'summary': fields.function(_get_summary, type='text', string='Summary'),
'file_export': fields.binary(string='Export'),
'file_import': fields.binary(string='Import', help="This is the file created by the anonymization process. It should have the '.pickle' extention."),
'sequence': fields.integer('Sequence'),
'company': fields.many2one('res.company', 'Company', required=True,
ondelete='cascade'),
- 'ldap_server': fields.char('LDAP Server address', size=64, required=True),
+ 'ldap_server': fields.char('LDAP Server address', required=True),
'ldap_server_port': fields.integer('LDAP Server port', required=True),
- 'ldap_binddn': fields.char('LDAP binddn', size=64,
+ 'ldap_binddn': fields.char('LDAP binddn',
help=("The user account on the LDAP server that is used to query "
"the directory. Leave empty to connect anonymously.")),
- 'ldap_password': fields.char('LDAP password', size=64,
+ 'ldap_password': fields.char('LDAP password',
help=("The password of the user account on the LDAP server that is "
"used to query the directory.")),
- 'ldap_filter': fields.char('LDAP filter', size=256, required=True),
- 'ldap_base': fields.char('LDAP base', size=64, required=True),
+ 'ldap_filter': fields.char('LDAP filter', required=True),
+ 'ldap_base': fields.char('LDAP base', required=True),
'user': fields.many2one('res.users', 'Template User',
help="User to copy when creating new users"),
'create_user': fields.boolean('Create user',
_order = 'sequence'
_columns = {
- 'name': fields.char('Rule Name', size=64, required=True),
+ 'name': fields.char('Rule Name', required=True),
'model_id': fields.many2one('ir.model', 'Related Document Model',
required=True, domain=[('osv_memory', '=', False)]),
'model': fields.related('model_id', 'model', type="char", size=256, string='Model'),
_name = "base.action.rule.lead.test"
_columns = {
- 'name': fields.char('Subject', size=64, required=True, select=1),
+ 'name': fields.char('Subject', required=True, select=1),
'user_id': fields.many2one('res.users', 'Responsible'),
'state': fields.selection(AVAILABLE_STATES, string="Status", readonly=True),
'active': fields.boolean('Active', required=False),
_transient_max_hours = 12.0
_columns = {
- 'res_model': fields.char('Model', size=64),
+ 'res_model': fields.char('Model'),
'file': fields.binary(
'File', help="File to check and/or import, raw binary (not base64)"),
- 'file_name': fields.char('File Name', size=None),
- 'file_type': fields.char('File Type', size=None),
+ 'file_name': fields.char('File Name'),
+ 'file_type': fields.char('File Type'),
}
def get_fields(self, cr, uid, model, context=None,
_name = name('char')
_columns = {
- 'value': fields.char('unknown', size=None)
+ 'value': fields.char('unknown')
}
class char_required(orm.Model):
_name = name('char.required')
_columns = {
- 'value': fields.char('unknown', size=None, required=True)
+ 'value': fields.char('unknown', required=True)
}
class char_readonly(orm.Model):
_name = name('char.readonly')
_columns = {
- 'value': fields.char('unknown', size=None, readonly=True)
+ 'value': fields.char('unknown', readonly=True)
}
class char_states(orm.Model):
_name = name('char.states')
_columns = {
- 'value': fields.char('unknown', size=None, readonly=True, states={'draft': [('readonly', False)]})
+ 'value': fields.char('unknown', readonly=True, states={'draft': [('readonly', False)]})
}
class char_noreadonly(orm.Model):
_name = name('char.noreadonly')
_columns = {
- 'value': fields.char('unknown', size=None, readonly=True, states={'draft': [('invisible', True)]})
+ 'value': fields.char('unknown', readonly=True, states={'draft': [('invisible', True)]})
}
class char_stillreadonly(orm.Model):
_name = name('char.stillreadonly')
_columns = {
- 'value': fields.char('unknown', size=None, readonly=True, states={'draft': [('readonly', True)]})
+ 'value': fields.char('unknown', readonly=True, states={'draft': [('readonly', True)]})
}
# TODO: complex field (m2m, o2m, m2o)
_name = name('preview')
_columns = {
- 'name': fields.char('Name', size=None),
+ 'name': fields.char('Name'),
'somevalue': fields.integer('Some Value', required=True),
'othervalue': fields.integer('Other Variable'),
}
return data
_columns = {
- 'name':fields.char('File name', size=34),
- 'plugin_file':fields.char('OpenObject Report Designer Plug-in', size=256, readonly=True, help="OpenObject Report Designer plug-in file. Save as this file and install this plug-in in OpenOffice."),
+ 'name':fields.char('File name'),
+ 'plugin_file':fields.char('OpenObject Report Designer Plug-in', readonly=True, help="OpenObject Report Designer plug-in file. Save as this file and install this plug-in in OpenOffice."),
'description':fields.text('Description', readonly=True)
}
_description = "Board Creation"
_columns = {
- 'name': fields.char('Board Name', size=64, required=True),
+ 'name': fields.char('Board Name', required=True),
'menu_parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True),
}
_description = "Channels"
_order = 'name'
_columns = {
- 'name': fields.char('Channel Name', size=64, required=True),
+ 'name': fields.char('Channel Name', required=True),
'active': fields.boolean('Active'),
}
_defaults = {
_order = "sequence"
_columns = {
- 'name': fields.char('Stage Name', size=64, required=True, translate=True),
+ 'name': fields.char('Stage Name', required=True, translate=True),
'sequence': fields.integer('Sequence', help="Used to order stages. Lower is better."),
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
'on_change': fields.boolean('Change Probability Automatically', help="Setting this stage will change the probability automatically on the opportunity."),
'type': fields.selection([('lead', 'Lead'),
('opportunity', 'Opportunity'),
('both', 'Both')],
- string='Type', size=16, required=True,
+ string='Type', required=True,
help="This field is used to distinguish stages related to Leads from stages related to Opportunities, or to specify stages available for both types."),
}
'case_default': True,
}
-
class crm_case_categ(osv.osv):
""" Category of Case """
_name = "crm.case.categ"
_description = "Category of Case"
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'object_id': fields.many2one('ir.model', 'Object Name'),
}
_description = "Campaign"
_rec_name = "name"
_columns = {
- 'name': fields.char('Campaign Name', size=64, required=True, translate=True),
+ 'name': fields.char('Campaign Name', required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
_name = "crm.payment.mode"
_description = "CRM Payment Mode"
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
select=True, help="Linked partner (optional). Usually created when converting the lead."),
'id': fields.integer('ID', readonly=True),
- 'name': fields.char('Subject', size=64, required=True, select=1),
+ 'name': fields.char('Subject', required=True, select=1),
'active': fields.boolean('Active', required=False),
'date_action_last': fields.datetime('Last Action', readonly=1),
'date_action_next': fields.datetime('Next Action', readonly=1),
'stage_id': fields.many2one('crm.case.stage', 'Stage', track_visibility='onchange', select=True,
domain="['&', ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"),
'user_id': fields.many2one('res.users', 'Salesperson', select=True, track_visibility='onchange'),
- 'referred': fields.char('Referred By', size=64),
+ 'referred': fields.char('Referred By'),
'date_open': fields.datetime('Assigned', readonly=True),
'day_open': fields.function(_compute_day, string='Days to Open', \
multi='day_open', type="float", store=True),
'phone': fields.char("Phone", size=64),
'date_deadline': fields.date('Expected Closing', help="Estimate of the date on which the opportunity will be won."),
'date_action': fields.date('Next Action Date', select=True),
- 'title_action': fields.char('Next Action', size=64),
+ 'title_action': fields.char('Next Action'),
'color': fields.integer('Color Index'),
'partner_address_name': fields.related('partner_id', 'name', type='char', string='Partner Contact Name', readonly=True),
'partner_address_email': fields.related('partner_id', 'email', type='char', string='Partner Contact Email', readonly=True),
'user_login': fields.related('user_id', 'login', type='char', string='User Login', readonly=True),
# Fields for address, due to separation from crm and res.partner
- 'street': fields.char('Street', size=128),
- 'street2': fields.char('Street2', size=128),
+ 'street': fields.char('Street'),
+ 'street2': fields.char('Street2'),
'zip': fields.char('Zip', change_default=True, size=24),
- 'city': fields.char('City', size=128),
+ 'city': fields.char('City'),
'state_id': fields.many2one("res.country.state", 'State'),
'country_id': fields.many2one('res.country', 'Country'),
- 'phone': fields.char('Phone', size=64),
- 'fax': fields.char('Fax', size=64),
- 'mobile': fields.char('Mobile', size=64),
- 'function': fields.char('Function', size=128),
+ 'phone': fields.char('Phone'),
+ 'fax': fields.char('Fax'),
+ 'mobile': fields.char('Mobile'),
+ 'function': fields.char('Function'),
'title': fields.many2one('res.partner.title', 'Title'),
'company_id': fields.many2one('res.company', 'Company', select=1),
'payment_mode': fields.many2one('crm.payment.mode', 'Payment Mode', \
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'date_open': fields.datetime('Opened', readonly=True),
# phonecall fields
- 'name': fields.char('Call Summary', size=64, required=True),
+ 'name': fields.char('Call Summary', required=True),
'active': fields.boolean('Active', required=False),
'duration': fields.float('Duration', help='Duration in minutes and seconds.'),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="['|',('section_id','=',section_id),('section_id','=',False),\
('object_id.model', '=', 'crm.phonecall')]"),
- 'partner_phone': fields.char('Phone', size=32),
- 'partner_mobile': fields.char('Mobile', size=32),
+ 'partner_phone': fields.char('Phone'),
+ 'partner_mobile': fields.char('Mobile'),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
'date_closed': fields.datetime('Closed', readonly=True),
'date': fields.datetime('Date'),
_description = "Partner Segmentation"
_columns = {
- 'name': fields.char('Name', size=64, required=True, help='The name of the segmentation.'),
+ 'name': fields.char('Name', required=True, help='The name of the segmentation.'),
'description': fields.text('Description'),
'categ_id': fields.many2one('res.partner.category', 'Partner Category',\
required=True, help='The partner category that will be \
_description = "Segmentation line"
_columns = {
- 'name': fields.char('Rule Name', size=64, required=True),
+ 'name': fields.char('Rule Name', required=True),
'segmentation_id': fields.many2one('crm.segmentation', 'Segmentation'),
'expr_name': fields.selection([('sale','Sale Amount'),
- ('purchase','Purchase Amount')], 'Control Variable', size=64, required=True),
+ ('purchase','Purchase Amount')], 'Control Variable', required=True),
'expr_operator': fields.selection([('<','<'),('=','='),('>','>')], 'Operator', required=True),
'expr_value': fields.float('Value', required=True),
'operator': fields.selection([('and','Mandatory Expression'),\
_rec_name = 'date_deadline'
_columns = {
- 'date_deadline': fields.date('Exp. Closing', size=10, readonly=True, help="Expected Closing"),
+ 'date_deadline': fields.date('Exp. Closing', readonly=True, help="Expected Closing"),
'create_date': fields.datetime('Creation Date', readonly=True),
'opening_date': fields.date('Assignation Date', readonly=True),
'date_closed': fields.date('Close Date', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
'nbr': fields.integer('# of Cases', readonly=True),
- 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
+ 'state': fields.selection(AVAILABLE_STATES, 'Status', readonly=True),
'create_date': fields.datetime('Create Date', readonly=True, select=True),
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'duration': fields.float('Duration', digits=(16,2),readonly=True, group_operator="avg"),
_description = 'Phonecall To Phonecall'
_columns = {
- 'name' : fields.char('Call summary', size=64, required=True, select=1),
+ 'name' : fields.char('Call summary', required=True, select=1),
'user_id' : fields.many2one('res.users',"Assign To"),
- 'contact_name':fields.char('Contact', size=64),
- 'phone':fields.char('Phone', size=64),
+ 'contact_name':fields.char('Contact'),
+ 'phone':fields.char('Phone'),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="['|',('section_id','=',False),('section_id','=',section_id),\
('object_id.model', '=', 'crm.phonecall')]"),
_order = "sequence"
_columns = {
- 'name': fields.char('Stage Name', size=64, required=True, translate=True),
+ 'name': fields.char('Stage Name', required=True, translate=True),
'sequence': fields.integer('Sequence', help="Used to order stages. Lower is better."),
'section_ids':fields.many2many('crm.case.section', 'section_claim_stage_rel', 'stage_id', 'section_id', string='Sections',
help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."),
_columns = {
'id': fields.integer('ID', readonly=True),
- 'name': fields.char('Claim Subject', size=128, required=True),
+ 'name': fields.char('Claim Subject', required=True),
'active': fields.boolean('Active'),
- 'action_next': fields.char('Next Action', size=200),
+ 'action_next': fields.char('Next Action'),
'date_action_next': fields.datetime('Next Action Date'),
'description': fields.text('Description'),
'resolution': fields.text('Resolution'),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
'type_action': fields.selection([('correction','Corrective Action'),('prevention','Preventive Action')], 'Action Type'),
'user_id': fields.many2one('res.users', 'Responsible', track_visibility='always'),
- 'user_fault': fields.char('Trouble Responsible', size=64),
+ 'user_fault': fields.char('Trouble Responsible'),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help="Responsible sales team."\
" Define Responsible user and Email account for"\
'partner_id': fields.many2one('res.partner', 'Partner'),
'email_cc': fields.text('Watchers Emails', size=252, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'email_from': fields.char('Email', size=128, help="Destination email for email gateway."),
- 'partner_phone': fields.char('Phone', size=32),
+ 'partner_phone': fields.char('Phone'),
'stage_id': fields.many2one ('crm.claim.stage', 'Stage', track_visibility='onchange',
domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
'cause': fields.text('Root Cause'),
_description = "CRM Claim Report"
_columns = {
- 'name': fields.char('Year', size=64, required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
_columns = {
'id': fields.integer('ID', readonly=True),
- 'name': fields.char('Name', size=128, required=True),
+ 'name': fields.char('Name', required=True),
'active': fields.boolean('Active', required=False),
'date_action_last': fields.datetime('Last Action', readonly=1),
'date_action_next': fields.datetime('Next Action', readonly=1),
('open', 'In Progress'),
('pending', 'Pending'),
('done', 'Closed'),
- ('cancel', 'Cancelled')], 'Status', size=16, readonly=True, track_visibility='onchange',
+ ('cancel', 'Cancelled')], 'Status', readonly=True, track_visibility='onchange',
help='The status is set to \'Draft\', when a case is created.\
\nIf the case is in progress the status is set to \'Open\'.\
\nWhen the case is over, the status is set to \'Done\'.\
_auto = False
_columns = {
- 'name': fields.char('Year', size=64, required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
- 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
+ 'state': fields.selection(AVAILABLE_STATES, 'Status', readonly=True),
'month':fields.selection([('01', 'January'), ('02', 'February'), \
('03', 'March'), ('04', 'April'),\
('05', 'May'), ('06', 'June'), \
_columns = {
'sequence': fields.integer('Sequence'),
'active': fields.boolean('Active'),
- 'name': fields.char('Grade Name', size=32),
+ 'name': fields.char('Grade Name'),
'partner_weight': fields.integer('Grade Weight',
help="Gives the probability to assign a lead to this partner. (0 means no assignation.)"),
}
_columns = {
'sequence' : fields.integer('Sequence'),
- 'name' : fields.char('Name', size=32, required=True),
+ 'name' : fields.char('Name', required=True),
}
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'type':fields.selection([
('lead','Lead'),
- ('opportunity','Opportunity'),
+ ('opportunity','Opportunity')
],'Type', help="Type is used to separate Leads and Opportunities"),
}
def init(self, cr):
_description= "Question"
_columns={
- 'name': fields.char("Question",size=128, required=True),
+ 'name': fields.char("Question", required=True),
'answers_ids': fields.one2many("crm_profiling.answer","question_id","Avalaible Answers",),
}
_description= "Questionnaire"
_columns = {
- 'name': fields.char("Questionnaire",size=128, required=True),
+ 'name': fields.char("Questionnaire", required=True),
'description':fields.text("Description", required=True),
'questions_ids': fields.many2many('crm_profiling.question','profile_questionnaire_quest_rel',\
'questionnaire', 'question', "Questions"),
_name="crm_profiling.answer"
_description="Answer"
_columns={
- "name": fields.char("Answer",size=128, required=True),
+ "name": fields.char("Answer", required=True),
"question_id": fields.many2one('crm_profiling.question',"Question"),
}
class decimal_precision(orm.Model):
_name = 'decimal.precision'
_columns = {
- 'name': fields.char('Usage', size=50, select=True, required=True),
+ 'name': fields.char('Usage', select=True, required=True),
'digits': fields.integer('Digits', required=True),
}
_defaults = {
return res
_columns = {
- 'name': fields.char('Delivery Method', size=64, required=True),
+ 'name': fields.char('Delivery Method', required=True),
'partner_id': fields.many2one('res.partner', 'Transport Company', required=True, help="The partner that is doing the delivery service."),
'product_id': fields.many2one('product.product', 'Delivery Product', required=True),
'grids_id': fields.one2many('delivery.grid', 'carrier_id', 'Delivery Grids'),
_name = "delivery.grid"
_description = "Delivery Grid"
_columns = {
- 'name': fields.char('Grid Name', size=64, required=True),
- 'sequence': fields.integer('Sequence', size=64, required=True, help="Gives the sequence order when displaying a list of delivery grid."),
+ 'name': fields.char('Grid Name', required=True),
+ 'sequence': fields.integer('Sequence', required=True, help="Gives the sequence order when displaying a list of delivery grid."),
'carrier_id': fields.many2one('delivery.carrier', 'Carrier', required=True, ondelete='cascade'),
'country_ids': fields.many2many('res.country', 'delivery_grid_country_rel', 'grid_id', 'country_id', 'Countries'),
'state_ids': fields.many2many('res.country.state', 'delivery_grid_state_rel', 'grid_id', 'state_id', 'States'),
_name = "delivery.grid.line"
_description = "Delivery Grid Line"
_columns = {
- 'name': fields.char('Name', size=64, required=True),
- 'sequence': fields.integer('Sequence', size=64, required=True, help="Gives the sequence order when calculating delivery grid."),
+ 'name': fields.char('Name', required=True),
+ 'sequence': fields.integer('Sequence', required=True, help="Gives the sequence order when calculating delivery grid."),
'grid_id': fields.many2one('delivery.grid', 'Grid',required=True, ondelete='cascade'),
'type': fields.selection([('weight','Weight'),('volume','Volume'),\
('wv','Weight * Volume'), ('price','Price'), ('quantity','Quantity')],\
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
}),
- 'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32),
+ 'carrier_tracking_ref': fields.char('Carrier Tracking Ref'),
'number_of_packages': fields.integer('Number of Packages'),
'weight_uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True,readonly="1",help="Unit of measurement for Weight",),
}
_description = 'Directory'
_order = 'name'
_columns = {
- 'name': fields.char('Name', size=64, required=True, select=1),
+ 'name': fields.char('Name', required=True, select=1),
'write_date': fields.datetime('Date Modified', readonly=True),
'write_uid': fields.many2one('res.users', 'Last Modification User', readonly=True),
'create_date': fields.datetime('Date Created', readonly=True),
'type': fields.selection([ ('directory','Static Directory'), ('ressource','Folders per resource'), ],
'Type', required=True, select=1, change_default=True,
help="Each directory can either have the type Static or be linked to another resource. A static directory, as with Operating Systems, is the classic directory that can contain a set of files. The directories linked to systems resources automatically possess sub-directories for each of resource types defined in the parent directory."),
- 'domain': fields.char('Domain', size=128, help="Use a domain if you want to apply an automatic filter on visible resources."),
+ 'domain': fields.char('Domain', help="Use a domain if you want to apply an automatic filter on visible resources."),
'ressource_type_id': fields.many2one('ir.model', 'Resource model', change_default=True,
help="Select an object here and there will be one folder per record of that resource."),
'resource_field': fields.many2one('ir.model.fields', 'Name field', help='Field to be used as name on resource directories. If empty, the "name" will be used.'),
_description = 'Directory Dynamic Context'
_columns = {
'dir_id': fields.many2one('document.directory', 'Directory', required=True, ondelete="cascade"),
- 'field': fields.char('Field', size=20, required=True, select=1, help="The name of the field."),
- 'expr': fields.char('Expression', size=64, required=True, help="A python expression used to evaluate the field.\n" + \
+ 'field': fields.char('Field', required=True, select=1, help="The name of the field."),
+ 'expr': fields.char('Expression', required=True, help="A python expression used to evaluate the field.\n" + \
"You can use 'dir_id' for current dir, 'res_id', 'res_model' as a reference to the current record, in dynamic folders"),
}
_name = 'document.directory.content.type'
_description = 'Directory Content Type'
_columns = {
- 'name': fields.char('Content Type', size=64, required=True),
+ 'name': fields.char('Content Type', required=True),
'code': fields.char('Extension', size=4),
'active': fields.boolean('Active'),
- 'mimetype': fields.char('Mime Type',size=32)
+ 'mimetype': fields.char('Mime Type')
}
_defaults = {
'active': lambda *args: 1
return res
_columns = {
- 'name': fields.char('Content Name', size=64, required=True),
+ 'name': fields.char('Content Name', required=True),
'sequence': fields.integer('Sequence', size=16),
'prefix': fields.char('Prefix', size=16),
'suffix': fields.char('Suffix', size=16),
_columns = {
'file_size': fields.integer('File Size', readonly=True),
'nbr':fields.integer('# of Files', readonly=True),
- 'month': fields.char('Month', size=24,readonly=True),
+ 'month': fields.char('Month', size=24, readonly=True),
}
_order = "month"
def init(self, cr):
'name': fields.char('Name'),
'model_id': fields.many2one('ir.model', 'Applies to', help="The kind of document with with this template can be used"),
'model': fields.related('model_id', 'model', type='char', string='Related Document Model',
- size=128, select=True, store=True, readonly=True),
+ select=True, store=True, readonly=True),
'lang': fields.char('Language',
help="Optional translation language (ISO code) to select when sending out an email. "
"If not set, the english version will be used. "
_name = 'event.type'
_description = __doc__
_columns = {
- 'name': fields.char('Event Type', size=64, required=True),
- 'default_reply_to': fields.char('Default Reply-To', size=64,help="The email address of the organizer which is put in the 'Reply-To' of all emails sent automatically at event or registrations confirmation. You can also put your email address of your mail gateway if you use one." ),
+ 'name': fields.char('Event Type', required=True),
+ 'default_reply_to': fields.char('Default Reply-To', size=64, help="The email address of the organizer which is put in the 'Reply-To' of all emails sent automatically at event or registrations confirmation. You can also put your email address of your mail gateway if you use one." ),
'default_email_event': fields.many2one('email.template','Event Confirmation Email', help="It will select this default confirmation event mail value when you choose this event"),
'default_email_registration': fields.many2one('email.template','Registration Confirmation Email', help="It will select this default confirmation registration mail value when you choose this event"),
'default_registration_min': fields.integer('Default Minimum Registration', help="It will select this default minimum value when you choose this event"),
_inherit = ['mail.thread', 'ir.needaction_mixin']
_columns = {
'id': fields.integer('ID'),
- 'origin': fields.char('Source Document', size=124,readonly=True,help="Reference of the sales order which created the registration"),
+ 'origin': fields.char('Source Document', readonly=True,help="Reference of the sales order which created the registration"),
'nb_register': fields.integer('Number of Participants', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'event_id': fields.many2one('event.event', 'Event', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),
'create_date': fields.datetime('Creation Date' , readonly=True),
'date_closed': fields.datetime('Attended Date', readonly=True),
'date_open': fields.datetime('Registration Date', readonly=True),
- 'reply_to': fields.related('event_id','reply_to',string='Reply-to Email', type='char', size=128, readonly=True,),
+ 'reply_to': fields.related('event_id','reply_to',string='Reply-to Email', type='char', readonly=True,),
'log_ids': fields.one2many('mail.message', 'res_id', 'Logs', domain=[('model','=',_name)]),
'event_end_date': fields.related('event_id','date_end', type='datetime', string="Event End Date", readonly=True),
'event_begin_date': fields.related('event_id', 'date_begin', type='datetime', string="Event Start Date", readonly=True),
('cancel', 'Cancelled'),
('open', 'Confirmed'),
('done', 'Attended')], 'Status',
- size=16, readonly=True),
+ readonly=True),
'email': fields.char('Email', size=64),
'phone': fields.char('Phone', size=64),
- 'name': fields.char('Name', size=128, select=True),
+ 'name': fields.char('Name', select=True),
}
_defaults = {
'nb_register': 1,
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
'event_id': fields.many2one('event.event', "Event", required=True, ondelete='cascade'),
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[("event_type_id", "!=", False)]),
'registration_ids': fields.one2many('event.registration', 'event_ticket_id', 'Registrations'),
_order = 'priority'
_columns = {
- 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'name':fields.char('Name', required=True, readonly=False),
'active':fields.boolean('Active', required=False),
'state':fields.selection([
('draft', 'Not Confirmed'),
('done', 'Confirmed'),
], 'Status', select=True, readonly=True),
- 'server' : fields.char('Server Name', size=256, readonly=True, help="Hostname or IP of the mail server", states={'draft':[('readonly', False)]}),
+ 'server' : fields.char('Server Name', readonly=True, help="Hostname or IP of the mail server", states={'draft':[('readonly', False)]}),
'port' : fields.integer('Port', readonly=True, states={'draft':[('readonly', False)]}),
'type':fields.selection([
('pop', 'POP Server'),
'original':fields.boolean('Keep Original', help="Whether a full original copy of each email should be kept for reference"
"and attached to each processed message. This will usually double the size of your message database."),
'date': fields.datetime('Last Fetch Date', readonly=True),
- 'user' : fields.char('Username', size=256, readonly=True, states={'draft':[('readonly', False)]}),
- 'password' : fields.char('Password', size=1024, readonly=True, states={'draft':[('readonly', False)]}),
+ 'user' : fields.char('Username', readonly=True, states={'draft':[('readonly', False)]}),
+ 'password' : fields.char('Password', readonly=True, states={'draft':[('readonly', False)]}),
'action_id':fields.many2one('ir.actions.server', 'Server Action', help="Optional custom server action to trigger for each incoming mail, "
"on the record that was created or updated by this mail"),
'object_id': fields.many2one('ir.model', "Create a New Record", help="Process each incoming mail as part of a conversation "
"lower values mean higher priority"),
'message_ids': fields.one2many('mail.mail', 'fetchmail_server_id', 'Messages', readonly=True),
'configuration' : fields.text('Configuration', readonly=True),
- 'script' : fields.char('Script', readonly=True, size=64),
+ 'script' : fields.char('Script', readonly=True),
}
_defaults = {
'state': "draft",
_columns = {
'name': fields.function(_model_name_get_fnc, type="char", string='Name', store=True),
- 'modelname': fields.char('Model name', size=32, required=True),
+ 'modelname': fields.char('Model name', required=True),
'brand_id': fields.many2one('fleet.vehicle.model.brand', 'Model Brand', required=True, help='Brand of the vehicle'),
'vendors': fields.many2many('res.partner', 'fleet_vehicle_model_vendors', 'model_id', 'partner_id', string='Vendors'),
'image': fields.related('brand_id', 'image', type="binary", string="Logo"),
return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
_columns = {
- 'name': fields.char('Brand Name', size=64, required=True),
+ 'name': fields.char('Brand Name', required=True),
'image': fields.binary("Logo",
help="This field holds the image used as logo for the brand, limited to 1024x1024px."),
'image_medium': fields.function(_get_image, fnct_inv=_set_image,
_columns = {
'name': fields.function(_vehicle_name_get_fnc, type="char", string='Name', store=True),
'company_id': fields.many2one('res.company', 'Company'),
- 'license_plate': fields.char('License Plate', size=32, required=True, help='License plate number of the vehicle (ie: plate number for a car)'),
- 'vin_sn': fields.char('Chassis Number', size=32, help='Unique number written on the vehicle motor (VIN/SN number)'),
+ 'license_plate': fields.char('License Plate', required=True, help='License plate number of the vehicle (ie: plate number for a car)'),
+ 'vin_sn': fields.char('Chassis Number', help='Unique number written on the vehicle motor (VIN/SN number)'),
'driver_id': fields.many2one('res.partner', 'Driver', help='Driver of the vehicle'),
'model_id': fields.many2one('fleet.vehicle.model', 'Model', required=True, help='Model of the vehicle'),
'log_fuel': fields.one2many('fleet.vehicle.log.fuel', 'vehicle_id', 'Fuel Logs'),
'fuel_logs_count': fields.function(_count_all, type='integer', string='Fuel Logs', multi=True),
'odometer_count': fields.function(_count_all, type='integer', string='Odometer', multi=True),
'acquisition_date': fields.date('Acquisition Date', required=False, help='Date when the vehicle has been bought'),
- 'color': fields.char('Color', size=32, help='Color of the vehicle'),
+ 'color': fields.char('Color', help='Color of the vehicle'),
'state_id': fields.many2one('fleet.vehicle.state', 'State', help='Current state of the vehicle', ondelete="set null"),
- 'location': fields.char('Location', size=128, help='Location of the vehicle (garage, ...)'),
+ 'location': fields.char('Location', help='Location of the vehicle (garage, ...)'),
'seats': fields.integer('Seats Number', help='Number of seats of the vehicle'),
'doors': fields.integer('Doors Number', help='Number of doors of the vehicle'),
'tag_ids' :fields.many2many('fleet.vehicle.tag', 'fleet_vehicle_vehicle_tag_rel', 'vehicle_tag_id','tag_id', 'Tags'),
_description = 'Services for vehicles'
_columns = {
'purchaser_id': fields.many2one('res.partner', 'Purchaser', domain="['|',('customer','=',True),('employee','=',True)]"),
- 'inv_ref': fields.char('Invoice Reference', size=64),
+ 'inv_ref': fields.char('Invoice Reference'),
'vendor_id': fields.many2one('res.partner', 'Supplier', domain="[('supplier','=',True)]"),
'cost_amount': fields.related('cost_id', 'amount', string='Amount', type='float', store=True), #we need to keep this field as a related with store=True because the graph view doesn't support (1) to address fields from inherited table and (2) fields that aren't stored in database
'notes': fields.text('Notes'),
_description = 'Contains the different possible status of a leasing contract'
_columns = {
- 'name':fields.char('Contract Status', size=64, required=True),
+ 'name':fields.char('Contract Status', required=True),
}
'badge_id': res_id,
}
badge_user_obj.create(cr, SUPERUSER_ID, values, context=context)
- return True
\ No newline at end of file
+ return True
return result
_columns = {
- 'name': fields.char('Template Name', required=True, size=1024),
+ 'name': fields.char('Template Name', required=True),
'model_id': fields.many2one('ir.model', 'Model', ondelete='set null', required=True),
'model': fields.related('model_id', 'model', type='char', string='Model', readonly=True),
'filter_id': fields.many2one('ir.filters', 'Filter', domain="[('model_id', '=', model)]"),
'google_drive_template_url': fields.char('Template URL', required=True, size=1024),
'google_drive_resource_id': fields.function(_resource_get, type="char", string='Resource Id'),
'google_drive_client_id': fields.function(_client_id_get, type="char", string='Google Client '),
- 'name_template': fields.char('Google Drive Name Pattern', size=64, help='Choose how the new google drive will be named, on google side. Eg. gdoc_%(field_name)s', required=True),
+ 'name_template': fields.char('Google Drive Name Pattern', help='Choose how the new google drive will be named, on google side. Eg. gdoc_%(field_name)s', required=True),
'active': fields.boolean('Active'),
}
_inherit = "base.config.settings"
_columns = {
- 'google_drive_authorization_code': fields.char('Authorization Code', size=124),
+ 'google_drive_authorization_code': fields.char('Authorization Code'),
'google_drive_uri': fields.char('URI', readonly=True, help="The URL to generate the authorization code from Google"),
}
_defaults = {
_name = "hr.employee.category"
_description = "Employee Category"
_columns = {
- 'name': fields.char("Employee Tag", size=64, required=True),
+ 'name': fields.char("Employee Tag", required=True),
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
'parent_id': fields.many2one('hr.employee.category', 'Parent Employee Tag', select=True),
'child_ids': fields.one2many('hr.employee.category', 'parent_id', 'Child Categories'),
_description = "Job Position"
_inherit = ['mail.thread', 'ir.needaction_mixin']
_columns = {
- 'name': fields.char('Job Name', size=128, required=True, select=True),
+ 'name': fields.char('Job Name', required=True, select=True),
'expected_employees': fields.function(_get_nbr_employees, string='Total Forecasted Employees',
help='Expected number of employees for this job position after new recruitment.',
store = {
'name_related': fields.related('resource_id', 'name', type='char', string='Name', readonly=True, store=True),
'country_id': fields.many2one('res.country', 'Nationality'),
'birthday': fields.date("Date of Birth"),
- 'ssnid': fields.char('SSN No', size=32, help='Social Security Number'),
- 'sinid': fields.char('SIN No', size=32, help="Social Insurance Number"),
- 'identification_id': fields.char('Identification No', size=32),
- 'otherid': fields.char('Other Id', size=64),
+ 'ssnid': fields.char('SSN No', help='Social Security Number'),
+ 'sinid': fields.char('SIN No', help="Social Insurance Number"),
+ 'identification_id': fields.char('Identification No'),
+ 'otherid': fields.char('Other Id'),
'gender': fields.selection([('male', 'Male'), ('female', 'Female')], 'Gender'),
'marital': fields.selection([('single', 'Single'), ('married', 'Married'), ('widower', 'Widower'), ('divorced', 'Divorced')], 'Marital Status'),
'department_id': fields.many2one('hr.department', 'Department'),
'address_id': fields.many2one('res.partner', 'Working Address'),
'address_home_id': fields.many2one('res.partner', 'Home Address'),
'bank_account_id': fields.many2one('res.partner.bank', 'Bank Account Number', domain="[('partner_id','=',address_home_id)]", help="Employee bank salary account"),
- 'work_phone': fields.char('Work Phone', size=32, readonly=False),
- 'mobile_phone': fields.char('Work Mobile', size=32, readonly=False),
+ 'work_phone': fields.char('Work Phone', readonly=False),
+ 'mobile_phone': fields.char('Work Mobile', readonly=False),
'work_email': fields.char('Work Email', size=240),
- 'work_location': fields.char('Office Location', size=32),
+ 'work_location': fields.char('Office Location'),
'notes': fields.text('Notes'),
'parent_id': fields.many2one('hr.employee', 'Manager'),
'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel', 'emp_id', 'category_id', 'Tags'),
help="Small-sized photo of the employee. It is automatically "\
"resized as a 64x64px image, with aspect ratio preserved. "\
"Use this field anywhere a small image is required."),
- 'passport_id': fields.char('Passport No', size=64),
+ 'passport_id': fields.char('Passport No'),
'color': fields.integer('Color Index'),
'city': fields.related('address_id', 'city', type='char', string='City'),
'login': fields.related('user_id', 'login', type='char', string='Login', readonly=1),
_name = "hr.department"
_columns = {
- 'name': fields.char('Department Name', size=64, required=True),
+ 'name': fields.char('Department Name', required=True),
'complete_name': fields.function(_dept_name_get_fnc, type="char", string='Name'),
'company_id': fields.many2one('res.company', 'Company', select=True, required=False),
'parent_id': fields.many2one('hr.department', 'Parent Department', select=True),
_name = "hr.action.reason"
_description = "Action Reason"
_columns = {
- 'name': fields.char('Reason', size=64, required=True, help='Specifies the reason for Signing In/Signing Out.'),
+ 'name': fields.char('Reason', required=True, help='Specifies the reason for Signing In/Signing Out.'),
'action_type': fields.selection([('sign_in', 'Sign in'), ('sign_out', 'Sign out')], "Action Type"),
}
_defaults = {
_columns = {
'manager': fields.boolean('Is a Manager'),
'medic_exam': fields.date('Medical Examination Date'),
- 'place_of_birth': fields.char('Place of Birth', size=30),
+ 'place_of_birth': fields.char('Place of Birth'),
'children': fields.integer('Number of Children'),
- 'vehicle': fields.char('Company Vehicle', size=64),
+ 'vehicle': fields.char('Company Vehicle'),
'vehicle_distance': fields.integer('Home-Work Dist.', help="In kilometers"),
'contract_ids': fields.one2many('hr.contract', 'employee_id', 'Contracts'),
'contract_id':fields.function(_get_latest_contract, string='Contract', type='many2one', relation="hr.contract", help='Latest contract of the employee'),
_name = 'hr.contract.type'
_description = 'Contract Type'
_columns = {
- 'name': fields.char('Contract Type', size=32, required=True),
+ 'name': fields.char('Contract Type', required=True),
}
class hr_contract(osv.osv):
_name = 'hr.contract'
_description = 'Contract'
_columns = {
- 'name': fields.char('Contract Reference', size=64, required=True),
+ 'name': fields.char('Contract Reference', required=True),
'employee_id': fields.many2one('hr.employee', "Employee", required=True),
'department_id': fields.related('employee_id','department_id', type='many2one', relation='hr.department', string="Department", readonly=True),
'type_id': fields.many2one('hr.contract.type', "Contract Type", required=True),
'wage': fields.float('Wage', digits=(16,2), required=True, help="Basic Salary of the employee"),
'advantages': fields.text('Advantages'),
'notes': fields.text('Notes'),
- 'permit_no': fields.char('Work Permit No', size=256, required=False, readonly=False),
- 'visa_no': fields.char('Visa No', size=64, required=False, readonly=False),
+ 'permit_no': fields.char('Work Permit No', required=False, readonly=False),
+ 'visa_no': fields.char('Visa No', required=False, readonly=False),
'visa_expire': fields.date('Visa Expire Date'),
}
_name = "hr_evaluation.plan"
_description = "Appraisal Plan"
_columns = {
- 'name': fields.char("Appraisal Plan", size=64, required=True),
+ 'name': fields.char("Appraisal Plan", required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'phase_ids': fields.one2many('hr_evaluation.plan.phase', 'plan_id', 'Appraisal Phases'),
'month_first': fields.integer('First Appraisal in (months)', help="This number of months will be used to schedule the first evaluation date of the employee when selecting an evaluation plan. "),
}
_columns = {
- 'name': fields.char('Description', size=128, required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
+ 'name': fields.char('Description', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'id': fields.integer('Sheet ID', readonly=True),
'date': fields.date('Date', select=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is done."),
return result and result[1] or False
_columns = {
- 'name': fields.char('Expense Note', size=128, required=True),
+ 'name': fields.char('Expense Note', required=True),
'date_value': fields.date('Date', required=True),
'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')),
'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),
'description': fields.text('Description'),
'analytic_account': fields.many2one('account.analytic.account','Analytic account'),
- 'ref': fields.char('Reference', size=32),
+ 'ref': fields.char('Reference'),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of expense lines."),
}
_defaults = {
'day': fields.char('Day', size=128, readonly=True),
'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),
+ ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'journal_id': fields.many2one('account.journal', 'Force Journal', readonly=True),
'product_qty':fields.float('Qty', readonly=True),
_description = "Total holidays by type"
_auto = False
_columns = {
- 'name': fields.char('Employee', size=64),
+ 'name': fields.char('Employee'),
'no_of_leaves': fields.integer('Remaining leaves'),
'user_id': fields.many2one('res.users', 'User'),
- 'leave_type': fields.char('Leave Type', size=64),
+ 'leave_type': fields.char('Leave Type'),
}
def init(self, cr):
_name = 'hr.payroll.structure'
_description = 'Salary Structure'
_columns = {
- 'name':fields.char('Name', size=256, required=True),
+ 'name':fields.char('Name', required=True),
'code':fields.char('Reference', size=64, required=True),
'company_id':fields.many2one('res.company', 'Company', required=True),
'note': fields.text('Description'),
_columns = {
'company_id':fields.many2one('res.company', 'Company'),
'partner_id':fields.many2one('res.partner', 'Partner'),
- 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'name':fields.char('Name', required=True, readonly=False),
'register_line_ids':fields.one2many('hr.payslip.line', 'register_id', 'Register Line', readonly=True),
'note': fields.text('Description'),
}
_name = 'hr.salary.rule.category'
_description = 'Salary Rule Category'
_columns = {
- 'name':fields.char('Name', size=64, required=True, readonly=False),
+ 'name':fields.char('Name', required=True, readonly=False),
'code':fields.char('Code', size=64, required=True, readonly=False),
'parent_id':fields.many2one('hr.salary.rule.category', 'Parent', help="Linking a salary category to its parent is used only for the reporting purpose."),
'children_ids': fields.one2many('hr.salary.rule.category', 'parent_id', 'Children'),
_name = 'hr.payslip.run'
_description = 'Payslip Batches'
_columns = {
- 'name': fields.char('Name', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
+ 'name': fields.char('Name', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'slip_ids': fields.one2many('hr.payslip', 'payslip_run_id', 'Payslips', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'state': fields.selection([
('draft', 'Draft'),
_columns = {
'struct_id': fields.many2one('hr.payroll.structure', 'Structure', readonly=True, states={'draft': [('readonly', False)]}, help='Defines the rules that have to be applied to this payslip, accordingly to the contract chosen. If you let empty the field contract, this field isn\'t mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period'),
- 'name': fields.char('Payslip Name', size=64, required=False, readonly=True, states={'draft': [('readonly', False)]}),
- 'number': fields.char('Reference', size=64, required=False, readonly=True, states={'draft': [('readonly', False)]}),
+ 'name': fields.char('Payslip Name', required=False, readonly=True, states={'draft': [('readonly', False)]}),
+ 'number': fields.char('Reference', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'employee_id': fields.many2one('hr.employee', 'Employee', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'date_from': fields.date('Date From', readonly=True, states={'draft': [('readonly', False)]}, required=True),
'date_to': fields.date('Date To', readonly=True, states={'draft': [('readonly', False)]}, required=True),
_name = 'hr.payslip.worked_days'
_description = 'Payslip Worked Days'
_columns = {
- 'name': fields.char('Description', size=256, required=True),
+ 'name': fields.char('Description', 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"),
_name = 'hr.payslip.input'
_description = 'Payslip Input'
_columns = {
- 'name': fields.char('Description', size=256, required=True),
+ 'name': fields.char('Description', 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"),
_name = 'hr.salary.rule'
_columns = {
- 'name':fields.char('Name', size=256, required=True, readonly=False),
+ 'name':fields.char('Name', 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', 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."),
+ 'quantity': fields.char('Quantity', 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."),
'appears_on_payslip': fields.boolean('Appears on Payslip', help="Used to display the salary rule on payslip."),
'parent_rule_id':fields.many2one('hr.salary.rule', 'Parent Salary Rule', select=True),
'company_id':fields.many2one('res.company', 'Company', required=False),
'condition_select': fields.selection([('none', 'Always True'),('range', 'Range'), ('python', 'Python Expression')], "Condition Based on", required=True),
- 'condition_range':fields.char('Range Based on',size=1024, readonly=False, help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'),
+ 'condition_range':fields.char('Range Based on', readonly=False, help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'),
'condition_python':fields.text('Python Condition', required=True, readonly=False, help='Applied this rule for calculation if condition is true. You can specify condition like basic > 1000.'),
'condition_range_min': fields.float('Minimum Range', required=False, help="The minimum amount, applied for this rule."),
'condition_range_max': fields.float('Maximum Range', required=False, help="The maximum amount, applied for this rule."),
'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Payroll'),),
'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll Rate'), help='For example, enter 50.0 to apply a percentage of 50%'),
'amount_python_compute':fields.text('Python Code'),
- 'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),
+ 'amount_percentage_base':fields.char('Percentage based on', required=False, readonly=False, help='result will be affected to a variable'),
'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),
'register_id':fields.many2one('hr.contribution.register', 'Contribution Register', help="Eventual third party involved in the salary payment of the employees."),
'input_ids': fields.one2many('hr.rule.input', 'input_id', 'Inputs'),
_name = 'hr.rule.input'
_description = 'Salary Rule Input'
_columns = {
- 'name': fields.char('Description', size=256, required=True),
+ 'name': fields.char('Description', required=True),
'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),
'input_id': fields.many2one('hr.salary.rule', 'Salary Rule Input', required=True)
}
_name = "hr.recruitment.source"
_description = "Source of Applicants"
_columns = {
- 'name': fields.char('Source Name', size=64, required=True, translate=True),
+ 'name': fields.char('Source Name', required=True, translate=True),
}
class hr_recruitment_stage(osv.osv):
_description = "Stage of Recruitment"
_order = 'sequence'
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."),
'department_id':fields.many2one('hr.department', 'Specific to a Department', help="Stages of the recruitment process may be different per department. If this stage is common to all departments, keep this field empty."),
'requirements': fields.text('Requirements'),
_name = "hr.recruitment.degree"
_description = "Degree of Recruitment"
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of degrees."),
}
_defaults = {
return res
_columns = {
- 'name': fields.char('Subject / Application Name', size=128, required=True),
+ 'name': fields.char('Subject / Application Name', required=True),
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the case without removing it."),
'description': fields.text('Description'),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'title_action': fields.char('Next Action', size=64),
'priority': fields.selection(AVAILABLE_PRIORITIES, 'Appreciation'),
'job_id': fields.many2one('hr.job', 'Applied Job'),
- 'salary_proposed_extra': fields.char('Proposed Salary Extra', size=100, help="Salary Proposed by the Organisation, extra advantages"),
- 'salary_expected_extra': fields.char('Expected Salary Extra', size=100, help="Salary Expected by Applicant, extra advantages"),
+ 'salary_proposed_extra': fields.char('Proposed Salary Extra', help="Salary Proposed by the Organisation, extra advantages"),
+ 'salary_expected_extra': fields.char('Expected Salary Extra', help="Salary Expected by Applicant, extra advantages"),
'salary_proposed': fields.float('Proposed Salary', help="Salary Proposed by the Organisation"),
'salary_expected': fields.float('Expected Salary', help="Salary Expected by Applicant"),
'availability': fields.integer('Availability', help="The number of days in which the applicant will be available to start working"),
- 'partner_name': fields.char("Applicant's Name", size=64),
+ 'partner_name': fields.char("Applicant's Name"),
'partner_phone': fields.char('Phone', size=32),
'partner_mobile': fields.char('Mobile', size=32),
'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
'department_id': fields.many2one('hr.department', 'Department'),
'survey': fields.related('job_id', 'survey_id', type='many2one', relation='survey.survey', string='Survey'),
'response_id': fields.many2one('survey.user_input', "Response", ondelete='set null', oldname="response"),
- 'reference': fields.char('Referred By', size=128),
+ 'reference': fields.char('Referred By'),
'source_id': fields.many2one('hr.recruitment.source', 'Source'),
'day_open': fields.function(_compute_day, string='Days to Open', \
multi='day_open', type="float", store=True),
_name = "hr.applicant_category"
_description = "Category of applicant"
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_description = 'Sign Out By Project'
_columns = {
'account_id': fields.many2one('account.analytic.account', 'Project / Analytic Account', domain=[('type','=','normal')]),
- 'info': fields.char('Work Description', size=256, required=True),
+ 'info': fields.char('Work Description', required=True),
'date_start': fields.datetime('Starting Date', readonly=True),
'date': fields.datetime('Closing Date'),
'analytic_amount': fields.float('Minimum Analytic Amount'),
- 'name': fields.char('Employee\'s Name', size=32, required=True, readonly=True),
+ 'name': fields.char('Employee\'s Name', required=True, readonly=True),
'state': fields.related('emp_id', 'state', string='Current Status', type='selection', selection=[('present', 'Present'), ('absent', 'Absent')], required=True, readonly=True),
'server_date': fields.datetime('Current Date', required=True, readonly=True),
'emp_id': fields.many2one('hr.employee', 'Employee ID')
_name = 'hr.sign.in.project'
_description = 'Sign In By Project'
_columns = {
- 'name': fields.char('Employee\'s Name', size=32, readonly=True),
+ 'name': fields.char('Employee\'s Name', readonly=True),
'state': fields.related('emp_id', 'state', string='Current Status', type='selection', selection=[('present', 'Present'), ('absent', 'Absent')], required=True, readonly=True),
'date': fields.datetime('Starting Date'),
'server_date': fields.datetime('Current Date', readonly=True),
_description = "Invoice Rate"
_order = 'factor'
_columns = {
- 'name': fields.char('Internal Name', size=128, required=True, translate=True),
- 'customer_name': fields.char('Name', size=128, help="Label for the customer"),
+ 'name': fields.char('Internal Name', required=True, translate=True),
+ 'customer_name': fields.char('Name', help="Label for the customer"),
'factor': fields.float('Discount (%)', required=True, help="Discount in percentage"),
}
_defaults = {
_description = "Timesheet Line"
_auto = False
_columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'user_id': fields.many2one('res.users', 'User', readonly=True),
'date': fields.date('Date', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'general_account_id': fields.many2one('account.account', 'General Account', readonly=True),
'invoice_id': fields.many2one('account.invoice', 'Invoiced', readonly=True),
'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),
+ ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month', readonly=True),
}
_order = 'name desc,user_id desc'
def init(self, cr):
_description = "Timesheet per day"
_auto = False
_columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'quantity': fields.float('Time', readonly=True),
'cost': fields.float('Cost', readonly=True),
'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),
+ ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month', readonly=True),
}
_order = 'name desc,user_id desc'
def init(self, cr):
_description = "Timesheet per account"
_auto = False
_columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'account_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'quantity': fields.float('Time', readonly=True),
'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),
+ ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month', readonly=True),
}
_order = 'name desc,account_id desc,user_id desc'
_description = "Daily timesheet per account"
_auto = False
_columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'account_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'quantity': fields.float('Time', readonly=True),
'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),
+ ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month', readonly=True),
}
_order = 'name desc,account_id desc,user_id desc'
_auto = False
_columns = {
'name': fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
- 'state': fields.char('Status', size=32, readonly=True),
+ 'state': fields.char('Status', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'quantity': fields.float('Quantity', readonly=True),
'quantity_max': fields.float('Max. Quantity', readonly=True),
_description = "Analytic lines to invoice report"
_auto = False
_columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),
'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Product Price')),
'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),
'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),
+ ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month', readonly=True),
}
_order = 'name desc, product_id asc, account_id asc'
}
_columns = {
- 'name': fields.char('Note', size=64, select=1,
+ 'name': fields.char('Note', select=1,
states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}),
'employee_id': fields.many2one('hr.employee', 'Employee', required=True),
'user_id': fields.related('employee_id', 'user_id', type="many2one", relation="res.users", store=True, string="User", required=False, readonly=True),#fields.many2one('res.users', 'User', required=True, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}),
return res
_columns = {
- 'name': fields.char(string="Channel Name", size=200, required=True),
+ 'name': fields.char(string="Channel Name", required=True),
'user_ids': fields.many2many('res.users', 'im_livechat_channel_im_user', 'channel_id', 'user_id', string="Users"),
'are_you_inside': fields.function(_are_you_inside, type='boolean', string='Are you inside the matrix?', store=False),
'script': fields.function(_script, type='text', string='Script', store=False),
'web_page': fields.function(_web_page, type='url', string='Web Page', store=False, size="200"),
- 'button_text': fields.char(string="Text of the Button", size=200),
- 'input_placeholder': fields.char(string="Chat Input Placeholder", size=200),
- 'default_message': fields.char(string="Welcome Message", size=200, help="This is an automated 'welcome' message that your visitor will see when they initiate a new chat session."),
+ 'button_text': fields.char(string="Text of the Button"),
+ 'input_placeholder': fields.char(string="Chat Input Placeholder"),
+ 'default_message': fields.char(string="Welcome Message", help="This is an automated 'welcome' message that your visitor will see when they initiate a new chat session."),
# image: all image fields are base64 encoded and PIL-supported
'image': fields.binary("Photo",
help="This field holds the image used as photo for the group, limited to 1024x1024px."),
return ''
_columns = {
- 'name': fields.char('File Name', size=32),
+ 'name': fields.char('File Name'),
'period_id': fields.many2one('account.period','Period', required=True),
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', domain=[('parent_id', '=', False)], required=True),
- 'msg': fields.text('File created', size=64, readonly=True),
+ 'msg': fields.text('File created', readonly=True),
'file_save': fields.binary('Save File'),
'ask_restitution': fields.boolean('Ask Restitution',help='It indicates whether a restitution is to make or not?'),
'ask_payment': fields.boolean('Ask Payment',help='It indicates whether a payment is to make or not?'),
class vat_listing_clients(osv.osv_memory):
_name = 'vat.listing.clients'
_columns = {
- 'name': fields.char('Client Name', size=32),
- 'vat': fields.char('VAT', size=64),
+ 'name': fields.char('Client Name'),
+ 'vat': fields.char('VAT'),
'turnover': fields.float('Base Amount'),
'vat_amount': fields.float('VAT Amount'),
}
_name = "partner.vat.list"
_columns = {
'partner_ids': fields.many2many('vat.listing.clients', 'vat_partner_rel', 'vat_id', 'partner_id', 'Clients', help='You can remove clients/partners which you do not want to show in xml file'),
- 'name': fields.char('File Name', size=32),
+ 'name': fields.char('File Name'),
'file_save' : fields.binary('Save File', readonly=True),
'comments': fields.text('Comments'),
}
return self.pool.get('res.country').search(cursor, user, [('code', 'in', ['AT', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB'])])
_columns = {
- 'name': fields.char('File Name', size=32),
- 'period_code': fields.char('Period Code',size = 6,required = True, help = '''This is where you have to set the period code for the intracom declaration using the format: ppyyyy
+ 'name': fields.char('File Name'),
+ 'period_code': fields.char('Period Code', size=6, required=True, help='''This is where you have to set the period code for the intracom declaration using the format: ppyyyy
PP can stand for a month: from '01' to '12'.
PP can stand for a trimester: '31','32','33','34'
The first figure means that it is a trimester,
'period_ids': fields.many2many('account.period', 'account_period_rel', 'acc_id', 'period_id', 'Period (s)', help = 'Select here the period(s) you want to include in your intracom declaration'),
'tax_code_id': fields.many2one('account.tax.code', 'Company', domain=[('parent_id', '=', False)], help="Keep empty to use the user's company", required=True),
'test_xml': fields.boolean('Test XML file', help="Sets the XML output as test file"),
- 'mand_id' : fields.char('Reference', size=14, help="Reference given by the Representative of the sending company."),
- 'msg': fields.text('File created', size=14, readonly=True),
- 'no_vat': fields.text('Partner With No VAT', size=14, readonly=True, help="The Partner whose VAT number is not defined and they are not included in XML File."),
+ 'mand_id' : fields.char('Reference', help="Reference given by the Representative of the sending company."),
+ 'msg': fields.text('File created', readonly=True),
+ 'no_vat': fields.text('Partner With No VAT', readonly=True, help="The Partner whose VAT number is not defined and they are not included in XML File."),
'file_save' : fields.binary('Save File', readonly=True),
'country_ids': fields.many2many('res.country', 'vat_country_rel', 'vat_id', 'country_id', 'European Countries'),
'comments': fields.text('Comments'),
_description = 'Import CODA File'
_columns = {
'coda_data': fields.binary('CODA File', required=True),
- 'coda_fname': fields.char('CODA Filename', size=128, required=True),
+ 'coda_fname': fields.char('CODA Filename', required=True),
'note': fields.text('Log'),
}
return super(account_invoice, self).copy(cr, uid, id, default, context=context)\r
\r
_columns = {\r
- 'reference': fields.char('Communication', size=64, help="The partner reference of this invoice."),\r
+ 'reference': fields.char('Communication', help="The partner reference of this invoice."),\r
'reference_type': fields.selection(_get_reference_type, 'Communication Type',\r
required=True),\r
}\r
from openerp.osv import fields, osv
TAX_CODE_COLUMNS = {
- 'domain':fields.char('Domain', size=32,
+ 'domain':fields.char('Domain',
help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
'tax_discount': fields.boolean('Discount this Tax in Prince',
help="Mark it for (ICMS, PIS, COFINS and others taxes included)."),
_description = 'Report for l10n_fr'
_columns = {
'code': fields.char('Code', size=64),
- 'name': fields.char('Name', size=128),
+ 'name': fields.char('Name'),
'line_ids': fields.one2many('l10n.fr.line', 'report_id', 'Lines'),
}
_sql_constraints = [
_description = 'Report Lines for l10n_fr'
_columns = {
'code': fields.char('Variable Name', size=64),
- 'definition': fields.char('Definition', size=512),
- 'name': fields.char('Name', size=256),
+ 'definition': fields.char('Definition'),
+ 'name': fields.char('Name'),
'report_id': fields.many2one('l10n.fr.report', 'Report'),
}
_sql_constraints = [
_inherit = 'res.company'
_columns = {
- 'siret': fields.char('SIRET', size=64),
- 'ape': fields.char('APE', size=64),
+ 'siret': fields.char('SIRET', size=14),
+ 'ape': fields.char('APE'),
}
'plafond_secu': fields.float('Plafond de la Securite Sociale', digits_compute=dp.get_precision('Payroll')),
'nombre_employes': fields.integer('Nombre d\'employes'),
'cotisation_prevoyance': fields.float('Cotisation Patronale Prevoyance', digits_compute=dp.get_precision('Payroll')),
- 'org_ss': fields.char('Organisme de securite sociale', size=64),
- 'conv_coll': fields.char('Convention collective', size=64),
+ 'org_ss': fields.char('Organisme de securite sociale'),
+ 'conv_coll': fields.char('Convention collective'),
}
_inherit = 'hr.contract'
_columns = {
- 'qualif': fields.char('Qualification', size=64),
- 'niveau': fields.char('Niveau', size=64),
- 'coef': fields.char('Coefficient', size=64),
+ 'qualif': fields.char('Qualification'),
+ 'niveau': fields.char('Niveau'),
+ 'coef': fields.char('Coefficient'),
}
class hr_payslip(osv.osv):
_inherit = 'hr.payslip'
_columns = {
- 'payment_mode': fields.char('Mode de paiement', size=64),
+ 'payment_mode': fields.char('Mode de paiement'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
return results
_columns = {
- 'rib_code': fields.char('RIB Bank Code', size=64),
+ 'rib_code': fields.char('RIB Bank Code'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_name = 'hr.payroll.advice'
_description = 'Bank Advice'
_columns = {
- 'name':fields.char('Name', size=32, readonly=True, required=True, states={'draft': [('readonly', False)]},),
+ 'name':fields.char('Name', readonly=True, required=True, states={'draft': [('readonly', False)]},),
'note': fields.text('Description'),
'date': fields.date('Date', readonly=True, required=True, states={'draft': [('readonly', False)]}, help="Advice Date is used to search Payslips"),
'state':fields.selection([
('confirm', 'Confirmed'),
('cancel', 'Cancelled'),
], 'Status', select=True, readonly=True),
- 'number':fields.char('Reference', size=16, readonly=True),
+ 'number':fields.char('Reference', readonly=True),
'line_ids':fields.one2many('hr.payroll.advice.line', 'advice_id', 'Employee Salary', states={'draft': [('readonly', False)]}, readonly=True),
- 'chaque_nos':fields.char('Cheque Numbers', size=256),
+ 'chaque_nos':fields.char('Cheque Numbers'),
'neft': fields.boolean('NEFT Transaction', help="Check this box if your company use online transfer for salary"),
'company_id':fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'bank_id':fields.many2one('res.bank', 'Bank', readonly=True, states={'draft': [('readonly', False)]}, help="Select the Bank from which the salary is going to be paid"),
_description = "Payment Advice Analysis"
_auto = False
_columns = {
- 'name':fields.char('Name', size=32, readonly=True),
+ 'name':fields.char('Name', readonly=True),
'date': fields.date('Date', readonly=True,),
'year': fields.char('Year', size=4, readonly=True),
'month': fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'),
], 'Status', select=True, readonly=True),
'employee_id': fields.many2one('hr.employee', 'Employee', readonly=True),
'nbr': fields.integer('# Payment Lines', readonly=True),
- 'number':fields.char('Number', size=16, readonly=True),
+ 'number':fields.char('Number', readonly=True),
'bysal': fields.float('By Salary', readonly=True),
'bank_id':fields.many2one('res.bank', 'Bank', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
- 'cheque_nos':fields.char('Cheque Numbers', size=256, readonly=True),
+ 'cheque_nos':fields.char('Cheque Numbers', readonly=True),
'neft': fields.boolean('NEFT Transaction', readonly=True),
'ifsc_code': fields.char('IFSC Code', size=32, readonly=True),
- 'employee_bank_no': fields.char('Employee Bank Account', size=32, required=True),
+ 'employee_bank_no': fields.char('Employee Bank Account', required=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'payment_advice_report')
_description = "Payslip Analysis"
_auto = False
_columns = {
- 'name':fields.char('Name', size=32, readonly=True),
+ 'name':fields.char('Name', readonly=True),
'date_from': fields.date('Date From', readonly=True,),
'date_to': fields.date('Date To', readonly=True,),
'year': fields.char('Year', size=4, readonly=True),
], 'Status', readonly=True),
'employee_id': fields.many2one('hr.employee', 'Employee', readonly=True),
'nbr': fields.integer('# Payslip lines', readonly=True),
- 'number': fields.char('Number', size=16, readonly=True),
+ 'number': fields.char('Number', readonly=True),
'struct_id': fields.many2one('hr.payroll.structure', 'Structure', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'paid': fields.boolean('Made Payment Order ? ', readonly=True),
_description = 'Report for l10n_ma_kzc'
_columns = {
'code': fields.char('Code', size=64),
- 'name': fields.char('Name', size=128),
+ 'name': fields.char('Name'),
'line_ids': fields.one2many('l10n.ma.line', 'report_id', 'Lines'),
}
_sql_constraints = [
_description = 'Report Lines for l10n_ma'
_columns = {
'code': fields.char('Variable Name', size=64),
- 'definition': fields.char('Definition', size=512),
- 'name': fields.char('Name', size=256),
+ 'definition': fields.char('Definition'),
+ 'name': fields.char('Name'),
'report_id': fields.many2one('l10n.ma.report', 'Report'),
}
_sql_constraints = [
class account_account_template(osv.osv):
_inherit = 'account.account.template'
_columns = {
- 'name': fields.char('Name', size=128, required=True, select=True, translate=True),
+ 'name': fields.char('Name', required=True, select=True, translate=True),
}
class account_account(osv.osv):
_inherit = 'account.account'
_columns = {
- 'name': fields.char('Name', size=128, required=True, select=True, translate=True),
+ 'name': fields.char('Name', required=True, select=True, translate=True),
}
class account_tax(osv.osv):
_inherit = 'account.tax'
_columns = {
- 'name': fields.char('Tax Name', size=128, required=True, select=True, translate=True),
+ 'name': fields.char('Tax Name', required=True, select=True, translate=True),
}
class account_tax_template(osv.osv):
_inherit = 'account.tax.template'
_columns = {
- 'name': fields.char('Tax Name', size=128, required=True, select=True, translate=True),
+ 'name': fields.char('Tax Name', required=True, select=True, translate=True),
}
class account_tax_code_template(osv.osv):
_inherit = 'account.tax.code.template'
_columns = {
- 'name': fields.char('Tax Case Name', size=64, required=True, translate=True),
+ 'name': fields.char('Tax Case Name', required=True, translate=True),
}
class account_chart_template(osv.osv):
_inherit = 'account.chart.template'
_columns={
- 'name': fields.char('Name', size=64, required=True, translate=True),
- 'spoken_languages': fields.char('Spoken Languages', size=64, help="State here the languages for which the translations of templates could be loaded at the time of installation of this localization module and copied in the final object when generating them from templates. You must provide the language codes separated by ';'"),
+ 'name': fields.char('Name', required=True, translate=True),
+ 'spoken_languages': fields.char('Spoken Languages', help="State here the languages for which the translations of templates could be loaded at the time of installation of this localization module and copied in the final object when generating them from templates. You must provide the language codes separated by ';'"),
}
_order = 'name'
class account_fiscal_position(osv.osv):
_inherit = 'account.fiscal.position'
_columns = {
- 'name': fields.char('Fiscal Position', size=64, required=True, translate=True),
+ 'name': fields.char('Fiscal Position', required=True, translate=True),
'note': fields.text('Notes', translate=True),
}
class account_fiscal_position_template(osv.osv):
_inherit = 'account.fiscal.position.template'
_columns = {
- 'name': fields.char('Fiscal Position Template', size=64, required=True, translate=True),
+ 'name': fields.char('Fiscal Position Template', required=True, translate=True),
'note': fields.text('Notes', translate=True),
}
class account_journal(osv.osv):
_inherit = 'account.journal'
_columns = {
- 'name': fields.char('Journal Name', size=64, required=True, translate=True),
+ 'name': fields.char('Journal Name', required=True, translate=True),
}
class account_analytic_account(osv.osv):
_inherit = 'account.analytic.account'
_columns = {
- 'name': fields.char('Account Name', size=128, required=True, translate=True),
+ 'name': fields.char('Account Name', required=True, translate=True),
}
class account_analytic_journal(osv.osv):
_inherit = 'account.analytic.journal'
_columns = {
- 'name': fields.char('Journal Name', size=64, required=True, translate=True),
+ 'name': fields.char('Journal Name', required=True, translate=True),
}
_name = 'lunch.product'
_description = 'lunch product'
_columns = {
- 'name': fields.char('Product', required=True, size=64),
+ 'name': fields.char('Product', required=True),
'category_id': fields.many2one('lunch.product.category', 'Category', required=True),
'description': fields.text('Description', size=256),
'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Account', move it from product to decimal_precision
'year': fields.char('Year', size=4, readonly=True),
'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),
+ ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'user_id': fields.many2one('res.users', 'User Name'),
'price_total':fields.float('Total Price', readonly=True),
- 'note' : fields.text('Note',size=256,readonly=True),
+ 'note' : fields.text('Note', readonly=True),
}
_order = 'date desc'
def init(self, cr):
help="Optional ID of a thread (record) to which all incoming "
"messages will be attached, even if they did not reply to it. "
"If set, this will disable the creation of new records completely."),
- 'alias_domain': fields.function(_get_alias_domain, string="Alias domain", type='char', size=None),
+ 'alias_domain': fields.function(_get_alias_domain, string="Alias domain", type='char'),
'alias_parent_model_id': fields.many2one('ir.model', 'Parent Model',
help="Parent model holding the alias. The model holding the alias reference\n"
"is not necessarily the model given by alias_model_id\n"
_log_access = False
_description = 'Document Followers'
_columns = {
- 'res_model': fields.char('Related Document Model', size=128,
+ 'res_model': fields.char('Related Document Model',
required=True, select=1,
help='Model of the followed resource'),
'res_id': fields.integer('Related Document ID', select=1,
return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
'description': fields.text('Description'),
'menu_id': fields.many2one('ir.ui.menu', string='Related Menu', required=True, ondelete="cascade"),
'public': fields.selection([('public', 'Public'), ('private', 'Private'), ('groups', 'Selected Group Only')], 'Privacy', required=True,
('email', 'Email'),
('comment', 'Comment'),
('notification', 'System notification'),
- ], 'Type',
+ ], 'Type', size=12,
help="Message type: email for email message, notification for system "\
"message, comment for other messages such as user replies"),
'email_from': fields.char('From',
return result
_columns = {
- 'res_model': fields.char('Related Document Model', size=128,
+ 'res_model': fields.char('Related Document Model',
required=True, select=1,
help='Model of the followed resource'),
'res_id': fields.integer('Related Document ID', select=1,
return res
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'object_id': fields.many2one('ir.model', 'Resource', required=True,
help="Choose the resource on which you want \
this campaign to be run"),
('running', 'Running'),
('cancelled', 'Cancelled'),
('done', 'Done')],
- 'Status',),
+ 'Status'),
'activity_ids': fields.one2many('marketing.campaign.activity',
'campaign_id', 'Activities'),
'fixed_cost': fields.float('Fixed Cost', help="Fixed cost for running this campaign. You may also specify variable cost and revenue on each campaign activity. Cost and Revenue statistics are included in Campaign Reporting.", digits_compute=dp.get_precision('Product Price')),
return dict.fromkeys(ids, next_sync)
_columns = {
- 'name': fields.char('Name', size=64,required=True),
+ 'name': fields.char('Name', required=True),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign', required=True, select=1, ondelete="cascade"),
'object_id': fields.related('campaign_id','object_id', type='many2one', relation='ir.model', string='Resource'),
'ir_filter_id': fields.many2one('ir.filters', 'Filter', ondelete="restrict",
('cancelled', 'Cancelled'),
('running', 'Running'),
('done', 'Done')],
- 'Status',),
+ 'Status'),
'date_run': fields.datetime('Launch Date', help="Initial start date of this segment."),
'date_done': fields.datetime('End Date', help="Date this segment was last closed or cancelled."),
'date_next_sync': fields.function(_get_next_sync, string='Next Synchronization', type='datetime', help="Next time the synchronization job is scheduled to run automatically"),
]
_columns = {
- 'name': fields.char('Name', size=128, required=True),
+ 'name': fields.char('Name', required=True),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign',
required = True, ondelete='cascade', select=1),
'object_id': fields.related('campaign_id','object_id',
'Previous Activities'),
'variable_cost': fields.float('Variable Cost', help="Set a variable cost if you consider that every campaign item that has reached this point has entailed a certain cost. You can get cost statistics in the Reporting section", digits_compute=dp.get_precision('Product Price')),
'revenue': fields.float('Revenue', help="Set an expected revenue if you consider that every campaign item that has reached this point has generated a certain revenue. You can get revenue statistics in the Reporting section", digits_compute=dp.get_precision('Account')),
- 'signal': fields.char('Signal', size=128,
+ 'signal': fields.char('Signal',
help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),
'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems",
help="By activating this option, workitems that aren't executed because the condition is not met are marked as cancelled instead of being deleted.")
_name = 'mrp.property.group'
_description = 'Property Group'
_columns = {
- 'name': fields.char('Property Group', size=64, required=True),
+ 'name': fields.char('Property Group', required=True),
'description': fields.text('Description'),
}
_name = 'mrp.property'
_description = 'Property'
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'composition': fields.selection([('min','min'),('max','max'),('plus','plus')], 'Properties composition', required=True, help="Not used in computations, for information purpose only."),
'group_id': fields.many2one('mrp.property.group', 'Property Group', required=True),
'description': fields.text('Description'),
_name = 'mrp.routing'
_description = 'Routing'
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the routing without removing it."),
'code': fields.char('Code', size=8),
_order = 'sequence'
_columns = {
'workcenter_id': fields.many2one('mrp.workcenter', 'Work Center', required=True),
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of routing Work Centers."),
'cycle_nbr': fields.float('Number of Cycles', required=True,
help="Number of iterations this work center has to do in the specified operation of the routing."),
return result
_columns = {
- 'name': fields.char('Name', size=64),
+ 'name': fields.char('Name'),
'code': fields.char('Reference', size=16),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the bills of material without removing it."),
'type': fields.selection([('normal', 'Normal'), ('phantom', 'Set')], 'BoM Type', required=True,
help= "Set: When processing a sales order for this product, the delivery order will contain the raw materials, instead of the finished product."),
- 'position': fields.char('Internal Reference', size=64, help="Reference to a position in an external plan."),
+ 'position': fields.char('Internal Reference', help="Reference to a position in an external plan."),
'product_tmpl_id': fields.many2one('product.template', 'Product', required=True),
'product_id': fields.many2one('product.product', 'Product Variant',
domain="[('product_tmpl_id','=',product_tmpl_id)]",
help="If a product variant is defined the BOM is available only for this product."),
- 'bom_line_ids': fields.one2many('mrp.bom.line', 'bom_id', 'BoM Lines'),
-
+ 'bom_line_ids': fields.one2many('mrp.bom.line', 'bom_id', 'BoM Lines'),
'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for the inventory control"),
'date_start': fields.date('Valid From', help="Validity of this BoM. Keep empty if it's always valid."),
return res
_columns = {
- 'name': fields.char('Reference', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
- 'origin': fields.char('Source Document', size=64, readonly=True, states={'draft': [('readonly', False)]},
+ 'name': fields.char('Reference', required=True, readonly=True, states={'draft': [('readonly', False)]}),
+ 'origin': fields.char('Source Document', readonly=True, states={'draft': [('readonly', False)]},
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',
select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])),
_inherit = ['mail.thread']
_columns = {
- 'name': fields.char('Work Order', size=64, required=True),
+ 'name': fields.char('Work Order', required=True),
'workcenter_id': fields.many2one('mrp.workcenter', 'Work Center', required=True),
'cycle': fields.float('Number of Cycles', digits=(16, 2)),
'hour': fields.float('Number of Hours', digits=(16, 2)),
_name = 'mrp.production.product.line'
_description = 'Production Scheduled Product'
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
_auto = False
_log_access = False
_columns = {
- 'name': fields.char('Week', size=64, required=True),
+ 'name': fields.char('Week', required=True),
'workcenter_id': fields.many2one('mrp.workcenter', 'Work Center', required=True),
'cycle': fields.float('Number of Cycles'),
'hour': fields.float('Number of Hours'),
_log_access = False
_rec_name = 'date'
_columns = {
- 'date': fields.char('Week', size=64, required=True),
+ 'date': fields.char('Week', required=True),
'value': fields.float('Stock value', required=True, digits=(16,2)),
'company_id': fields.many2one('res.company', 'Company', required=True),
}
class mrp_operations_operation_code(osv.osv):
_name="mrp_operations.operation.code"
_columns={
- 'name': fields.char('Operation Name',size=64, required=True),
+ 'name': fields.char('Operation Name', required=True),
'code': fields.char('Code', size=16, required=True),
'start_stop': fields.selection([('start','Start'),('pause','Pause'),('resume','Resume'),('cancel','Cancelled'),('done','Done')], 'Status', required=True),
}
'date': fields.date('Date', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),
- 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'Status', readonly=True),
+ 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')], 'Status', readonly=True),
'total_hours': fields.float('Total Hours', readonly=True),
'total_cycles': fields.float('Total Cycles', readonly=True),
'delay': fields.float('Delay', readonly=True),
return self.pool['mrp.repair'].search(cr, uid, [('fees_lines', 'in', ids)], context=context)
_columns = {
- 'name': fields.char('Repair Reference', size=24, required=True, states={'confirmed': [('readonly', True)]}),
+ 'name': fields.char('Repair Reference', required=True, states={'confirmed': [('readonly', True)]}),
'product_id': fields.many2one('product.product', string='Product to Repair', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'),
required=True, readonly=True, states={'draft': [('readonly', False)]}),
return res
_columns = {
- 'name': fields.char('Description', size=64, required=True),
+ 'name': fields.char('Description', required=True),
'repair_id': fields.many2one('mrp.repair', 'Repair Order Reference', ondelete='cascade', select=True),
'type': fields.selection([('add', 'Add'), ('remove', 'Remove')], 'Type', required=True),
'to_invoice': fields.boolean('To Invoice'),
_columns = {
'repair_id': fields.many2one('mrp.repair', 'Repair Order Reference', required=True, ondelete='cascade', select=True),
- 'name': fields.char('Description', size=64, select=True, required=True),
+ 'name': fields.char('Description', select=True, required=True),
'product_id': fields.many2one('product.product', 'Product'),
'product_uom_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
'price_unit': fields.float('Unit Price', required=True),
_name = 'outlook.installer'
_inherit = 'res.config.installer'
_columns = {
- 'plugin32': fields.char('Outlook Plug-in 32bits', size=256, readonly=True, help="Outlook plug-in file. Save this file and install it in Outlook."),
- 'plugin64': fields.char('Outlook Plug-in 64bits', size=256, readonly=True, help="Outlook plug-in file. Save this file and install it in Outlook."),
+ 'plugin32': fields.char('Outlook Plug-in 32bits', readonly=True, help="Outlook plug-in file. Save this file and install it in Outlook."),
+ 'plugin64': fields.char('Outlook Plug-in 64bits', readonly=True, help="Outlook plug-in file. Save this file and install it in Outlook."),
}
def default_get(self, cr, uid, fields, context=None):
_columns = {
'thunderbird': fields.boolean('Thunderbird Plug-in', help="Allows you to select an object that you would like to add to your email and its attachments."),
- 'plugin_name': fields.char('File name', size=64),
- 'plugin_file': fields.char('Thunderbird Plug-in', size=256, readonly=True, help="Thunderbird plug-in file. Save this file and install it in Thunderbird."),
+ 'plugin_name': fields.char('File name'),
+ 'plugin_file': fields.char('Thunderbird Plug-in', readonly=True, help="Thunderbird plug-in file. Save this file and install it in Thunderbird."),
}
_defaults = {
return result
_columns = {
- 'name' : fields.char('Point of Sale Name', size=32, select=1,
+ 'name' : fields.char('Point of Sale Name', select=1,
required=True, help="An internal identification of the point of sale"),
'journal_ids' : fields.many2many('account.journal', 'pos_config_journal_rel',
'pos_config_id', 'journal_id', 'Available Payment Methods',
domain="[('state', '=', 'active')]",
),
- 'name' : fields.char('Session ID', size=32, required=True, readonly=True),
+ 'name' : fields.char('Session ID', required=True, readonly=True),
'user_id' : fields.many2one('res.users', 'Responsible',
required=True,
select=1,
return super(pos_order, self).copy(cr, uid, id, d, context=context)
_columns = {
- 'name': fields.char('Order Ref', size=64, required=True, readonly=True),
+ 'name': fields.char('Order Ref', required=True, readonly=True),
'company_id':fields.many2one('res.company', 'Company', required=True, readonly=True),
'date_order': fields.datetime('Order Date', readonly=True, select=True),
'user_id': fields.many2one('res.users', 'Salesman', help="Person who uses the the cash register. It can be a reliever, a student or an interim employee."),
'location_id': fields.related('session_id', 'config_id', 'stock_location_id', string="Location", type='many2one', store=True, relation='stock.location'),
'note': fields.text('Internal Notes'),
'nb_print': fields.integer('Number of Print', readonly=True),
- 'pos_reference': fields.char('Receipt Ref', size=64, readonly=True),
+ 'pos_reference': fields.char('Receipt Ref', readonly=True),
'sale_journal': fields.related('session_id', 'config_id', 'journal_id', relation='account.journal', type='many2one', string='Sale Journal', store=True, readonly=True),
}
_columns = {
'company_id': fields.many2one('res.company', 'Company', required=True),
- 'name': fields.char('Line No', size=32, required=True),
- 'notice': fields.char('Discount Notice', size=128),
+ 'name': fields.char('Line No', required=True),
+ 'notice': fields.char('Discount Notice'),
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),
'price_unit': fields.float(string='Unit Price', digits_compute=dp.get_precision('Account')),
'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoS')),
class ean_wizard(osv.osv_memory):
_name = 'pos.ean_wizard'
_columns = {
- 'ean13_pattern': fields.char('Reference', size=32, required=True, translate=True),
+ 'ean13_pattern': fields.char('Reference', size=13, required=True, translate=True),
}
def sanitize_ean13(self, cr, uid, ids, context):
for r in self.browse(cr,uid,ids):
_columns = {
'journal_id' : fields.many2one('account.journal', 'Payment Mode', required=True),
'amount': fields.float('Amount', digits=(16,2), required= True),
- 'payment_name': fields.char('Payment Reference', size=32),
+ 'payment_name': fields.char('Payment Reference'),
'payment_date': fields.date('Payment Date', required=True),
}
_defaults = {
type='selection',
selection=pos_session.POS_SESSION_STATE,
string='Session Status', readonly=True),
- 'pos_state_str' : fields.char('Status', 32, readonly=True),
+ 'pos_state_str' : fields.char('Status', readonly=True),
'show_config' : fields.boolean('Show Config', readonly=True),
'pos_session_name' : fields.related('pos_session_id', 'name',
type='char', size=64, readonly=True),
_columns = {
'wizard_id': fields.many2one('portal.wizard', string='Wizard', required=True, ondelete='cascade'),
'partner_id': fields.many2one('res.partner', string='Contact', required=True, readonly=True),
- 'email': fields.char(size=240, string='Email'),
+ 'email': fields.char(string='Email', size=240),
'in_portal': fields.boolean('In Portal'),
}
_columns = {
'name': fields.text('Description', required=True),
- 'origin': fields.char('Source Document', size=64,
+ 'origin': fields.char('Source Document',
help="Reference of the document that created this Procurement.\n"
"This is automatically completed by OpenERP."),
'company_id': fields.many2one('res.company', 'Company', required=True),
_name = "product.price.type"
_description = "Price Type"
_columns = {
- "name" : fields.char("Price Name", size=32, required=True, translate=True, help="Name of this kind of price."),
+ "name" : fields.char("Price Name", required=True, translate=True, help="Name of this kind of price."),
"active" : fields.boolean("Active"),
"field" : fields.selection(_price_field_get, "Product Field", size=32, required=True, help="Associated field in the product form."),
"currency_id" : fields.many2one('res.currency', "Currency", required=True, help="The currency the field is expressed in."),
_name = "product.pricelist.type"
_description = "Pricelist Type"
_columns = {
- 'name': fields.char('Name',size=64, required=True, translate=True),
- 'key': fields.char('Key', size=64, required=True, help="Used in the code to select specific prices based on the context. Keep unchanged."),
+ 'name': fields.char('Name', required=True, translate=True),
+ 'key': fields.char('Key', required=True, help="Used in the code to select specific prices based on the context. Keep unchanged."),
}
_description = "Pricelist"
_order = 'name'
_columns = {
- 'name': fields.char('Pricelist Name',size=64, required=True, translate=True),
+ 'name': fields.char('Pricelist Name', required=True, translate=True),
'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the pricelist without removing it."),
'type': fields.selection(_pricelist_type_get, 'Pricelist Type', required=True),
'version_id': fields.one2many('product.pricelist.version', 'pricelist_id', 'Pricelist Versions'),
_columns = {
'pricelist_id': fields.many2one('product.pricelist', 'Price List',
required=True, select=True, ondelete='cascade'),
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
'active': fields.boolean('Active',
help="When a version is duplicated it is set to non active, so that the " \
"dates do not overlaps with original version. You should change the dates " \
return True
_columns = {
- 'name': fields.char('Rule Name', size=64, help="Explicit rule name for this pricelist line."),
+ 'name': fields.char('Rule Name', help="Explicit rule name for this pricelist line."),
'price_version_id': fields.many2one('product.pricelist.version', 'Price List Version', required=True, select=True, ondelete='cascade'),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', ondelete='cascade', help="Specify a template if this rule only applies to one product template. Keep empty otherwise."),
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade', help="Specify a product if this rule only applies to one product. Keep empty otherwise."),
_description = 'Task Stage'
_order = 'sequence'
_columns = {
- 'name': fields.char('Stage Name', required=True, size=64, translate=True),
+ 'name': fields.char('Stage Name', required=True, translate=True),
'description': fields.text('Description'),
'sequence': fields.integer('Sequence'),
'case_default': fields.boolean('Default for New Projects',
_name = "project.task.work"
_description = "Project Task Work"
_columns = {
- 'name': fields.char('Work summary', size=128),
+ 'name': fields.char('Work summary'),
'date': fields.datetime('Date', select="1"),
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select="1"),
'hours': fields.float('Time Spent'),
_name = "project.category"
_description = "Category of project's task, issue, ..."
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_description = "Tasks by user and project"
_auto = False
_columns = {
- 'name': fields.char('Task Summary', size=128, readonly=True),
+ 'name': fields.char('Task Summary', readonly=True),
'user_id': fields.many2one('res.users', 'Assigned To', readonly=True),
'date_start': fields.date('Assignation Date', readonly=True),
'no_of_days': fields.integer('# of Days', size=128, readonly=True),
'delay_endings_days': fields.float('Overpassed Deadline', digits=(16,2), readonly=True),
'nbr': fields.integer('# of tasks', readonly=True),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')],
- string='Priority', readonly=True),
+ string='Priority', size=1, readonly=True),
'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'partner_id': fields.many2one('res.partner', 'Contact', readonly=True),
_description = 'Task Delegate'
_columns = {
- 'name': fields.char('Delegated Title', size=64, required=True, help="New title of the task delegated to the user"),
- 'prefix': fields.char('Your Task Title', size=64, help="Title for your validation task"),
+ 'name': fields.char('Delegated Title', required=True, help="New title of the task delegated to the user"),
+ 'prefix': fields.char('Your Task Title', help="Title for your validation task"),
'project_id': fields.many2one('project.project', 'Project', help="User you want to delegate this task to"),
'user_id': fields.many2one('res.users', 'Assign To', required=True, help="User you want to delegate this task to"),
'new_task_description': fields.text('New Task Description', help="Reinclude the description of the task in the task of the user"),
_name = "project.issue.version"
_order = "name desc"
_columns = {
- 'name': fields.char('Version Number', size=32, required=True),
+ 'name': fields.char('Version Number', required=True),
'active': fields.boolean('Active', required=False),
}
_defaults = {
return issues
_columns = {
'id': fields.integer('ID', readonly=True),
- 'name': fields.char('Issue', size=128, required=True),
+ 'name': fields.char('Issue', required=True),
'active': fields.boolean('Active', required=False),
'create_date': fields.datetime('Creation Date', readonly=True,select=True),
'write_date': fields.datetime('Update Date', readonly=True),
return result
_columns = {
- 'name': fields.char('Date',size=64),
- 'year': fields.char('Year',size=64,required=False, readonly=True),
+ 'name': fields.char('Date'),
+ 'year': fields.char('Year', size=4, required=False, readonly=True),
'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),
+ ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month', readonly=True),
'user_id': fields.many2one('res.users', 'User',readonly=True),
'timesheet_hrs': fields.function(get_hrs_timesheet, string="Timesheet Hours"),
'task_hrs' : fields.float('Task Hours'),
},
}
_columns = {
- 'name': fields.char('Order Reference', size=64, required=True, select=True, help="Unique number of the purchase order, computed automatically when the purchase order is created."),
- 'origin': fields.char('Source Document', size=64,
+ 'name': fields.char('Order Reference', required=True, select=True, help="Unique number of the purchase order, computed automatically when the purchase order is created."),
+ 'origin': fields.char('Source Document',
help="Reference of the document that generated this purchase order request; a sales order or an internal procurement request."
),
- 'partner_ref': fields.char('Supplier Reference', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, size=64,
+ 'partner_ref': fields.char('Supplier Reference', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},
help="Reference of the sales order or bid sent by your supplier. It's mainly used to do the matching when you receive the products as this reference is usually written on the delivery order sent by your supplier."),
'date_order':fields.date('Order Date', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, select=True, help="Date on which this document has been created."),
'date_approve':fields.date('Date Approved', readonly=1, select=True, help="Date on which purchase order has been approved"),
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
<field name="arch" type="xml">
<field name="account_analytic_id" position="replace">
- <field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','<>',False)]"/>
+ <field name="analytics_id" context="{'journal_id':parent.journal_id, 'model': 'purchase_order'}" domain="[('plan_id','<>',False)]"/>
</field>
</field>
</record>
return result
_columns = {
- 'name': fields.char('Call for Bids Reference', size=32, required=True),
- 'origin': fields.char('Source Document', size=32),
+ 'name': fields.char('Call for Bids Reference', required=True),
+ 'origin': fields.char('Source Document'),
'ordering_date': fields.date('Scheduled Ordering Date'),
'date_end': fields.datetime('Bid Submission Deadline'),
'schedule_date': fields.date('Scheduled Date', select=True, help="The expected and scheduled date where all the products are received"),
_name = "report.intrastat.code"
_description = "Intrastat code"
_columns = {
- 'name': fields.char('Intrastat Code', size=16),
- 'description': fields.char('Description', size=64),
+ 'name': fields.char('Intrastat Code'),
+ 'description': fields.char('Description'),
}
_description = "Intrastat report"
_auto = False
_columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
+ 'name': fields.char('Year', required=False, readonly=True),
'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),
+ ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month', readonly=True),
'supply_units':fields.float('Supply Units', readonly=True),
- 'ref':fields.char('Source document',size=64, readonly=True),
+ 'ref':fields.char('Source document', readonly=True),
'code': fields.char('Country code', size=2, readonly=True),
'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True),
'weight': fields.float('Weight', readonly=True),
'html' : fields.text('webkit header', help="Set Webkit Report Header"),
'footer_html' : fields.text('webkit footer', help="Set Webkit Report Footer."),
'css' : fields.text('Header CSS'),
- 'name' : fields.char('Name', size=128, required=True),
+ 'name' : fields.char('Name', required=True),
'margin_top' : fields.float('Top Margin (mm)'),
'margin_bottom' : fields.float('Bottom Margin (mm)'),
'margin_left' : fields.float('Left Margin (mm)'),
'margin_right' : fields.float('Right Margin (mm)'),
'orientation' : fields.selection(
[('Landscape','Landscape'),('Portrait', 'Portrait')],
- 'Orientation'
+ 'Orientation',
),
'format': fields.selection(
[
_columns = {
'company_id' : fields.many2one('res.company', 'Company'),
'img' : fields.binary('Image'),
- 'name' : fields.char('Name', size=128, required =True, help="Name of Image"),
- 'type' : fields.char('Type', size=32, required =True, help="Image type(png,gif,jpeg)")
+ 'name' : fields.char('Name', required =True, help="Name of Image"),
+ 'type' : fields.char('Type', required =True, help="Image type(png,gif,jpeg)")
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_description = "Resource Calendar"
_columns = {
- 'name': fields.char("Name", size=64, required=True),
+ 'name': fields.char("Name", required=True),
'company_id': fields.many2one('res.company', 'Company', required=False),
'attendance_ids': fields.one2many('resource.calendar.attendance', 'calendar_id', 'Working Time'),
'manager': fields.many2one('res.users', 'Workgroup Manager'),
_description = "Work Detail"
_columns = {
- 'name' : fields.char("Name", size=64, required=True),
+ 'name' : fields.char("Name", 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', required=True, help="Start and End time of working.", select=True),
_name = "resource.resource"
_description = "Resource Detail"
_columns = {
- 'name' : fields.char("Name", size=64, required=True),
+ 'name' : fields.char("Name", required=True),
'code': fields.char('Code', size=16),
'active' : fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the resource record without removing it."),
'company_id' : fields.many2one('res.company', 'Company'),
_name = "resource.calendar.leaves"
_description = "Leave Detail"
_columns = {
- 'name' : fields.char("Name", size=64),
+ 'name' : fields.char("Name"),
'company_id' : fields.related('calendar_id','company_id',type='many2one',relation='res.company',string="Company", store=True, readonly=True),
'calendar_id' : fields.many2one("resource.calendar", "Working Time"),
'date_from' : fields.datetime('Start Date', required=True),
return None
_columns = {
- 'name': fields.char('Order Reference', size=64, required=True,
+ 'name': fields.char('Order Reference', required=True,
readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, select=True),
- 'origin': fields.char('Source Document', size=64, help="Reference of the document that generated this sales order request."),
- 'client_order_ref': fields.char('Reference/Description', size=64),
+ 'origin': fields.char('Source Document', help="Reference of the document that generated this sales order request."),
+ 'client_order_ref': fields.char('Reference/Description'),
'state': fields.selection([
('draft', 'Draft Quotation'),
('sent', 'Quotation Sent'),
_name = 'sale_journal.invoice.type'
_description = 'Invoice Types'
_columns = {
- 'name': fields.char('Invoice Type', size=64, required=True),
+ 'name': fields.char('Invoice Type', required=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the invoice type without removing it."),
'note': fields.text('Note'),
'invoicing_method': fields.selection([('simple', 'Non grouped'), ('grouped', 'Grouped')], 'Invoicing method', required=True),
_columns = {
'action_id': fields.many2one('ir.actions.act_window', 'Action to share', required=True,
help="The action that opens the screen containing the data you wish to share."),
- 'view_type': fields.char('Current View Type', size=32, required=True),
- 'domain': fields.char('Domain', size=256, help="Optional domain for further data filtering"),
+ 'view_type': fields.char('Current View Type', required=True),
+ 'domain': fields.char('Domain', help="Optional domain for further data filtering"),
'user_type': fields.selection(lambda s, *a, **k: s._user_type_selection(*a, **k),'Sharing method', required=True,
help="Select the type of user(s) you would like to share data with."),
'new_users': fields.text("Emails"),
'access_mode': fields.selection([('readonly','Can view'),('readwrite','Can edit')],'Access Mode', required=True,
help="Access rights to be granted on the shared documents."),
'result_line_ids': fields.one2many('share.wizard.result.line', 'share_wizard_id', 'Summary', readonly=True),
- 'share_root_url': fields.function(_share_root_url, string='Share Access URL', type='char', size=512, readonly=True,
+ 'share_root_url': fields.function(_share_root_url, string='Share Access URL', type='char', readonly=True,
help='Main access page for users that are granted shared access'),
- 'name': fields.char('Share Title', size=64, required=True, help="Title for the share (displayed to users as menu and shortcut name)"),
- 'record_name': fields.char('Record name', size=128, help="Name of the shared record, if sharing a precise record"),
+ 'name': fields.char('Share Title', required=True, help="Title for the share (displayed to users as menu and shortcut name)"),
+ 'record_name': fields.char('Record name', help="Name of the shared record, if sharing a precise record"),
'message': fields.text("Personal Message", help="An optional personal message, to be included in the email notification."),
'embed_code': fields.function(_embed_code, type='text', string='Code',
help="Embed this code in your documents to provide a link to the "\
"shared document."),
'embed_option_title': fields.boolean('Display title'),
'embed_option_search': fields.boolean('Display search view'),
- 'embed_url': fields.function(_embed_url, string='Share URL', type='char', size=512, readonly=True),
+ 'embed_url': fields.function(_embed_url, string='Share URL', size=512, type='char', readonly=True),
}
_defaults = {
'view_type': 'page',
_name = "stock.incoterms"
_description = "Incoterms"
_columns = {
- 'name': fields.char('Name', size=64, required=True, help="Incoterms are series of sales terms. They are used to divide transaction costs and responsibilities between buyer and seller and reflect state-of-the-art transportation practices."),
+ 'name': fields.char('Name', required=True, help="Incoterms are series of sales terms. They are used to divide transaction costs and responsibilities between buyer and seller and reflect state-of-the-art transportation practices."),
'code': fields.char('Code', size=3, required=True, help="Incoterm Standard Code"),
'active': fields.boolean('Active', help="By unchecking the active field, you may hide an INCOTERM you will not use."),
}
return res
_columns = {
- 'name': fields.char('Location Name', size=64, required=True, translate=True),
+ 'name': fields.char('Location Name', required=True, translate=True),
'active': fields.boolean('Active', help="By unchecking the active field, you may hide a location without deleting it."),
- 'usage': fields.selection([('supplier', 'Supplier Location'), ('view', 'View'), ('internal', 'Internal Location'), ('customer', 'Customer Location'), ('inventory', 'Inventory'), ('procurement', 'Procurement'), ('production', 'Production'), ('transit', 'Transit Location')], 'Location Type', required=True,
- help="""* Supplier Location: Virtual location representing the source location for products coming from your suppliers
+ 'usage': fields.selection([
+ ('supplier', 'Supplier Location'),
+ ('view', 'View'),
+ ('internal', 'Internal Location'),
+ ('customer', 'Customer Location'),
+ ('inventory', 'Inventory'),
+ ('procurement', 'Procurement'),
+ ('production', 'Production'),
+ ('transit', 'Transit Location')],
+ 'Location Type', required=True,
+ help="""* Supplier Location: Virtual location representing the source location for products coming from your suppliers
\n* View: Virtual location used to create a hierarchical structures for your warehouse, aggregating its child locations ; can't directly contain products
\n* Internal Location: Physical locations inside your own warehouses,
\n* Customer Location: Virtual location representing the destination location for products sent to your customers
\n* Production: Virtual counterpart location for production operations: this location consumes the raw material and produces finished products
\n* Transit Location: Counterpart location that should be used in inter-companies or inter-warehouses operations
""", select=True),
-
'complete_name': fields.function(_complete_name, type='char', string="Location Name",
store={'stock.location': (_get_sublocations, ['name', 'location_id', 'active'], 10)}),
'location_id': fields.many2one('stock.location', 'Parent Location', select=True, ondelete='cascade'),
self.pool.get('stock.pack.operation').write(cr, uid, packop_ids, {'owner_id': picking.owner_id.id}, context=context)
_columns = {
- 'name': fields.char('Reference', size=64, select=True, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
- 'origin': fields.char('Source Document', size=64, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, help="Reference of the document", select=True),
+ 'name': fields.char('Reference', select=True, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
+ 'origin': fields.char('Source Document', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, help="Reference of the document", select=True),
'backorder_id': fields.many2one('stock.picking', 'Back Order of', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'note': fields.text('Notes', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
'move_type': fields.selection([('direct', 'Partial'), ('one', 'All at once')], 'Delivery Method', required=True, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, help="It specifies goods to be deliver partially or all at once"),
_inherit = ['mail.thread']
_description = 'Lot/Serial'
_columns = {
- 'name': fields.char('Serial Number', size=64, required=True, help="Unique Serial Number"),
- 'ref': fields.char('Internal Reference', size=256, help="Internal reference number in case it differs from the manufacturer's serial number"),
+ 'name': fields.char('Serial Number', required=True, help="Unique Serial Number"),
+ 'ref': fields.char('Internal Reference', help="Internal reference number in case it differs from the manufacturer's serial number"),
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type', '<>', 'service')]),
'quant_ids': fields.one2many('stock.quant', 'lot_id', 'Quants', readonly=True),
'create_date': fields.datetime('Creation Date'),
]
_columns = {
- 'name': fields.char('Inventory Reference', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Inventory Name."),
+ 'name': fields.char('Inventory Reference', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Inventory Name."),
'date': fields.datetime('Inventory Date', required=True, readonly=True, help="The date that will be used for the stock level check of the products and the validation of the stock move related to this inventory."),
'line_ids': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', readonly=False, states={'done': [('readonly', True)]}, help="Inventory Lines."),
'move_ids': fields.one2many('stock.move', 'inventory_id', 'Created Moves', help="Inventory Moves.", states={'done': [('readonly', True)]}),
_description = "Warehouse"
_columns = {
- 'name': fields.char('Warehouse Name', size=128, required=True, select=True),
+ 'name': fields.char('Warehouse Name', required=True, select=True),
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, select=True),
'partner_id': fields.many2one('res.partner', 'Address'),
'view_location_id': fields.many2one('stock.location', 'View Location', required=True, domain=[('usage', '=', 'view')]),
return res
_columns = {
- 'name': fields.char('Operation Name', size=64, required=True),
+ 'name': fields.char('Operation Name', required=True),
'company_id': fields.many2one('res.company', 'Company'),
'route_id': fields.many2one('stock.location.route', 'Route'),
'location_from_id': fields.many2one('stock.location', 'Source Location', ondelete='cascade', select=1, required=True),
return res
_columns = {
- 'name': fields.char('Package Reference', size=64, select=True),
+ 'name': fields.char('Package Reference', select=True),
'complete_name': fields.function(_complete_name, type='char', string="Package Name",),
'parent_left': fields.integer('Left Parent', select=1),
'parent_right': fields.integer('Right Parent', select=1),
return result
_columns = {
- 'name': fields.char('Name', size=32, required=True),
+ 'name': fields.char('Name', required=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the orderpoint without removing it."),
'logic': fields.selection([('max', 'Order to Max'), ('price', 'Best price (not yet active!)')], 'Reordering Mode', required=True),
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True, ondelete="cascade"),
return {'value': result}
_columns = {
- 'name': fields.char('Name', size=256, track_visibility='always', readonly=True),
+ 'name': fields.char('Name', track_visibility='always', readonly=True),
'date': fields.date('Date', required=True, states={'done': [('readonly', True)]}, track_visibility='onchange'),
'picking_ids': fields.many2many('stock.picking', string='Pickings', states={'done': [('readonly', True)]}),
'cost_lines': fields.one2many('stock.landed.cost.lines', 'cost_id', 'Cost Lines', states={'done': [('readonly', True)]}),
return {'value': result}
_columns = {
- 'name': fields.char('Description', size=256),
+ 'name': fields.char('Description'),
'cost_id': fields.many2one('stock.landed.cost', 'Landed Cost', required=True, ondelete='cascade'),
'product_id': fields.many2one('product.product', 'Product', required=True),
'price_unit': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Product Price')),
_name = "subscription.document"
_description = "Subscription Document"
_columns = {
- 'name': fields.char('Name', size=60, required=True),
+ 'name': fields.char('Name', required=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the subscription document without removing it."),
'model': fields.many2one('ir.model', 'Object', required=True),
'field_ids': fields.one2many('subscription.document.fields', 'document_id', 'Fields')
_name = "subscription.subscription"
_description = "Subscription"
_columns = {
- 'name': fields.char('Name', size=60, required=True),
+ 'name': fields.char('Name', required=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the subscription without removing it."),
'partner_id': fields.many2one('res.partner', 'Partner'),
'notes': fields.text('Internal Notes'),
('datetime', 'Date and Time'),
('simple_choice', 'Multiple choice: only one answer'),
('multiple_choice', 'Multiple choice: multiple answers allowed'),
- ('matrix', 'Matrix')], 'Type of Question', required=1),
+ ('matrix', 'Matrix')], 'Type of Question', size=15, required=1),
'matrix_subtype': fields.selection([('simple', 'One choice per row'),
('multiple', 'Multiple choices per row')], 'Matrix Type'),
'labels_ids': fields.one2many('survey.label',
_inherit = 'sale.config.settings'
_columns = {
'api_key': fields.char(string="API Key", size=50),
- 'server_domain': fields.char(size=100),
+ 'server_domain': fields.char(),
}
def get_default_linkedin(self, cr, uid, fields, context=None):
return res
_columns = {
- 'linkedin_id': fields.char(string="LinkedIn ID", size=50),
- 'linkedin_url': fields.char(string="LinkedIn url", size=100, store=True),
+ 'linkedin_id': fields.char(string="LinkedIn ID"),
+ 'linkedin_url': fields.char(string="LinkedIn url", store=True),
'linkedin_public_url': fields.function(_get_url, type='text', string="LinkedIn url",
help="This url is set automatically when you join the partner with a LinkedIn account."),
}
_name = "website.menu"
_description = "Website Menu"
_columns = {
- 'name': fields.char('Menu', size=64, required=True, translate=True),
+ 'name': fields.char('Menu', required=True, translate=True),
'url': fields.char('Url', translate=True),
'new_window': fields.boolean('New Window'),
'sequence': fields.integer('Sequence'),
_columns = {
'post_id': fields.many2one('blog.post', 'Blog Post'),
- 'summary': fields.char('Summary', size=256, select=True),
+ 'summary': fields.char('Summary', select=True),
'content': fields.text("Content"),
'create_date': fields.datetime("Date"),
'create_uid': fields.many2one('res.users', "Modified By"),
return res
_columns = {
- 'name': fields.char('Title', size=128),
+ 'name': fields.char('Title'),
'forum_id': fields.many2one('forum.forum', 'Forum', required=True),
'content': fields.html('Content'),
'tag_ids': fields.many2many('forum.tag', 'forum_tag_rel', 'forum_id', 'forum_tag_id', 'Tags'),
_name = "sale.quote.template"
_description = "Sale Quotation Template"
_columns = {
- 'name': fields.char('Quotation Template', size=256, required=True),
+ 'name': fields.char('Quotation Template', required=True),
'website_description': fields.html('Description', translate=True),
'quote_line': fields.one2many('sale.quote.line', 'quote_id', 'Quote Template Lines'),
'note': fields.text('Terms and conditions'),
return res
_columns = {
- 'access_token': fields.char('Security Token', size=256, required=True),
+ 'access_token': fields.char('Security Token', required=True),
'template_id': fields.many2one('sale.quote.template', 'Quote Template'),
'website_description': fields.html('Description'),
'options' : fields.one2many('sale.order.option', 'order_id', 'Optional Products Lines'),
_table = 'ir_actions'
_order = 'name'
_columns = {
- 'name': fields.char('Name', size=64, required=True),
- 'type': fields.char('Action Type', required=True, size=32),
- 'usage': fields.char('Action Usage', size=32),
+ 'name': fields.char('Name', required=True),
+ 'type': fields.char('Action Type', required=True),
+ 'usage': fields.char('Action Usage'),
'help': fields.text('Action description',
help='Optional help text for the users with a description of the target view, such as its usage and purpose.',
translate=True),
_sequence = 'ir_actions_id_seq'
_order = 'name'
_columns = {
- 'type': fields.char('Action Type', size=32, required=True),
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'type': fields.char('Action Type', required=True),
+ 'name': fields.char('Name', required=True, translate=True),
'model': fields.char('Model', required=True),
'report_type': fields.selection([('qweb-pdf', 'PDF'),
# options
'multi': fields.boolean('On Multiple Doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view."),
'attachment_use': fields.boolean('Reload from Attachment', help='If you check this, then the second time the user prints with same attachment name, it returns the previous report.'),
- 'attachment': fields.char('Save as Attachment Prefix', size=128, help='This is the filename of the attachment used to store the printing result. Keep empty to not save the printed reports. You can use a python expression with the object and time variables.'),
+ 'attachment': fields.char('Save as Attachment Prefix', help='This is the filename of the attachment used to store the printing result. Keep empty to not save the printed reports. You can use a python expression with the object and time variables.'),
# Deprecated rml stuff
- 'usage': fields.char('Action Usage', size=32),
+ 'usage': fields.char('Action Usage'),
'header': fields.boolean('Add RML Header', help="Add or not the corporate RML header"),
'parser': fields.char('Parser Class'),
'auto': fields.boolean('Custom Python Parser'),
return res
_columns = {
- 'name': fields.char('Action Name', size=64, translate=True),
- 'type': fields.char('Action Type', size=32, required=True),
+ 'name': fields.char('Action Name', translate=True),
+ 'type': fields.char('Action Type', required=True),
'view_id': fields.many2one('ir.ui.view', 'View Ref.', ondelete='cascade'),
'domain': fields.char('Domain Value',
help="Optional domain filtering of the destination data, as a Python expression"),
'context': fields.char('Context Value', required=True,
help="Context dictionary as Python expression, empty by default (Default: {})"),
'res_id': fields.integer('Record ID', help="Database ID of record to open in form view, when ``view_mode`` is set to 'form' only"),
- 'res_model': fields.char('Destination Model', size=64, required=True,
+ 'res_model': fields.char('Destination Model', required=True,
help="Model name of the object to open in the view window"),
- 'src_model': fields.char('Source Model', size=64,
+ 'src_model': fields.char('Source Model',
help="Optional model name of the objects on which this action should be visible"),
'target': fields.selection([('current','Current Window'),('new','New Window'),('inline','Inline Edit'),('inlineview','Inline View')], 'Target Window'),
- 'view_mode': fields.char('View Mode', size=250, required=True,
+ 'view_mode': fields.char('View Mode', required=True,
help="Comma-separated list of allowed view modes, such as 'form', 'tree', 'calendar', etc. (Default: tree,form)"),
'view_type': fields.selection((('tree','Tree'),('form','Form')), string='View Type', required=True,
help="View type: Tree type to use for the tree view, set to 'tree' for a hierarchical tree view, or 'form' for a regular list view"),
- 'usage': fields.char('Action Usage', size=32,
+ 'usage': fields.char('Action Usage',
help="Used to filter menu and home actions from the user form."),
'view_ids': fields.one2many('ir.actions.act_window.view', 'act_window_id', 'Views'),
'views': fields.function(_views_get_fnc, type='binary', string='Views',
_sequence = 'ir_actions_id_seq'
_order = 'name'
_columns = {
- 'name': fields.char('Action Name', size=64, translate=True),
- 'type': fields.char('Action Type', size=32, required=True),
+ 'name': fields.char('Action Name', translate=True),
+ 'type': fields.char('Action Type', required=True),
'url': fields.text('Action URL',required=True),
'target': fields.selection((
('new', 'New Window'),
return self._get_states(cr, uid, context)
_columns = {
- 'name': fields.char('Action Name', required=True, size=64, translate=True),
+ 'name': fields.char('Action Name', required=True, translate=True),
'condition': fields.char('Condition',
help="Condition verified before executing the server action. If it "
"is not verified, the action will not be executed. The condition is "
"- 'Write on a Record': update the values of a record\n"
"- 'Execute several actions': define an action that triggers several other server actions\n"
"- 'Send Email': automatically send an email (available in email_template)"),
- 'usage': fields.char('Action Usage', size=32),
- 'type': fields.char('Action Type', size=32, required=True),
+ 'usage': fields.char('Action Usage'),
+ 'type': fields.char('Action Type', required=True),
# Generic
'sequence': fields.integer('Sequence',
help="When dealing with multiple actions, the execution order is "
'ir.actions.actions', 'Action', select=True, required=True),
'sequence': fields.integer('Sequence'),
'state': fields.selection(TODO_STATES, string='Status', required=True),
- 'name': fields.char('Name', size=64),
+ 'name': fields.char('Name'),
'type': fields.selection(TODO_TYPES, 'Type', required=True,
help="""Manual: Launched manually.
Automatic: Runs whenever the system is reconfigured.
self.write(cr, uid, id, {'params_store': field_value}, context=context)
_columns = {
- 'name': fields.char('Action Name', required=True, size=64, translate=True),
- 'tag': fields.char('Client action tag', size=64, required=True,
+ 'name': fields.char('Action Name', required=True, translate=True),
+ 'tag': fields.char('Client action tag', required=True,
help="An arbitrary string, interpreted by the client"
" according to its own needs and wishes. There "
"is no central tag repository across clients."),
- 'res_model': fields.char('Destination Model', size=64,
+ 'res_model': fields.char('Destination Model',
help="Optional model, mostly used for needactions."),
- 'context': fields.char('Context Value', size=250, required=True,
+ 'context': fields.char('Context Value', required=True,
help="Context dictionary as Python expression, empty by default (Default: {})"),
'params': fields.function(_get_params, fnct_inv=_set_params,
type='binary',
if res_name:
field = self._columns.get('res_name',False)
if field and len(res_name) > field.size:
- res_name = res_name[:field.size-3] + '...'
+ res_name = res_name[:30] + '...'
data[attachment.id] = res_name
else:
data[attachment.id] = False
_name = 'ir.attachment'
_columns = {
- 'name': fields.char('Attachment Name',size=256, required=True),
- 'datas_fname': fields.char('File Name',size=256),
+ 'name': fields.char('Attachment Name', required=True),
+ 'datas_fname': fields.char('File Name'),
'description': fields.text('Description'),
- 'res_name': fields.function(_name_get_resname, type='char', size=128, string='Resource Name', store=True),
- 'res_model': fields.char('Resource Model',size=64, readonly=True, help="The database object this attachment will be attached to"),
+ 'res_name': fields.function(_name_get_resname, type='char', string='Resource Name', store=True),
+ 'res_model': fields.char('Resource Model', readonly=True, help="The database object this attachment will be attached to"),
'res_id': fields.integer('Resource ID', readonly=True, help="The record id this is attached to"),
'create_date': fields.datetime('Date Created', readonly=True),
'create_uid': fields.many2one('res.users', 'Owner', readonly=True),
'url': fields.char('Url', size=1024),
# al: We keep shitty field names for backward compatibility with document
'datas': fields.function(_data_get, fnct_inv=_data_set, string='File Content', type="binary", nodrop=True),
- 'store_fname': fields.char('Stored Filename', size=256),
+ 'store_fname': fields.char('Stored Filename'),
'db_datas': fields.binary('Database Data'),
'file_size': fields.integer('File Size'),
}
_rec_name = 'key'
_columns = {
- 'key': fields.char('Key', size=256, required=True, select=1),
+ 'key': fields.char('Key', required=True, select=1),
'value': fields.text('Value', required=True),
}
_name = "ir.cron"
_order = 'name'
_columns = {
- 'name': fields.char('Name', size=60, required=True),
+ 'name': fields.char('Name', required=True),
'user_id': fields.many2one('res.users', 'User', required=True),
'active': fields.boolean('Active'),
'interval_number': fields.integer('Interval Number',help="Repeat every x."),
'numbercall': fields.integer('Number of Calls', help='How many times the method is called,\na negative number indicates no limit.'),
'doall' : fields.boolean('Repeat Missed', help="Specify if missed occurrences should be executed when the server restarts."),
'nextcall' : fields.datetime('Next Execution Date', required=True, help="Next planned execution date for this job."),
- 'model': fields.char('Object', size=64, help="Model name on which the method to be called is located, e.g. 'res.partner'."),
- 'function': fields.char('Method', size=64, help="Name of the method to be called when this job is processed."),
+ 'model': fields.char('Object', help="Model name on which the method to be called is located, e.g. 'res.partner'."),
+ 'function': fields.char('Method', help="Name of the method to be called when this job is processed."),
'args': fields.text('Arguments', help="Arguments to be passed to the method, e.g. (uid,)."),
'priority': fields.integer('Priority', help='The priority of the job, as an integer: 0 means higher priority, 10 means lower priority.')
}
class ir_default(osv.osv):
_name = 'ir.default'
_columns = {
- 'field_tbl': fields.char('Object',size=64),
- 'field_name': fields.char('Object Field',size=64),
- 'value': fields.char('Default Value',size=64),
+ 'field_tbl': fields.char('Object'),
+ 'field_name': fields.char('Object Field'),
+ 'value': fields.char('Default Value'),
'uid': fields.many2one('res.users', 'Users'),
- 'page': fields.char('View',size=64),
- 'ref_table': fields.char('Table Ref.',size=64),
+ 'page': fields.char('View'),
+ 'ref_table': fields.char('Table Ref.'),
'ref_id': fields.integer('ID Ref.',size=64),
'company_id': fields.many2one('res.company','Company')
}
_name = "ir.exports"
_order = 'name'
_columns = {
- 'name': fields.char('Export Name', size=128),
- 'resource': fields.char('Resource', size=128, select=True),
+ 'name': fields.char('Export Name'),
+ 'resource': fields.char('Resource', select=True),
'export_fields': fields.one2many('ir.exports.line', 'export_id',
'Export ID'),
}
_name = 'ir.exports.line'
_order = 'id'
_columns = {
- 'name': fields.char('Field Name', size=64),
+ 'name': fields.char('Field Name'),
'export_id': fields.many2one('ir.exports', 'Export', select=True, ondelete='cascade'),
}
(lower(name), model_id, COALESCE(user_id,-1))""")
_columns = {
- 'name': fields.char('Filter Name', size=64, translate=True, required=True),
+ 'name': fields.char('Filter Name', translate=True, required=True),
'user_id': fields.many2one('res.users', 'User', ondelete='cascade',
help="The user this filter is private to. When left empty the filter is public "
"and available to all users."),
_name = "ir.mail_server"
_columns = {
- 'name': fields.char('Description', size=64, required=True, select=True),
- 'smtp_host': fields.char('SMTP Server', size=128, required=True, help="Hostname or IP of SMTP server"),
+ 'name': fields.char('Description', required=True, select=True),
+ 'smtp_host': fields.char('SMTP Server', required=True, help="Hostname or IP of SMTP server"),
'smtp_port': fields.integer('SMTP Port', size=5, required=True, help="SMTP Port. Usually 465 for SSL, and 25 or 587 for other cases."),
'smtp_user': fields.char('Username', size=64, help="Optional username for SMTP authentication"),
'smtp_pass': fields.char('Password', size=64, help="Optional password for SMTP authentication"),
'model': fields.char('Model', required=True, select=1),
'info': fields.text('Information'),
'field_id': fields.one2many('ir.model.fields', 'model_id', 'Fields', required=True),
- 'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Type',readonly=True),
+ 'state': fields.selection([('manual','Custom Object'),('base','Base Object')],'Type', readonly=True),
'access_ids': fields.one2many('ir.model.access', 'model_id', 'Access'),
'osv_memory': fields.function(_is_osv_memory, string='Transient Model', type='boolean',
fnct_search=_search_osv_memory,
_name = 'wizard.ir.model.menu.create'
_columns = {
'menu_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True),
- 'name': fields.char('Menu Name', size=64, required=True),
+ 'name': fields.char('Menu Name', required=True),
}
def menu_create(self, cr, uid, ids, context=None):
return not any(rule.model_id.model == self._name for rule in self.browse(cr, uid, ids, context))
_columns = {
- 'name': fields.char('Name', size=128, select=1),
+ 'name': fields.char('Name', select=1),
'active': fields.boolean('Active', help="If you uncheck the active field, it will disable the record rule without deleting it (if you delete a native record rule, it may be re-created when you reload the module."),
'model_id': fields.many2one('ir.model', 'Object',select=1, required=True, ondelete="cascade"),
'global': fields.function(_get_value, string='Global', type='boolean', store=True, help="If no group is specified the rule is global and applied to everyone"),
_name = 'ir.sequence.type'
_order = 'name'
_columns = {
- 'name': openerp.osv.fields.char('Name', size=64, required=True),
+ 'name': openerp.osv.fields.char('Name', required=True),
'code': openerp.osv.fields.char('Code', size=32, required=True),
}
"and 'No gap'. The later is slower than the former but forbids any"
" gap in the sequence (while they are possible in the former)."),
'active': openerp.osv.fields.boolean('Active'),
- 'prefix': openerp.osv.fields.char('Prefix', size=64, help="Prefix value of the record for the sequence"),
- 'suffix': openerp.osv.fields.char('Suffix', size=64, help="Suffix value of the record for the sequence"),
+ 'prefix': openerp.osv.fields.char('Prefix', help="Prefix value of the record for the sequence"),
+ 'suffix': openerp.osv.fields.char('Suffix', help="Suffix value of the record for the sequence"),
'number_next': openerp.osv.fields.integer('Next Number', required=True, help="Next number of this sequence"),
'number_next_actual': openerp.osv.fields.function(_get_number_next_actual, fnct_inv=_set_number_next_actual, type='integer', required=True, string='Next Number', help='Next number that will be used. This number can be incremented frequently so the displayed value might already be obsolete'),
'number_increment': openerp.osv.fields.integer('Increment Number', required=True, help="The next number of the sequence will be incremented by this number"),
return res
_columns = {
- 'name': fields.char('Menu', size=64, required=True, translate=True),
+ 'name': fields.char('Menu', required=True, translate=True),
'sequence': fields.integer('Sequence'),
'child_id': fields.one2many('ir.ui.menu', 'parent_id', 'Child IDs'),
'parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', select=True, ondelete="restrict"),
string='Full Path', type='char', size=128),
'icon': fields.selection(tools.icons, 'Icon', size=64),
'icon_pict': fields.function(_get_icon_pict, type='char', size=32),
- 'web_icon': fields.char('Web Icon File', size=128),
- 'web_icon_hover': fields.char('Web Icon File (hover)', size=128),
+ 'web_icon': fields.char('Web Icon File'),
+ 'web_icon_hover': fields.char('Web Icon File (hover)'),
'web_icon_data': fields.function(_get_image_icon, string='Web Icon Image', type='binary', readonly=True, store=True, multi='icon'),
'web_icon_hover_data': fields.function(_get_image_icon, string='Web Icon Image (hover)', type='binary', readonly=True, store=True, multi='icon'),
'needaction_enabled': fields.function(_get_needaction_enabled,
string='Target model uses the need action mechanism',
help='If the menu entry action is an act_window action, and if this action is related to a model that uses the need_action mechanism, this field is set to true. Otherwise, it is false.'),
'action': fields.function(_action, fnct_inv=_action_inv,
- type='reference', string='Action',
+ type='reference', string='Action', size=21,
selection=[
('ir.actions.report.xml', 'ir.actions.report.xml'),
('ir.actions.act_window', 'ir.actions.act_window'),
}
_columns = {
- 'name': fields.char('Name', size=128, required=True),
- 'model': fields.char('Model Name', size=128, select=True, required=True,
+ 'name': fields.char('Name', required=True),
+ 'model': fields.char('Model Name', select=True, required=True,
help="Model to which this entry applies"),
# TODO: model_id and action_id should be read-write function fields
type='text',
string='Default value or action reference'),
'key': fields.selection([('action','Action'),('default','Default')],
- 'Type', size=128, select=True, required=True,
+ 'Type', select=True, required=True,
help="- Action: an action attached to one slot of the given model\n"
"- Default: a default value for a model field"),
- 'key2' : fields.char('Qualifier', size=128, select=True,
+ 'key2' : fields.char('Qualifier', select=True,
help="For actions, one of the possible action slots: \n"
" - client_action_multi\n"
" - client_print_multi\n"
return result
_columns = {
- 'name': fields.char("Name", size=128, required=True, translate=True, select=True),
+ 'name': fields.char("Name", required=True, translate=True, select=True),
'parent_id': fields.many2one('ir.module.category', 'Parent Application', select=True),
'child_ids': fields.one2many('ir.module.category', 'parent_id', 'Child Applications'),
'module_nr': fields.function(_module_nbr, string='Number of Modules', type='integer'),
'description': fields.text("Description", translate=True),
'sequence': fields.integer('Sequence'),
'visible': fields.boolean('Visible'),
- 'xml_id': fields.function(osv.osv.get_external_id, type='char', size=128, string="External ID"),
+ 'xml_id': fields.function(osv.osv.get_external_id, type='char', string="External ID"),
}
_order = 'name'
return res
_columns = {
- 'name': fields.char("Technical Name", size=128, readonly=True, required=True, select=True),
+ 'name': fields.char("Technical Name", readonly=True, required=True, select=True),
'category_id': fields.many2one('ir.module.category', 'Category', readonly=True, select=True),
- 'shortdesc': fields.char('Module Name', size=64, readonly=True, translate=True),
- 'summary': fields.char('Summary', size=64, readonly=True, translate=True),
+ 'shortdesc': fields.char('Module Name', readonly=True, translate=True),
+ 'summary': fields.char('Summary', readonly=True, translate=True),
'description': fields.text("Description", readonly=True, translate=True),
'description_html': fields.function(_get_desc, string='Description HTML', type='html', method=True, readonly=True),
- 'author': fields.char("Author", size=128, readonly=True),
- 'maintainer': fields.char('Maintainer', size=128, readonly=True),
+ 'author': fields.char("Author", readonly=True),
+ 'maintainer': fields.char('Maintainer', readonly=True),
'contributors': fields.text('Contributors', readonly=True),
- 'website': fields.char("Website", size=256, readonly=True),
+ 'website': fields.char("Website", readonly=True),
# attention: Incorrect field names !!
# installed_version refers the latest version (the one on disk)
# latest_version refers the installed version (the one in database)
# published_version refers the version available on the repository
'installed_version': fields.function(_get_latest_version, string='Latest Version', type='char'),
- 'latest_version': fields.char('Installed Version', size=64, readonly=True),
- 'published_version': fields.char('Published Version', size=64, readonly=True),
+ 'latest_version': fields.char('Installed Version', readonly=True),
+ 'published_version': fields.char('Published Version', readonly=True),
- 'url': fields.char('URL', size=128, readonly=True),
+ 'url': fields.char('URL', readonly=True),
'sequence': fields.integer('Sequence'),
'dependencies_id': fields.one2many('ir.module.module.dependency', 'module_id', 'Dependencies', readonly=True),
'auto_install': fields.boolean('Automatic Installation',
'reports_by_module': fields.function(_get_views, string='Reports', type='text', multi="meta", store=True),
'views_by_module': fields.function(_get_views, string='Views', type='text', multi="meta", store=True),
'application': fields.boolean('Application', readonly=True),
- 'icon': fields.char('Icon URL', size=128),
+ 'icon': fields.char('Icon URL'),
'icon_image': fields.function(_get_icon_image, string='Icon', type="binary"),
}
_columns = {
# The dependency name
- 'name': fields.char('Name', size=128, select=True),
+ 'name': fields.char('Name', select=True),
# The module that depends on it
'module_id': fields.many2one('ir.module.module', 'Module', select=True, ondelete='cascade'),
_name = "base.language.import"
_description = "Language Import"
_columns = {
- 'name': fields.char('Language Name', size=64 , required=True),
+ 'name': fields.char('Language Name', required=True),
'code': fields.char('ISO Code', size=5, help="ISO Language and Country code, e.g. en_US", required=True),
'data': fields.binary('File', required=True),
'overwrite': fields.boolean('Overwrite Existing Terms',
_name = 'ir.property'
_columns = {
- 'name': fields.char('Name', size=128, select=1),
+ 'name': fields.char('Name', select=1),
- 'res_id': fields.char('Resource', size=128, help="If not set, acts as a default value for new resources", select=1),
+ 'res_id': fields.char('Resource', help="If not set, acts as a default value for new resources", select=1),
'company_id': fields.many2one('res.company', 'Company', select=1),
'fields_id': fields.many2one('ir.model.fields', 'Field', ondelete='cascade', required=True, select=1),
'value_integer' : fields.integer('Value'),
'value_text' : fields.text('Value'), # will contain (char, text)
'value_binary' : fields.binary('Value'),
- 'value_reference': fields.char('Value', size=128),
+ 'value_reference': fields.char('Value'),
'value_datetime' : fields.datetime('Value'),
'type' : fields.selection([('char', 'Char'),
_name = 'res.bank'
_order = 'name'
_columns = {
- 'name': fields.char('Name', size=128, required=True),
- 'street': fields.char('Street', size=128),
- 'street2': fields.char('Street2', size=128),
+ 'name': fields.char('Name', required=True),
+ 'street': fields.char('Street'),
+ 'street2': fields.char('Street2'),
'zip': fields.char('Zip', change_default=True, size=24),
- 'city': fields.char('City', size=128),
+ 'city': fields.char('City'),
'state': fields.many2one("res.country.state", 'Fed. State',
domain="[('country_id', '=', country)]"),
'country': fields.many2one('res.country', 'Country'),
- 'email': fields.char('Email', size=64),
- 'phone': fields.char('Phone', size=64),
- 'fax': fields.char('Fax', size=64),
+ 'email': fields.char('Email'),
+ 'phone': fields.char('Phone'),
+ 'fax': fields.char('Fax'),
'active': fields.boolean('Active'),
'bic': fields.char('Bank Identifier Code', size=64,
help="Sometimes called BIC or Swift."),
_name = 'res.partner.bank.type'
_order = 'name'
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
'code': fields.char('Code', size=64, required=True),
'field_ids': fields.one2many('res.partner.bank.type.field', 'bank_type_id', 'Type Fields'),
'format_layout': fields.text('Format Layout', translate=True)
_name = 'res.partner.bank.type.field'
_order = 'name'
_columns = {
- 'name': fields.char('Field Name', size=64, required=True, translate=True),
+ 'name': fields.char('Field Name', required=True, translate=True),
'bank_type_id': fields.many2one('res.partner.bank.type', 'Bank Type', required=True, ondelete='cascade'),
'required': fields.boolean('Required'),
'readonly': fields.boolean('Readonly'),
return value
_columns = {
- 'name': fields.char('Bank Account', size=64), # to be removed in v6.2 ?
+ 'name': fields.char('Bank Account'), # to be removed in v6.2 ?
'acc_number': fields.char('Account Number', size=64, required=True),
'bank': fields.many2one('res.bank', 'Bank'),
'bank_bic': fields.char('Bank Identifier Code', size=16),
- 'bank_name': fields.char('Bank Name', size=32),
- 'owner_name': fields.char('Account Owner Name', size=128),
- 'street': fields.char('Street', size=128),
+ 'bank_name': fields.char('Bank Name'),
+ 'owner_name': fields.char('Account Owner Name'),
+ 'street': fields.char('Street'),
'zip': fields.char('Zip', change_default=True, size=24),
- 'city': fields.char('City', size=128),
+ 'city': fields.char('City'),
'country_id': fields.many2one('res.country', 'Country',
change_default=True),
'state_id': fields.many2one("res.country.state", 'Fed. State',
_columns = {
'sequence': fields.integer('Sequence'),
- 'name': fields.char('Name', size=256, required=True, help='Name it to easily find a record'),
+ 'name': fields.char('Name', required=True, help='Name it to easily find a record'),
'company_id': fields.many2one('res.company', 'Main Company', required=True,
help='Company where the user is connected'),
'company_dest_id': fields.many2one('res.company', 'Default Company', required=True,
help='Company to store the current record'),
'object_id': fields.many2one('ir.model', 'Object', required=True,
help='Object affected by this rule'),
- 'expression': fields.char('Expression', size=256, required=True,
+ 'expression': fields.char('Expression', required=True,
help='Expression, must be True to match\nuse context.get or user (browse)'),
'field_id': fields.many2one('ir.model.fields', 'Field', help='Select field property'),
}
'child_ids': fields.one2many('res.company', 'parent_id', 'Child Companies'),
'partner_id': fields.many2one('res.partner', 'Partner', required=True),
'rml_header': fields.text('RML Header', required=True),
- 'rml_header1': fields.char('Company Tagline', size=200, help="Appears by default on the top right corner of your printed documents (report header)."),
+ 'rml_header1': fields.char('Company Tagline', help="Appears by default on the top right corner of your printed documents (report header)."),
'rml_header2': fields.text('RML Internal Header', required=True),
'rml_header3': fields.text('RML Internal Header for Landscape Reports', required=True),
'rml_footer': fields.text('Report Footer', help="Footer text displayed at the bottom of all reports."),
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency'),
'user_ids': fields.many2many('res.users', 'res_company_users_rel', 'cid', 'user_id', 'Accepted Users'),
- 'account_no':fields.char('Account No.', size=64),
+ 'account_no':fields.char('Account No.'),
'street': fields.function(_get_address_data, fnct_inv=_set_address_data, size=128, type='char', string="Street", multi='address'),
'street2': fields.function(_get_address_data, fnct_inv=_set_address_data, size=128, type='char', string="Street2", multi='address'),
'zip': fields.function(_get_address_data, fnct_inv=_set_address_data, size=24, type='char', string="Zip", multi='address'),
_name = 'res.country'
_description = 'Country'
_columns = {
- 'name': fields.char('Country Name', size=64,
+ 'name': fields.char('Country Name',
help='The full name of the country.', required=True, translate=True),
'code': fields.char('Country Code', size=2,
help='The ISO country code in two chars.\n'
_columns = {
'country_id': fields.many2one('res.country', 'Country',
required=True),
- 'name': fields.char('State Name', size=64, required=True,
+ 'name': fields.char('State Name', required=True,
help='Administrative divisions of a country. E.g. Fed. State, Departement, Canton'),
'code': fields.char('State Code', size=3,
help='The state code in max. three chars.', required=True),
_description = "Currency"
_columns = {
# Note: 'code' column was removed as of v6.0, the 'name' should now hold the ISO code.
- 'name': fields.char('Currency', size=32, required=True, help="Currency Code (ISO 4217)"),
+ 'name': fields.char('Currency', size=3, required=True, help="Currency Code (ISO 4217)"),
'symbol': fields.char('Symbol', size=4, help="Currency sign, to be used when printing amounts."),
'rate': fields.function(_current_rate, string='Current Rate', digits=(12,6),
help='The rate of the currency to the currency of rate 1.'),
_name = "res.currency.rate.type"
_description = "Currency Rate Type"
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
}
class res_currency_rate(osv.osv):
return '%H:%M:%S'
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'code': fields.char('Locale Code', size=16, required=True, help='This field is used to set/get locales for user'),
'iso_code': fields.char('ISO code', size=16, required=False, help='This ISO code is the name of po files to use for translations'),
'translatable': fields.boolean('Translatable'),
'active': fields.boolean('Active'),
- 'direction': fields.selection([('ltr', 'Left-to-Right'), ('rtl', 'Right-to-Left')], 'Direction',required=True),
- 'date_format':fields.char('Date Format',size=64,required=True),
- 'time_format':fields.char('Time Format',size=64,required=True),
- 'grouping':fields.char('Separator Format',size=64,required=True,help="The Separator Format should be like [,n] where 0 < n :starting from Unit digit.-1 will end the separation. e.g. [3,2,-1] will represent 106500 to be 1,06,500;[1,2,-1] will represent it to be 106,50,0;[3] will represent it as 106,500. Provided ',' as the thousand separator in each case."),
- 'decimal_point':fields.char('Decimal Separator', size=64,required=True),
- 'thousands_sep':fields.char('Thousands Separator',size=64),
+ 'direction': fields.selection([('ltr', 'Left-to-Right'), ('rtl', 'Right-to-Left')], 'Direction', required=True),
+ 'date_format':fields.char('Date Format', required=True),
+ 'time_format':fields.char('Time Format', required=True),
+ 'grouping':fields.char('Separator Format', required=True,help="The Separator Format should be like [,n] where 0 < n :starting from Unit digit.-1 will end the separation. e.g. [3,2,-1] will represent 106500 to be 1,06,500;[1,2,-1] will represent it to be 106,50,0;[3] will represent it as 106,500. Provided ',' as the thousand separator in each case."),
+ 'decimal_point':fields.char('Decimal Separator', required=True),
+ 'thousands_sep':fields.char('Thousands Separator'),
}
_defaults = {
'active': 1,
_description = 'Partner Tags'
_name = 'res.partner.category'
_columns = {
- 'name': fields.char('Category Name', required=True, size=64, translate=True),
+ 'name': fields.char('Category Name', required=True, translate=True),
'parent_id': fields.many2one('res.partner.category', 'Parent Category', select=True, ondelete='cascade'),
'complete_name': fields.function(_name_get_fnc, type="char", string='Full Name'),
'child_ids': fields.one2many('res.partner.category', 'parent_id', 'Child Categories'),
_name = 'res.partner.title'
_order = 'name'
_columns = {
- 'name': fields.char('Title', required=True, size=46, translate=True),
- 'shortcut': fields.char('Abbreviation', size=16, translate=True),
- 'domain': fields.selection([('partner', 'Partner'), ('contact', 'Contact')], 'Domain', required=True, size=24)
+ 'name': fields.char('Title', required=True, translate=True),
+ 'shortcut': fields.char('Abbreviation', translate=True),
+ 'domain': fields.selection([('partner', 'Partner'), ('contact', 'Contact')], 'Domain', required=True)
}
_defaults = {
'domain': 'contact',
_order = "display_name"
_columns = {
- 'name': fields.char('Name', size=128, required=True, select=True),
+ 'name': fields.char('Name', required=True, select=True),
'display_name': fields.function(_display_name, type='char', string='Name', store=_display_name_store_triggers, select=True),
'date': fields.date('Date', select=1),
'title': fields.many2one('res.partner.title', 'Title'),
'parent_id': fields.many2one('res.partner', 'Related Company', select=True),
'child_ids': fields.one2many('res.partner', 'parent_id', 'Contacts', domain=[('active','=',True)]), # force "active_test" domain to bypass _search() override
- 'ref': fields.char('Contact Reference', size=64, select=1),
+ 'ref': fields.char('Contact Reference', select=1),
'lang': fields.selection(_lang_get, 'Language',
help="If the selected language is loaded in the system, all documents related to this contact will be printed in this language. If not, it will be English."),
'tz': fields.selection(_tz_get, 'Timezone', size=64,
"that is otherwise used to pick and render date and time values: your computer's timezone."),
'tz_offset': fields.function(_get_tz_offset, type='char', size=5, string='Timezone offset', invisible=True),
'user_id': fields.many2one('res.users', 'Salesperson', help='The internal user that is in charge of communicating with this contact if any.'),
- 'vat': fields.char('TIN', size=32, help="Tax Identification Number. Check the box if this contact is subjected to taxes. Used by the some of the legal statements."),
+ 'vat': fields.char('TIN', help="Tax Identification Number. Check the box if this contact is subjected to taxes. Used by the some of the legal statements."),
'bank_ids': fields.one2many('res.partner.bank', 'partner_id', 'Banks'),
- 'website': fields.char('Website', size=64, help="Website of Partner or Company"),
+ 'website': fields.char('Website', help="Website of Partner or Company"),
'comment': fields.text('Notes'),
'category_id': fields.many2many('res.partner.category', id1='partner_id', id2='category_id', string='Tags'),
'credit_limit': fields.float(string='Credit Limit'),
'customer': fields.boolean('Customer', help="Check this box if this contact is a customer."),
'supplier': fields.boolean('Supplier', help="Check this box if this contact is a supplier. If it's not checked, purchase people will not see it when encoding a purchase order."),
'employee': fields.boolean('Employee', help="Check this box if this contact is an Employee."),
- 'function': fields.char('Job Position', size=128),
+ 'function': fields.char('Job Position'),
'type': fields.selection([('default', 'Default'), ('invoice', 'Invoice'),
('delivery', 'Shipping'), ('contact', 'Contact'),
('other', 'Other')], 'Address Type',
help="Used to select automatically the right address according to the context in sales and purchases documents."),
- 'street': fields.char('Street', size=128),
- 'street2': fields.char('Street2', size=128),
- 'zip': fields.char('Zip', change_default=True, size=24),
- 'city': fields.char('City', size=128),
+ 'street': fields.char('Street'),
+ 'street2': fields.char('Street2'),
+ 'zip': fields.char('Zip', size=24, change_default=True),
+ 'city': fields.char('City'),
'state_id': fields.many2one("res.country.state", 'State', ondelete='restrict'),
'country_id': fields.many2one('res.country', 'Country', ondelete='restrict'),
- 'email': fields.char('Email', size=240),
- 'phone': fields.char('Phone', size=64),
- 'fax': fields.char('Fax', size=64),
- 'mobile': fields.char('Mobile', size=64),
- 'birthdate': fields.char('Birthdate', size=64),
+ 'country': fields.related('country_id', type='many2one', relation='res.country', string='Country',
+ deprecated="This field will be removed as of OpenERP 7.1, use country_id instead"),
+ 'email': fields.char('Email'),
+ 'phone': fields.char('Phone'),
+ 'fax': fields.char('Fax'),
+ 'mobile': fields.char('Mobile'),
+ 'birthdate': fields.char('Birthdate'),
'is_company': fields.boolean('Is a Company', help="Check if the contact is a company, otherwise it is a person"),
'use_parent_address': fields.boolean('Use Company Address', help="Select this if you want to set company's address information for this contact"),
# image: all image fields are base64 encoded and PIL-supported
class res_request_link(osv.osv):
_name = 'res.request.link'
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
- 'object': fields.char('Object', size=64, required=True),
+ 'name': fields.char('Name', required=True, translate=True),
+ 'object': fields.char('Object', required=True),
'priority': fields.integer('Priority'),
}
_defaults = {
return where
_columns = {
- 'name': fields.char('Name', size=64, required=True, translate=True),
+ 'name': fields.char('Name', required=True, translate=True),
'users': fields.many2many('res.users', 'res_groups_users_rel', 'gid', 'uid', 'Users'),
'model_access': fields.one2many('ir.model.access', 'group_id', 'Access Controls'),
'rule_groups': fields.many2many('ir.rule', 'rule_group_rel',
_table = "wkf"
_order = "name"
_columns = {
- 'name': fields.char('Name', size=64, required=True),
- 'osv': fields.char('Resource Object', size=64, required=True,select=True),
+ 'name': fields.char('Name', required=True),
+ 'osv': fields.char('Resource Object', required=True,select=True),
'on_create': fields.boolean('On Create', select=True),
'activities': fields.one2many('workflow.activity', 'wkf_id', 'Activities'),
}
_table = "wkf_activity"
_order = "name"
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', required=True),
'wkf_id': fields.many2one('workflow', 'Workflow', required=True, select=True, ondelete='cascade'),
'split_mode': fields.selection([('XOR', 'Xor'), ('OR','Or'), ('AND','And')], 'Split Mode', size=3, required=True),
'join_mode': fields.selection([('XOR', 'Xor'), ('AND', 'And')], 'Join Mode', size=3, required=True),
- 'kind': fields.selection([('dummy', 'Dummy'), ('function', 'Function'), ('subflow', 'Subflow'), ('stopall', 'Stop All')], 'Kind', size=64, required=True),
+ 'kind': fields.selection([('dummy', 'Dummy'), ('function', 'Function'), ('subflow', 'Subflow'), ('stopall', 'Stop All')], 'Kind', required=True),
'action': fields.text('Python Action'),
'action_id': fields.many2one('ir.actions.server', 'Server Action', ondelete='set null'),
'flow_start': fields.boolean('Flow Start'),
'flow_stop': fields.boolean('Flow Stop'),
'subflow_id': fields.many2one('workflow', 'Subflow'),
- 'signal_send': fields.char('Signal (subflow.*)', size=32),
+ 'signal_send': fields.char('Signal (subflow.*)'),
'out_transitions': fields.one2many('workflow.transition', 'act_from', 'Outgoing Transitions'),
'in_transitions': fields.one2many('workflow.transition', 'act_to', 'Incoming Transitions'),
}
_name = "workflow.transition"
_rec_name = 'signal'
_columns = {
- 'trigger_model': fields.char('Trigger Object', size=128),
- 'trigger_expr_id': fields.char('Trigger Expression', size=128),
- 'signal': fields.char('Signal (Button Name)', size=64,
+ 'trigger_model': fields.char('Trigger Object'),
+ 'trigger_expr_id': fields.char('Trigger Expression'),
+ 'signal': fields.char('Signal (Button Name)',
help="When the operation of transition comes from a button pressed in the client form, "\
"signal tests the name of the pressed button. If signal is NULL, no button is necessary to validate this transition."),
'group_id': fields.many2one('res.groups', 'Group Required',
help="The group that a user must have to be authorized to validate this transition."),
- 'condition': fields.char('Condition', required=True, size=128,
+ 'condition': fields.char('Condition', required=True,
help="Expression to be satisfied if we want the transition done."),
'act_from': fields.many2one('workflow.activity', 'Source Activity', required=True, select=True, ondelete='cascade',
help="Source activity. When this activity is over, the condition is tested to determine if we can start the ACT_TO activity."),
'uid': fields.integer('User'), # FIXME no constraint??
'wkf_id': fields.many2one('workflow', 'Workflow', ondelete='cascade', select=True),
'res_id': fields.integer('Resource ID'),
- 'res_type': fields.char('Resource Object', size=64),
- 'state': fields.char('Status', size=32),
+ 'res_type': fields.char('Resource Object'),
+ 'state': fields.char('Status'),
'transition_ids': fields.many2many('workflow.transition', 'wkf_witm_trans', 'inst_id', 'trans_id'),
}
def _auto_init(self, cr, context=None):
'wkf_id': fields.related('act_id','wkf_id', type='many2one', relation='workflow', string='Workflow'),
'subflow_id': fields.many2one('workflow.instance', 'Subflow', ondelete="cascade", select=True),
'inst_id': fields.many2one('workflow.instance', 'Instance', required=True, ondelete="cascade", select=True),
- 'state': fields.char('Status', size=64, select=True),
+ 'state': fields.char('Status', select=True),
}
wkf_workitem()
_log_access = False
_columns = {
'res_id': fields.integer('Resource ID', size=128),
- 'model': fields.char('Object', size=128),
+ 'model': fields.char('Object'),
'instance_id': fields.many2one('workflow.instance', 'Destination Instance', ondelete="cascade"),
'workitem_id': fields.many2one('workflow.workitem', 'Workitem', required=True, ondelete="cascade"),
}
_name = 'test_uninstall.model'
_columns = {
- 'name': fields.char('Name', size=64),
+ 'name': fields.char('Name'),
'ref': fields.many2one('res.users', string='User'),
'rel': fields.many2many('res.users', string='Users'),
}