Skip to content

Commit 026e38b

Browse files
Jaydeep Barotrim-odoo
Jaydeep Barot
authored andcommitted
[REM] Unnecessary size parameters on char fields
1 parent 19c0435 commit 026e38b

File tree

162 files changed

+585
-578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+585
-578
lines changed

addons/account/account.py

+28-29
Large diffs are not rendered by default.

addons/account/account_analytic_line.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class account_analytic_line(osv.osv):
3333
'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True),
3434
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True),
3535
'code': fields.char('Code', size=8),
36-
'ref': fields.char('Ref.', size=64),
36+
'ref': fields.char('Ref.'),
3737
'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),
3838
'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),
3939
}

addons/account/account_bank_statement.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def _all_lines_reconciled(self, cr, uid, ids, name, args, context=None):
114114
_description = "Bank Statement"
115115
_inherit = ['mail.thread']
116116
_columns = {
117-
'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
117+
'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
118118
'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}, select=True),
119119
'journal_id': fields.many2one('account.journal', 'Journal', required=True,
120120
readonly=True, states={'draft':[('readonly',False)]}),

addons/account/account_financial_report.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _get_balance(self, cr, uid, ids, field_names, args, context=None):
9797
return res
9898

9999
_columns = {
100-
'name': fields.char('Report Name', size=128, required=True, translate=True),
100+
'name': fields.char('Report Name', required=True, translate=True),
101101
'parent_id': fields.many2one('account.financial.report', 'Parent'),
102102
'children_ids': fields.one2many('account.financial.report', 'parent_id', 'Account Report'),
103103
'sequence': fields.integer('Sequence'),

addons/account/account_invoice.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ def _get_invoice_from_reconcile(self, cr, uid, ids, context=None):
226226
},
227227
}
228228
_columns = {
229-
'name': fields.char('Reference/Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
230-
'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
229+
'name': fields.char('Reference/Description', select=True, readonly=True, states={'draft':[('readonly',False)]}),
230+
'origin': fields.char('Source Document', help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
231231
'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)]}),
232232
'type': fields.selection([
233233
('out_invoice','Customer Invoice'),
@@ -237,8 +237,8 @@ def _get_invoice_from_reconcile(self, cr, uid, ids, context=None):
237237
],'Type', readonly=True, select=True, change_default=True, track_visibility='always'),
238238

239239
'number': fields.related('move_id','name', type='char', readonly=True, size=64, relation='account.move', store=True, string='Number'),
240-
'internal_number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
241-
'reference': fields.char('Invoice Reference', size=64, help="The partner reference of this invoice."),
240+
'internal_number': fields.char('Invoice Number', readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
241+
'reference': fields.char('Invoice Reference', help="The partner reference of this invoice."),
242242
'reference_type': fields.selection(_get_reference_type, 'Payment Reference',
243243
required=True, readonly=True, states={'draft':[('readonly',False)]}),
244244
'comment': fields.text('Additional Information'),
@@ -318,7 +318,7 @@ def _get_invoice_from_reconcile(self, cr, uid, ids, context=None):
318318
},
319319
help="Remaining amount due."),
320320
'payment_ids': fields.function(_compute_lines, relation='account.move.line', type="many2many", string='Payments'),
321-
'move_name': fields.char('Journal Entry', size=64, readonly=True, states={'draft':[('readonly',False)]}),
321+
'move_name': fields.char('Journal Entry', readonly=True, states={'draft':[('readonly',False)]}),
322322
'user_id': fields.many2one('res.users', 'Salesperson', readonly=True, track_visibility='onchange', states={'draft':[('readonly',False)]}),
323323
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True, states={'draft':[('readonly',False)]}),
324324
'commercial_partner_id': fields.related('partner_id', 'commercial_partner_id', string='Commercial Entity', type='many2one',
@@ -1402,7 +1402,7 @@ def _price_unit_default(self, cr, uid, context=None):
14021402
_order = "invoice_id,sequence,id"
14031403
_columns = {
14041404
'name': fields.text('Description', required=True),
1405-
'origin': fields.char('Source Document', size=256, help="Reference of the document that produced this invoice."),
1405+
'origin': fields.char('Source Document', help="Reference of the document that produced this invoice."),
14061406
'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."),
14071407
'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True),
14081408
'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null', select=True),
@@ -1646,7 +1646,7 @@ def _count_factor(self, cr, uid, ids, name, args, context=None):
16461646

16471647
_columns = {
16481648
'invoice_id': fields.many2one('account.invoice', 'Invoice Line', ondelete='cascade', select=True),
1649-
'name': fields.char('Tax Description', size=64, required=True),
1649+
'name': fields.char('Tax Description', required=True),
16501650
'account_id': fields.many2one('account.account', 'Tax Account', required=True, domain=[('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')]),
16511651
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
16521652
'base': fields.float('Base', digits_compute=dp.get_precision('Account')),

addons/account/account_move_line.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def _get_move_from_reconcile(self, cr, uid, ids, context=None):
445445

446446

447447
_columns = {
448-
'name': fields.char('Name', size=64, required=True),
448+
'name': fields.char('Name', required=True),
449449
'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."),
450450
'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
451451
'product_id': fields.many2one('product.product', 'Product'),
@@ -454,7 +454,7 @@ def _get_move_from_reconcile(self, cr, uid, ids, context=None):
454454
'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
455455
'move_id': fields.many2one('account.move', 'Journal Entry', ondelete="cascade", help="The move of this entry line.", select=2, required=True),
456456
'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Internal Note'),
457-
'ref': fields.related('move_id', 'ref', string='Reference', type='char', size=64, store=True),
457+
'ref': fields.related('move_id', 'ref', string='Reference', type='char', store=True),
458458
'statement_id': fields.many2one('account.bank.statement', 'Statement', help="The bank statement used for bank reconciliation", select=1),
459459
'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
460460
'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),

addons/account/partner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class account_fiscal_position(osv.osv):
2828
_name = 'account.fiscal.position'
2929
_description = 'Fiscal Position'
3030
_columns = {
31-
'name': fields.char('Fiscal Position', size=64, required=True),
31+
'name': fields.char('Fiscal Position', required=True),
3232
'active': fields.boolean('Active', help="By unchecking the active field, you may hide a fiscal position without deleting it."),
3333
'company_id': fields.many2one('res.company', 'Company'),
3434
'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Account Mapping'),

addons/account/project/project.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class account_analytic_journal(osv.osv):
2525
_name = 'account.analytic.journal'
2626
_description = 'Analytic Journal'
2727
_columns = {
28-
'name': fields.char('Journal Name', size=64, required=True),
28+
'name': fields.char('Journal Name', required=True),
2929
'code': fields.char('Journal Code', size=8),
3030
'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."),
31-
'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."),
31+
'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."),
3232
'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
3333
'company_id': fields.many2one('res.company', 'Company', required=True),
3434
}

addons/account/report/account_entries_report.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class account_entries_report(osv.osv):
3232
'date': fields.date('Effective Date', readonly=True),
3333
'date_created': fields.date('Date Created', readonly=True),
3434
'date_maturity': fields.date('Date Maturity', readonly=True),
35-
'ref': fields.char('Reference', size=64, readonly=True),
35+
'ref': fields.char('Reference', readonly=True),
3636
'nbr': fields.integer('# of Items', readonly=True),
3737
'debit': fields.float('Debit', readonly=True),
3838
'credit': fields.float('Credit', readonly=True),

addons/account/report/account_report.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class temp_range(osv.osv):
7373
_description = 'A Temporary table used for Dashboard view'
7474

7575
_columns = {
76-
'name': fields.char('Range',size=64)
76+
'name': fields.char('Range')
7777
}
7878

7979

@@ -112,7 +112,7 @@ def _calc_bal(self, cr, uid, ids, name, args, context=None):
112112
return res
113113

114114
_columns = {
115-
'name': fields.char('Month Range', size=7, readonly=True),
115+
'name': fields.char('Month Range', size=24, readonly=True),
116116
'balance': fields.function(_calc_bal, string='Balance', readonly=True),
117117
}
118118

@@ -151,14 +151,14 @@ class report_invoice_created(osv.osv):
151151
_description = "Report of Invoices Created within Last 15 days"
152152
_auto = False
153153
_columns = {
154-
'name': fields.char('Description', size=64, readonly=True),
154+
'name': fields.char('Description', readonly=True),
155155
'type': fields.selection([
156156
('out_invoice','Customer Invoice'),
157157
('in_invoice','Supplier Invoice'),
158158
('out_refund','Customer Refund'),
159159
('in_refund','Supplier Refund'),
160160
],'Type', readonly=True),
161-
'number': fields.char('Invoice Number', size=32, readonly=True),
161+
'number': fields.char('Invoice Number', readonly=True),
162162
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
163163
'amount_untaxed': fields.float('Untaxed', readonly=True),
164164
'amount_total': fields.float('Total', readonly=True),
@@ -174,7 +174,7 @@ class report_invoice_created(osv.osv):
174174
('paid','Done'),
175175
('cancel','Cancelled')
176176
],'Status', readonly=True),
177-
'origin': fields.char('Source Document', size=64, readonly=True, help="Reference of the document that generated this invoice report."),
177+
'origin': fields.char('Source Document', readonly=True, help="Reference of the document that generated this invoice report."),
178178
'create_date': fields.datetime('Create Date', readonly=True)
179179
}
180180
_order = 'create_date'
@@ -203,7 +203,7 @@ class report_account_type_sales(osv.osv):
203203
_description = "Report of the Sales by Account Type"
204204
_auto = False
205205
_columns = {
206-
'name': fields.char('Year', size=64, required=False, readonly=True),
206+
'name': fields.char('Year', required=False, readonly=True),
207207
'period_id': fields.many2one('account.period', 'Force Period', readonly=True),
208208
'product_id': fields.many2one('product.product', 'Product', readonly=True),
209209
'quantity': fields.float('Quantity', readonly=True),
@@ -244,7 +244,7 @@ class report_account_sales(osv.osv):
244244
_description = "Report of the Sales by Account"
245245
_auto = False
246246
_columns = {
247-
'name': fields.char('Year', size=64, required=False, readonly=True, select=True),
247+
'name': fields.char('Year', required=False, readonly=True, select=True),
248248
'period_id': fields.many2one('account.period', 'Force Period', readonly=True),
249249
'product_id': fields.many2one('product.product', 'Product', readonly=True),
250250
'quantity': fields.float('Quantity', readonly=True),

addons/account/wizard/account_financial_report.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class accounting_report(osv.osv_memory):
3030
_columns = {
3131
'enable_filter': fields.boolean('Enable Comparison'),
3232
'account_report_id': fields.many2one('account.financial.report', 'Account Reports', required=True),
33-
'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."),
33+
'label_filter': fields.char('Column Label', help="This label will be displayed on report to show the balance computed for the given comparison filter."),
3434
'fiscalyear_id_cmp': fields.many2one('account.fiscalyear', 'Fiscal Year', help='Keep empty for all open fiscal year'),
3535
'filter_cmp': fields.selection([('filter_no', 'No Filters'), ('filter_date', 'Date'), ('filter_period', 'Periods')], "Filter by", required=True),
3636
'period_from_cmp': fields.many2one('account.period', 'Start Period'),

addons/account/wizard/account_fiscalyear_close.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class account_fiscalyear_close(osv.osv_memory):
3535
'New Fiscal Year', required=True),
3636
'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.'),
3737
'period_id': fields.many2one('account.period', 'Opening Entries Period', required=True),
38-
'report_name': fields.char('Name of new entries',size=64, required=True, help="Give name of the new entries"),
38+
'report_name': fields.char('Name of new entries', required=True, help="Give name of the new entries"),
3939
}
4040
_defaults = {
4141
'report_name': lambda self, cr, uid, context: _('End of Fiscal Year Entry'),

addons/account/wizard/account_invoice_refund.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class account_invoice_refund(osv.osv_memory):
3434
'date': fields.date('Date', help='This date will be used as the invoice date for credit note and period will be chosen accordingly!'),
3535
'period': fields.many2one('account.period', 'Force period'),
3636
'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.'),
37-
'description': fields.char('Reason', size=128, required=True),
37+
'description': fields.char('Reason', required=True),
3838
'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'),
3939
}
4040

addons/account/wizard/account_reconcile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory):
107107
'journal_id': fields.many2one('account.journal','Write-Off Journal', required=True),
108108
'writeoff_acc_id': fields.many2one('account.account','Write-Off account', required=True),
109109
'date_p': fields.date('Date'),
110-
'comment': fields.char('Comment', size= 64, required=True),
110+
'comment': fields.char('Comment', required=True),
111111
'analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('parent_id', '!=', False)]),
112112
}
113113
_defaults = {

addons/account/wizard/pos_box.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class CashBox(osv.osv_memory):
66
_register = False
77
_columns = {
8-
'name' : fields.char('Reason', size=64, required=True),
8+
'name' : fields.char('Reason', required=True),
99
# Attention, we don't set a domain, because there is a journal_type key
1010
# in the context of the action
1111
'amount' : fields.float('Amount',
@@ -49,7 +49,7 @@ class CashBoxIn(CashBox):
4949

5050
_columns = CashBox._columns.copy()
5151
_columns.update({
52-
'ref' : fields.char('Reference', size=32),
52+
'ref' : fields.char('Reference'),
5353
})
5454

5555
def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):

addons/account_analytic_plans/account_analytic_plans.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class account_analytic_plan(osv.osv):
7070
_name = "account.analytic.plan"
7171
_description = "Analytic Plan"
7272
_columns = {
73-
'name': fields.char('Analytic Plan', size=64, required=True, select=True),
73+
'name': fields.char('Analytic Plan', required=True, select=True),
7474
'plan_ids': fields.one2many('account.analytic.plan.line', 'plan_id', 'Analytic Plans'),
7575
}
7676

@@ -81,7 +81,7 @@ class account_analytic_plan_line(osv.osv):
8181
_order = "sequence, id"
8282
_columns = {
8383
'plan_id': fields.many2one('account.analytic.plan','Analytic Plan',required=True),
84-
'name': fields.char('Axis Name', size=64, required=True, select=True),
84+
'name': fields.char('Axis Name', required=True, select=True),
8585
'sequence': fields.integer('Sequence'),
8686
'root_analytic_id': fields.many2one('account.analytic.account', 'Root Account', help="Root account of this plan.", required=False),
8787
'min_required': fields.float('Minimum Allowed (%)'),
@@ -97,7 +97,7 @@ class account_analytic_plan_instance(osv.osv):
9797
_name = "account.analytic.plan.instance"
9898
_description = "Analytic Plan Instance"
9999
_columns = {
100-
'name': fields.char('Analytic Distribution', size=64),
100+
'name': fields.char('Analytic Distribution'),
101101
'code': fields.char('Distribution Code', size=16),
102102
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal' ),
103103
'account_ids': fields.one2many('account.analytic.plan.instance.line', 'plan_id', 'Account Id'),

0 commit comments

Comments
 (0)