From 40fd0a1b096696fd70d23d2b4603eeb5b092c73d Mon Sep 17 00:00:00 2001 From: vra Date: Tue, 10 Nov 2009 18:16:31 +0530 Subject: [PATCH 01/59] merge multi_company_currency,multi_company_sequence modules. bzr revid: vra@tinyerp.com-20091110124631-awfw0jb10bzo945j --- bin/addons/base/base_update.xml | 4 ++++ bin/addons/base/ir/ir.xml | 2 ++ bin/addons/base/ir/ir_sequence.py | 1 + bin/addons/base/res/res_company.py | 1 + bin/addons/base/res/res_currency.py | 15 +++++++++++++++ bin/addons/base/res/res_currency_view.xml | 19 ++++++++++++------- 6 files changed, 35 insertions(+), 7 deletions(-) diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml index 3fbd24bf886..b26b4ecdcdc 100644 --- a/bin/addons/base/base_update.xml +++ b/bin/addons/base/base_update.xml @@ -128,6 +128,7 @@ + @@ -168,6 +169,9 @@ + + + diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml index f08f023206d..c252cc4ab64 100644 --- a/bin/addons/base/ir/ir.xml +++ b/bin/addons/base/ir/ir.xml @@ -105,6 +105,7 @@ + @@ -148,6 +149,7 @@ + diff --git a/bin/addons/base/ir/ir_sequence.py b/bin/addons/base/ir/ir_sequence.py index aa1a498d66b..c0d23602f40 100644 --- a/bin/addons/base/ir/ir_sequence.py +++ b/bin/addons/base/ir/ir_sequence.py @@ -46,6 +46,7 @@ class ir_sequence(osv.osv): 'number_next': fields.integer('Next Number', required=True), 'number_increment': fields.integer('Increment Number', required=True), 'padding' : fields.integer('Number padding', required=True), + 'company_id' : fields.many2one('res.company', 'Company'), } _defaults = { 'active': lambda *a: True, diff --git a/bin/addons/base/res/res_company.py b/bin/addons/base/res/res_company.py index 1a0b4fe9a4a..64ca3096179 100644 --- a/bin/addons/base/res/res_company.py +++ b/bin/addons/base/res/res_company.py @@ -38,6 +38,7 @@ class res_company(osv.osv): 'rml_header2' : fields.text('RML Internal Header'), 'logo' : fields.binary('Logo'), 'currency_id': fields.many2one('res.currency', 'Currency', required=True), + 'currency_ids': fields.one2many('res.currency', 'company_id', 'Currency') } def _get_child_ids(self, cr, uid, uid2, context={}): diff --git a/bin/addons/base/res/res_currency.py b/bin/addons/base/res/res_currency.py index 029ea838da0..ecec7162316 100644 --- a/bin/addons/base/res/res_currency.py +++ b/bin/addons/base/res/res_currency.py @@ -57,12 +57,27 @@ class res_currency(osv.osv): 'accuracy': fields.integer('Computational Accuracy'), 'rounding': fields.float('Rounding factor', digits=(12,6)), 'active': fields.boolean('Active'), + 'company_id':fields.many2one('res.company', 'Company'), + 'date': fields.date('Date'), + 'base': fields.boolean('Base') + } _defaults = { 'active': lambda *a: 1, } _order = "code" + def read(self, cr, user, ids, fields=None, context=None, load='_classic_read'): + res=super(osv.osv, self).read(cr, user, ids, fields, context, load) + for r in res: + if r.__contains__('rate_ids'): + rates=r['rate_ids'] + if rates: + currency_rate_obj=self.pool.get('res.currency.rate') + currency_date=currency_rate_obj.read(cr,user,rates[0],['name'])['name'] + r['date']=currency_date + return res + def round(self, cr, uid, currency, amount): if currency.rounding == 0: return 0.0 diff --git a/bin/addons/base/res/res_currency_view.xml b/bin/addons/base/res/res_currency_view.xml index 476d797e98e..f68fe20f447 100644 --- a/bin/addons/base/res/res_currency_view.xml +++ b/bin/addons/base/res/res_currency_view.xml @@ -8,12 +8,15 @@ tree - - - - - - + + + + + + + + + @@ -24,12 +27,14 @@
+ - + + From 80861660c6fd598c29b3cf6bb044490f2b1feec9 Mon Sep 17 00:00:00 2001 From: vra Date: Tue, 10 Nov 2009 18:19:20 +0530 Subject: [PATCH 02/59] merge multi_company, multi_company_account, multi_company_hr_timesheet_sheet, multi_company_product, multi_company_project, multi_company_purchase modules. bzr revid: vra@tinyerp.com-20091110124920-qho0im1rrx3mf4sf --- addons/account/__terp__.py | 3 +- addons/account/account.py | 15 +- addons/account/account_demo.xml | 13 ++ addons/account/account_invoice_view.xml | 13 +- addons/account/account_move_line.py | 2 + addons/account/account_view.xml | 9 +- addons/account/demo/multi_company_demo.xml | 34 ++++ addons/account/invoice.py | 149 +++++++++++++++++- addons/account/project/project.py | 2 + addons/account/project/project_view.xml | 1 + addons/account/security/account_security.xml | 145 +++++++++++++++++ addons/account/wizard/wizard_journal.py | 3 +- addons/account_budget/__terp__.py | 1 + addons/account_budget/crossovered_budget.py | 4 +- .../crossovered_budget_view.xml | 2 + .../security/account_budget_security.xml | 19 +++ addons/hr_timesheet_sheet/__terp__.py | 1 + .../hr_timesheet_sheet/hr_timesheet_sheet.py | 2 + .../hr_timesheet_sheet_view.xml | 2 +- .../security/hr_timesheet_data.xml | 18 +++ addons/product/product.py | 106 +++++++++++++ addons/product/product_view.xml | 61 +++++++ addons/project/project.py | 8 +- addons/project/project_view.xml | 2 + addons/project/security/project_security.xml | 24 +++ addons/purchase/purchase.py | 3 +- addons/purchase/purchase_view.xml | 2 + 27 files changed, 623 insertions(+), 21 deletions(-) create mode 100644 addons/account/demo/multi_company_demo.xml create mode 100644 addons/account_budget/security/account_budget_security.xml create mode 100644 addons/hr_timesheet_sheet/security/hr_timesheet_data.xml diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index 130e094d8be..fc4c16319ff 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -64,7 +64,8 @@ 'project/project_demo.xml', 'project/analytic_account_demo.xml', 'demo/account_minimal.xml', - 'account_unit_test.xml' + 'account_unit_test.xml', + 'demo/multi_company_demo.xml', ], 'installable': True, 'active': False, diff --git a/addons/account/account.py b/addons/account/account.py index 1c45b6cd415..a67bb002d35 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -478,7 +478,8 @@ class account_journal(osv.osv): 'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'), 'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'), 'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want new account moves to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation.'), - 'company_id': fields.related('default_credit_account_id','company_id',type='many2one', relation="res.company", string="Company"), + #'company_id': fields.related('default_credit_account_id','company_id',type='many2one', relation="res.company", string="Company"), + 'company_id': fields.many2one('res.company', 'Company', required=True,select=1), 'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \ help="The sequence used for invoice numbers in this journal."), } @@ -486,6 +487,7 @@ class account_journal(osv.osv): _defaults = { 'active': lambda *a: 1, 'user_id': lambda self,cr,uid,context: uid, + 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } def create(self, cr, uid, vals, context={}): journal_id = super(account_journal, self).create(cr, uid, vals, context) @@ -520,7 +522,7 @@ class account_fiscalyear(osv.osv): 'name': fields.char('Fiscal Year', size=64, required=True), 'code': fields.char('Code', size=6, required=True), 'company_id': fields.many2one('res.company', 'Company', - help="Keep empty if the fiscal year belongs to several companies."), + help="Keep empty if the fiscal year belongs to several companies.", required=True), 'date_start': fields.date('Start Date', required=True), 'date_stop': fields.date('End Date', required=True), 'period_ids': fields.one2many('account.period', 'fiscalyear_id', 'Periods'), @@ -529,6 +531,7 @@ class account_fiscalyear(osv.osv): _defaults = { 'state': lambda *a: 'draft', + 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } _order = "date_start" @@ -587,10 +590,12 @@ class account_period(osv.osv): '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), - 'state': fields.selection([('draft','Draft'), ('done','Done')], 'Status', readonly=True) + 'state': fields.selection([('draft','Draft'), ('done','Done')], 'Status', readonly=True), + 'company_id': fields.many2one('res.company', 'Company', required=True) } _defaults = { 'state': lambda *a: 'draft', + 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } _order = "date_start" @@ -671,6 +676,7 @@ class account_journal_period(osv.osv): 'active': fields.boolean('Active', required=True), 'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'Status', required=True, readonly=True), 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'), + 'company_id' : fields.many2one('res.company', 'Company') } def _check(self, cr, uid, ids, context={}): @@ -699,6 +705,7 @@ class account_journal_period(osv.osv): _defaults = { 'state': lambda *a: 'draft', 'active': lambda *a: True, + 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } _order = "period_id" @@ -770,6 +777,7 @@ class account_move(osv.osv): ('journal_pur_voucher','Journal Purchase'), ('journal_voucher','Journal Voucher'), ],'Type', readonly=True, select=True, states={'draft':[('readonly',False)]}), + 'company_id': fields.many2one('res.company', 'Company', required=True), } _defaults = { 'name': lambda *a: '/', @@ -777,6 +785,7 @@ class account_move(osv.osv): 'period_id': _get_period, 'type' : lambda *a : 'journal_voucher', 'date': lambda *a:time.strftime('%Y-%m-%d'), + 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } def _check_centralisation(self, cursor, user, ids): diff --git a/addons/account/account_demo.xml b/addons/account/account_demo.xml index c2bc9bdc1f4..0b4ee8f097d 100644 --- a/addons/account/account_demo.xml +++ b/addons/account/account_demo.xml @@ -11,6 +11,7 @@ + @@ -157,16 +155,15 @@ id="menu_action_payments_voucher_list" action="action_payments_voucher_list"/> - Payment Vouchers + Cash Payment Vouchers account.voucher form tree,form [('type','=','pay_voucher')] {'type':'pay_voucher'} + - Cash Payment Voucher @@ -177,19 +174,18 @@ [('type','=','pay_voucher')] {'type':'pay_voucher'} - + - Payment Vouchers + Bank Payment Vouchers account.voucher form tree,form [('type','=','bank_pay_voucher')] {'type':'bank_pay_voucher'} + - Bank Payment Voucher @@ -200,7 +196,7 @@ [('type','=','bank_pay_voucher')] {'type':'bank_pay_voucher'} - + diff --git a/addons/auction/auction_view.xml b/addons/auction/auction_view.xml index 39217968ef7..80aa0f69bad 100644 --- a/addons/auction/auction_view.xml +++ b/addons/auction/auction_view.xml @@ -138,8 +138,8 @@ form [('state','=','closed')] + - auction.dates @@ -366,6 +366,7 @@ + Sold Objects auction.lots form [('state','=','sold')] @@ -375,26 +376,23 @@ - - + Objects to sell auction.lots form tree,form [('state','<>','sold')] - + Unplanned objects auction.lots form tree,form [('auction_id','=', False),('state','=','draft')] - - @@ -405,14 +403,6 @@ [('state','=','unsold')] - - - @@ -486,7 +476,6 @@ tree,form - Auction.deposit.tree @@ -501,8 +490,6 @@ - - auction.deposit.form auction.deposit diff --git a/addons/audittrail/audittrail_view.xml b/addons/audittrail/audittrail_view.xml index 076e5ef830e..98a4ecc00e9 100644 --- a/addons/audittrail/audittrail_view.xml +++ b/addons/audittrail/audittrail_view.xml @@ -53,13 +53,13 @@ - Rules + Subscribed Rules audittrail.rule form tree,form [('state','=','subscribed')] + - audittrail.log.form diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index 80a08c87fc2..f9f1614ce69 100755 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -481,7 +481,6 @@ [('state','<>','done'),('state','<>','cancel'),('state','<>','pending')] - My cases @@ -500,7 +499,6 @@ [('user_id','=',uid),('state','<>','done'),('state','<>','cancel'),('state','<>','pending')] - crm.case.section.open diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index d05aa480367..2c83fef3ec6 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -168,7 +168,6 @@ {'contact_display': 'partner'} - Generate Draft Invoices On Receptions diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml index 1df91d87cbc..06164b44bcb 100644 --- a/addons/event/event_view.xml +++ b/addons/event/event_view.xml @@ -146,10 +146,7 @@ [('state','=','draft')] - + Confirmed Events ir.actions.act_window @@ -157,10 +154,6 @@ [('state','=','confirm')] - - @@ -304,10 +297,7 @@ tree,form - + Confirmed Registrations event.registration @@ -315,11 +305,6 @@ [('state','in',('open','done'))] - - diff --git a/addons/hr_holidays/hr_view.xml b/addons/hr_holidays/hr_view.xml index 3b87ba5a29a..911b6c4a54a 100644 --- a/addons/hr_holidays/hr_view.xml +++ b/addons/hr_holidays/hr_view.xml @@ -266,8 +266,6 @@ - - My Awaiting Confirmation Leave Requests ir.actions.act_window @@ -278,7 +276,6 @@ - My Validated Leave Requests @@ -290,7 +287,6 @@ - My Refused Leave Requests @@ -302,8 +298,6 @@ - - My Department's Leave Requests @@ -328,8 +322,6 @@ - - @@ -342,7 +334,6 @@ - diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml index 25b4a13c541..49ba1d602ad 100644 --- a/addons/hr_timesheet/hr_timesheet_view.xml +++ b/addons/hr_timesheet/hr_timesheet_view.xml @@ -83,7 +83,6 @@ - @@ -110,7 +109,6 @@ - hr.timesheet.employee.extd_form diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml index c2e4877a7bd..c363a4172e5 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml @@ -108,18 +108,14 @@ - - Uninvoiced Entries account.analytic.line form tree,form [('invoice_id','=',False),('to_invoice','!=',False)] + - - - My Uninvoiced Entries @@ -127,9 +123,8 @@ form tree,form [('invoice_id','=',False),('to_invoice','!=',False),('user_id','=',uid)] + - - Open Analytic Accounts @@ -138,8 +133,6 @@ tree,form [('state','<>','close'),('type','<>','view')] - - Unclosed Invoiceable Accounts @@ -148,9 +141,6 @@ tree,form [('state','<>','close'),('type','<>','view'),('pricelist_id','<>',False)] - - - Draft Analytic Accounts @@ -159,9 +149,6 @@ tree,form [('state','=','draft'),('type','<>','view')] - - - Pending Analytic Accounts @@ -170,11 +157,6 @@ tree,form [('state','=','pending'),('type','<>','view')] - - - - - hr_timesheet_invoice.factor.form diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index 7c54db176b1..0bc345324a0 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -224,7 +224,6 @@ - My Department's Timesheets @@ -248,7 +247,6 @@ - My Department's Timesheets to Validate @@ -260,7 +258,6 @@ - @@ -276,7 +273,6 @@ - Timesheets To Validate @@ -288,7 +284,6 @@ - @@ -163,6 +160,7 @@ Free members res.partner [('membership_state', '=', 'free')] + @@ -178,13 +176,6 @@ - - - - - associate members @@ -205,6 +196,7 @@ Associated members res.partner [('associate_member', '!=', False), ('membership_state', '!=', 'none')] + @@ -220,10 +212,6 @@ - - @@ -231,6 +219,7 @@ Invoiced members res.partner [('membership_state', '=', 'invoiced')] + @@ -246,10 +235,6 @@ - - diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index b180dbcb076..b617d11afb2 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -557,11 +557,6 @@ gantt,tree,form,calendar,graph [('state','in',('ready','confirmed','in_production'))] - Production Orders To Start @@ -573,7 +568,7 @@ - + Production Orders in Progress ir.actions.act_window @@ -584,7 +579,7 @@ - + Production Orders Waiting Products ir.actions.act_window @@ -595,7 +590,6 @@ - New Production Order @@ -604,7 +598,6 @@ form form,tree,calendar,graph,gantt - mrp.production.lot.line.form @@ -783,7 +776,6 @@ tree,form [('state','=','confirmed')] - Exceptions Procurements @@ -793,7 +785,6 @@ tree,form [('state','=','exception')] - Exceptions Procurements to Fix @@ -804,7 +795,6 @@ [('state','=','exception'), ('message', '<>', '')] - Temporary Procurement Exceptions @@ -814,7 +804,6 @@ tree,form [('state','=','exception'), ('message', '=', '')] - New Procurement @@ -823,7 +812,6 @@ form form,tree - diff --git a/addons/mrp/process/stockable_product_process.xml b/addons/mrp/process/stockable_product_process.xml index 34ff93d3228..a90c3e95a00 100644 --- a/addons/mrp/process/stockable_product_process.xml +++ b/addons/mrp/process/stockable_product_process.xml @@ -39,7 +39,7 @@ - + diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml index 7341c31c8d5..2176afc0cee 100644 --- a/addons/mrp_operations/mrp_operations_view.xml +++ b/addons/mrp_operations/mrp_operations_view.xml @@ -176,9 +176,6 @@ - - - diff --git a/addons/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml index cd73b312fd9..6ee19b291d2 100644 --- a/addons/mrp_repair/mrp_repair_view.xml +++ b/addons/mrp_repair/mrp_repair_view.xml @@ -191,6 +191,7 @@ form tree,form [('state','=','draft')] + @@ -200,6 +201,7 @@ form tree,form [('state','=','under_repair')] + @@ -209,6 +211,7 @@ form tree,form [('state','!=','draft'),('state','!=','under_repair'),('state','!=','2binvoiced'),('state','!=','invoice_except'),('state','!=','done'),('state','!=','cancel'),] + @@ -218,20 +221,10 @@ form tree,form [('state','=','2binvoiced')] + - - - - - - - - - - - diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml index ddd8c7c4bee..8390d25186e 100644 --- a/addons/point_of_sale/pos_view.xml +++ b/addons/point_of_sale/pos_view.xml @@ -141,7 +141,7 @@ - + --> - Point of Sale + Orders of the day ir.actions.act_window pos.order form tree,form + [('date_order','>=',time.strftime('%Y-%m-%d')),('date_order','<=',time.strftime('%Y-%m-%d'))] - - - Point of Sale + All orders ir.actions.act_window pos.order form tree,form + - - Sale lines @@ -235,15 +233,15 @@ - Sale line + POS Lines of the day ir.actions.act_window pos.order.line form tree + [('create_date', '>=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '<=', time.strftime('%Y-%m-%d 23:59:59'))] - diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 22ecbfb7088..d837af47d97 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -163,7 +163,6 @@ - Templates of Projects @@ -248,11 +247,6 @@ - Projects Structure @@ -564,7 +558,6 @@ - My Current Tasks @@ -577,7 +570,6 @@ - My Tasks in Progress @@ -589,7 +581,6 @@ - My Draft Tasks @@ -601,7 +592,6 @@ - My Department's Pending Tasks @@ -613,7 +603,6 @@ - My Department's Current Tasks @@ -625,7 +614,6 @@ - My Department's Tasks in Progress @@ -636,7 +624,6 @@ - My Department's Draft Tasks @@ -647,7 +634,6 @@ - Overpassed Tasks @@ -675,7 +661,6 @@ [('state','=','open')] - Unassigned Tasks @@ -686,7 +671,6 @@ - diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml index d266cb310bd..aacb501d37a 100755 --- a/addons/purchase/process/purchase_process.xml +++ b/addons/purchase/process/purchase_process.xml @@ -17,7 +17,7 @@ --> - + @@ -40,7 +40,7 @@ - + @@ -51,7 +51,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -119,7 +119,7 @@ - + diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index bcda8944bd0..eabcd08786d 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -151,7 +151,6 @@ - Purchase Order Waiting Approval @@ -163,7 +162,6 @@ - Purchase Orders in Progress @@ -175,7 +173,6 @@ - New Purchase Order @@ -183,7 +180,6 @@ purchase.order form,tree - diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml index eb2d9f65ef3..c763cb50a67 100755 --- a/addons/sale/process/sale_process.xml +++ b/addons/sale/process/sale_process.xml @@ -41,7 +41,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -75,7 +75,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -109,7 +109,7 @@ - + diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 092163d8cf1..4f31ec0e132 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -258,7 +258,7 @@ form tree,form,calendar,graph [('user_id','=',uid)] - + @@ -268,7 +268,7 @@ sale.order form tree,form,calendar,graph - + @@ -292,7 +292,6 @@ - Sales Order To Be Invoiced @@ -304,7 +303,6 @@ - Sales Order in Progress @@ -315,7 +313,6 @@ [('state','in',('progress','waiting_date','manual'))] - @@ -327,7 +324,6 @@ [('state','=','draft')] - My sales in shipping exception @@ -338,7 +334,6 @@ [('state','in',('shipping_except','invoice_except')),('user_id','=',uid)] - My sales order waiting Invoice @@ -349,7 +344,6 @@ [('state','=','manual'),('user_id','=',uid)] - My sales order in progress @@ -360,7 +354,6 @@ [('state','in',('progress','waiting_date','manual')),('user_id','=',uid)] - My Quotations @@ -371,7 +364,6 @@ [('state','=','draft'),('user_id','=',uid)] - Old Quotations @@ -505,7 +497,6 @@ [('invoiced','<>', 1),('state','<>','draft'),('state','<>','cancel')] - Uninvoiced and Delivered Lines @@ -516,7 +507,6 @@ [('invoiced','<>', 1),('state','=','done')] - diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml index c2f0aa34581..08aa9f8fa40 100644 --- a/addons/sale_journal/sale_journal_view.xml +++ b/addons/sale_journal/sale_journal_view.xml @@ -314,8 +314,7 @@ - - + sale_journal.sale.stats @@ -324,8 +323,7 @@ tree,form - - + [('state','=','draft')] - Opened Backlogs @@ -136,7 +135,6 @@ [('state','=','open')] - @@ -172,9 +170,7 @@ [('review','=',True)] - - + wiki.wiki.history.tree wiki.wiki.history From c18f4e30f7744ae8641121014663bee7bfd7b65f Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Mon, 23 Nov 2009 19:11:22 +0530 Subject: [PATCH 09/59] [FIX]: Small Change bzr revid: uco@tinyerp.co.in-20091123134122-9d36120dn6ehhtdz --- addons/mrp/process/procurement_process.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index 0986e37387c..de942d7e75f 100755 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -88,7 +88,7 @@ - + @@ -198,7 +198,7 @@ - + From 47a820f7a1a5c8797e3ea763f27d69b5bc7de5ac Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Mon, 23 Nov 2009 19:22:38 +0530 Subject: [PATCH 10/59] [ADD]: Added tooltips for all state fields. bzr revid: uco@tinyerp.co.in-20091123135238-oadv1oyefpsi9631 --- addons/account/account.py | 14 +++++++++----- addons/account/account_bank_statement.py | 3 ++- addons/account/account_move_line.py | 3 ++- .../account/process/customer_invoice_process.xml | 2 +- addons/account/project/project.py | 4 +++- addons/account_payment/payment.py | 3 ++- addons/auction/auction.py | 13 +++++++------ addons/base_report_creator/base_report_creator.py | 2 +- addons/crm/crm.py | 4 +++- addons/crm/crm_segmentation.py | 2 +- addons/event/event.py | 4 +++- addons/hr_expense/hr_expense.py | 3 ++- addons/hr_holidays/hr.py | 3 ++- .../hr_timesheet_invoice_view.xml | 2 +- addons/idea/idea.py | 4 +++- addons/mrp/mrp.py | 10 +++++++--- addons/mrp_operations/mrp_operations.py | 2 +- addons/mrp_repair/mrp_repair.py | 2 +- addons/product/product.py | 2 +- addons/project/project.py | 8 ++++++-- addons/purchase/purchase.py | 2 +- addons/purchase_manual/purchase_manual.py | 2 +- addons/sale/sale.py | 2 +- addons/scrum/scrum.py | 4 ++-- addons/stock/stock.py | 10 +++++++--- addons/subscription/subscription.py | 2 +- 26 files changed, 71 insertions(+), 41 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 1c45b6cd415..f9ec8763fc5 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -524,7 +524,8 @@ class account_fiscalyear(osv.osv): 'date_start': fields.date('Start Date', required=True), 'date_stop': fields.date('End Date', required=True), 'period_ids': fields.one2many('account.period', 'fiscalyear_id', 'Periods'), - 'state': fields.selection([('draft','Draft'), ('done','Done')], 'Status', readonly=True), + 'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True, + help='When fiscal year is created. The state is \'Draft\'. At the end of the year it is in \'Done\' state.'), } _defaults = { @@ -587,7 +588,8 @@ class account_period(osv.osv): '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), - 'state': fields.selection([('draft','Draft'), ('done','Done')], 'Status', readonly=True) + 'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True, + help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'), } _defaults = { 'state': lambda *a: 'draft', @@ -669,7 +671,8 @@ class account_journal_period(osv.osv): 'period_id': fields.many2one('account.period', 'Period', required=True, ondelete="cascade"), 'icon': fields.function(_icon_get, method=True, string='Icon', type='char', size=32), 'active': fields.boolean('Active', required=True), - 'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'Status', required=True, readonly=True), + 'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True, + help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'), 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'), } @@ -754,7 +757,8 @@ class account_move(osv.osv): 'ref': fields.char('Ref', size=64), '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','Draft'), ('posted','Posted')], 'Status', required=True, readonly=True), + 'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State', required=True, readonly=True, + help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Valid\' state.'), 'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}), 'to_check': fields.boolean('To Be Verified'), 'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"), @@ -1604,7 +1608,7 @@ class account_subscription(osv.osv): 'period_total': fields.integer('Number of Periods', required=True), 'period_nbr': fields.integer('Period', required=True), 'period_type': fields.selection([('day','days'),('month','month'),('year','year')], 'Period Type', required=True), - 'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'Status', required=True, readonly=True), + 'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'State', required=True, readonly=True), 'lines_id': fields.one2many('account.subscription.line', 'subscription_id', 'Subscription Lines') } diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 2d6c725fcc0..a0af45ad069 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -126,7 +126,8 @@ class account_bank_statement(osv.osv): 'Entry lines', states={'confirm':[('readonly',True)]}), 'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirmed')], 'State', required=True, - states={'confirm': [('readonly', True)]}, readonly="1"), + states={'confirm': [('readonly', True)]}, readonly="1", + help='When new statement is created the state will be \'Draft\'. And after getting confirmation from the bank it will be in \'Confirmed\' state.'), 'currency': fields.function(_currency, method=True, string='Currency', type='many2one', relation='res.currency'), } diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 1d0cdb95008..3664dd58cea 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -377,7 +377,8 @@ class account_move_line(osv.osv): 'analytic_lines': fields.one2many('account.analytic.line', 'move_id', 'Analytic lines'), 'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation')], 'Centralisation', size=6), 'balance': fields.function(_balance, fnct_search=_balance_search, method=True, string='Balance'), - 'state': fields.selection([('draft','Draft'), ('valid','Valid')], 'Status', readonly=True), + 'state': fields.selection([('draft','Draft'), ('valid','Valid')], 'State', readonly=True, + help='When new move line is created the state will be \'Draft\'. When all the payments are done it will be in \'Valid\' state.'), 'tax_code_id': fields.many2one('account.tax.code', 'Tax Account', help="The Account can either be a base tax code or tax code account."), 'tax_amount': fields.float('Tax/Base Amount', digits=(16,int(tools.config['price_accuracy'])), select=True, help="If the Tax account is tax code account, this field will contain the taxed amount.If the tax account is base tax code,\ this field will contain the basic amount(without tax)."), diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml index 31d79a29971..29506429486 100755 --- a/addons/account/process/customer_invoice_process.xml +++ b/addons/account/process/customer_invoice_process.xml @@ -28,7 +28,7 @@ - + diff --git a/addons/account/project/project.py b/addons/account/project/project.py index f86a246f3d8..474e8dc5e8b 100644 --- a/addons/account/project/project.py +++ b/addons/account/project/project.py @@ -189,7 +189,9 @@ class account_analytic_account(osv.osv): 'date': fields.date('Date End'), 'company_id': fields.many2one('res.company', 'Company', required=True), 'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Currency'), - 'state': fields.selection([('draft','Draft'), ('open','Open'), ('pending','Pending'), ('close','Close'),], 'State', required=True), + 'state': fields.selection([('draft','Draft'), ('open','Open'), ('pending','Pending'), ('close','Close'),], 'State', required=True, + help='When an account is created its in \'Draft\' state. If any associated partner is there, it can be in \'Open\' state.\ + If any pending balance is there it can be in \'Pending\'. And finally when all the transactions are over, it can be in \'Close\' state.'), } def _default_company(self, cr, uid, context={}): diff --git a/addons/account_payment/payment.py b/addons/account_payment/payment.py index 1b3392564bf..27a42de5a31 100644 --- a/addons/account_payment/payment.py +++ b/addons/account_payment/payment.py @@ -100,7 +100,8 @@ class payment_order(osv.osv): ('draft', 'Draft'), ('open','Confirmed'), ('cancel','Cancelled'), - ('done','Done')], 'State', select=True), + ('done','Done')], 'State', select=True, + help='When an order is placed the state is \'Draft\'. Once the bank is confirmed the state is set to \'Confirmed\'. Then the order is paid the state is \'Done\'.'), 'line_ids': fields.one2many('payment.line','order_id','Payment lines',states={'done':[('readonly',True)]}), 'total': fields.function(_total, string="Total", method=True, type='float'), diff --git a/addons/auction/auction.py b/addons/auction/auction.py index 0c275578180..b09b1e9288f 100644 --- a/addons/auction/auction.py +++ b/addons/auction/auction.py @@ -75,7 +75,8 @@ class auction_dates(osv.osv): 'acc_income': fields.many2one('account.account', 'Income Account', required=True), 'acc_expense': fields.many2one('account.account', 'Expense Account', required=True), 'adj_total': fields.function(_adjudication_get, method=True, string='Total Adjudication',store=True), - 'state': fields.selection((('draft','Draft'),('closed','Closed')),'Status',select=1, readonly=True), + 'state': fields.selection((('draft','Draft'),('closed','Closed')),'State',select=1, readonly=True, + help='When auction starts the state is \'Draft\'. At the end of auction, the state becomes \'Closed\'.'), 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True), } @@ -442,7 +443,7 @@ class auction_lots(osv.osv): # 'paid_vnd':fields.function(_is_paid_vnd,string='Seller Paid',method=True,type='boolean',store=True), 'paid_vnd':fields.boolean('Seller Paid'), 'paid_ach':fields.function(_is_paid_ach,string='Buyer invoice reconciled',method=True, type='boolean',store=True), - 'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold'),('taken_away','Taken away')),'Status', required=True, readonly=True), + 'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold'),('taken_away','Taken away')),'State', required=True, readonly=True), 'buyer_price': fields.function(_buyerprice, method=True, string='Buyer price',store=True), 'seller_price': fields.function(_sellerprice, method=True, string='Seller price',store=True), 'gross_revenue':fields.function(_grossprice, method=True, string='Gross revenue',store=True), @@ -989,7 +990,7 @@ class report_seller_auction(osv.osv): 'avg_price':fields.float('Avg adjudication',readonly=True), 'avg_estimation':fields.float('Avg estimation',readonly=True), 'date': fields.date('Create Date', required=True, select=1), - 'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('sold','Sold')),'Status',readonly=True, select=1) + 'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('sold','Sold')),'State',readonly=True, select=1) } def init(self, cr): @@ -1199,7 +1200,7 @@ class report_auction_adjudication(osv.osv): _auto = False _columns = { 'name': fields.many2one('auction.dates','Auction date',readonly=True,select=1), - 'state': fields.selection((('draft','Draft'),('close','Closed')),'Status', select=1), + 'state': fields.selection((('draft','Draft'),('close','Closed')),'State', select=1), 'adj_total': fields.float('Total Adjudication'), 'date': fields.date('Date', readonly=True,select=1), 'user_id':fields.many2one('res.users', 'User',select=1) @@ -1305,7 +1306,7 @@ class report_object_encoded(osv.osv): _description = "Object encoded" _auto = False _columns = { - 'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('invoiced','Invoiced')),'Status', required=True,select=1), + 'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('invoiced','Invoiced')),'State', required=True,select=1), 'user_id':fields.many2one('res.users', 'User', select=1), 'estimation': fields.float('Estimation',select=2), 'date': fields.date('Create Date', required=True), @@ -1375,7 +1376,7 @@ class report_unclassified_objects(osv.osv): 'obj_num': fields.integer('Catalog Number'), 'obj_price': fields.float('Adjudication price'), 'lot_num': fields.integer('List Number', required=True, select=1 ), - 'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold')),'Status', required=True, readonly=True), + 'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold')),'State', required=True, readonly=True), 'obj_comm': fields.boolean('Commission'), 'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True), 'ach_login': fields.char('Buyer Username',size=64), diff --git a/addons/base_report_creator/base_report_creator.py b/addons/base_report_creator/base_report_creator.py index 1e65daedea0..326f09cfe90 100644 --- a/addons/base_report_creator/base_report_creator.py +++ b/addons/base_report_creator/base_report_creator.py @@ -314,7 +314,7 @@ class report_creator(osv.osv): 'model_ids': fields.many2many('ir.model', 'base_report_creator_report_model_rel', 'report_id','model_id', 'Reported Objects'), 'field_ids': fields.one2many('base_report_creator.report.fields', 'report_id', 'Fields to Display'), 'filter_ids': fields.one2many('base_report_creator.report.filter', 'report_id', 'Filters'), - 'state': fields.selection([('draft','Draft'),('valid','Valid')], 'Status', required=True), + 'state': fields.selection([('draft','Draft'),('valid','Valid')], 'State', required=True), 'sql_query': fields.function(_sql_query_get, method=True, type="text", string='SQL Query', store=True), 'group_ids': fields.many2many('res.groups', 'base_report_creator_group_rel','report_id','group_id','Authorized Groups'), } diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 603b17a1aa6..7236930ac44 100755 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -511,7 +511,9 @@ class crm_case(osv.osv): 'user_id': fields.many2one('res.users', 'Responsible'), 'history_line': fields.one2many('crm.case.history', 'case_id', 'Communication', readonly=1), 'log_ids': fields.one2many('crm.case.log', 'case_id', 'Logs History', readonly=1), - 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True), + 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True, + help='The state is set to \'Draft\', when a case is created. If the case is in progress the state is set to \'Open\'.\ + When the case is over, the state is set to \'Done\'. If the case needs to be reviewed then the state is set to \'Pending\'.'), 'ref' : fields.reference('Reference', selection=_links_get, size=128), 'ref2' : fields.reference('Reference 2', selection=_links_get, size=128), diff --git a/addons/crm/crm_segmentation.py b/addons/crm/crm_segmentation.py index ef181f70221..5457cd8a6dd 100644 --- a/addons/crm/crm_segmentation.py +++ b/addons/crm/crm_segmentation.py @@ -36,7 +36,7 @@ class crm_segmentation(osv.osv): 'description': fields.text('Description'), 'categ_id': fields.many2one('res.partner.category', 'Partner Category', required=True, help='The partner category that will be added to partners that match the segmentation criterions after computation.'), 'exclusif': fields.boolean('Exclusive', help='Check if the category is limited to partners that match the segmentation criterions. If checked, remove the category from partners that doesn\'t match segmentation criterions'), - 'state': fields.selection([('not running','Not Running'),('running','Running')], 'Execution Status', readonly=True), + 'state': fields.selection([('not running','Not Running'),('running','Running')], 'Execution State', readonly=True), 'partner_id': fields.integer('Max Partner ID processed'), 'segmentation_line': fields.one2many('crm.segmentation.line', 'segmentation_id', 'Criteria', required=True), 'som_interval': fields.integer('Days per Periode', help="A period is the average number of days between two cycle of sale or purchase for this segmentation. It's mainly used to detect if a partner has not purchased or buy for a too long time, so we suppose that his state of mind has decreased because he probably bought goods to another supplier. Use this functionality for recurring businesses."), diff --git a/addons/event/event.py b/addons/event/event.py index e3595987c7d..e2e19212393 100644 --- a/addons/event/event.py +++ b/addons/event/event.py @@ -130,7 +130,9 @@ class event(osv.osv): 'register_prospect': fields.function(_get_prospect, method=True, string='Unconfirmed Registrations'), 'date_begin': fields.datetime('Beginning date', required=True), 'date_end': fields.datetime('Ending date', required=True), - 'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Cancelled')], 'Status', readonly=True, required=True), + 'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Cancelled')], 'State', readonly=True, required=True, + help='If event is created, the state is \'Draft\'. If event is confirmed for the particular dates the state is set to \'Confirmed\'.\ + If the event is over, the state is set to \'Done\'. If event is cancelled the state is set to \'Cancelled\'.'), 'mail_auto_registr':fields.boolean('Mail Auto Register',help='Check this box if you want to use the automatic mailing for new registration'), 'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='Check this box if you want ot use the automatic confirmation emailing or the reminder'), 'mail_registr':fields.text('Registration Email',help='This email will be sent when someone subscribes to the event.'), diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index dd9c4e44aba..a9f4c5fbd70 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -77,7 +77,8 @@ class hr_expense_expense(osv.osv): ('invoiced', 'Invoiced'), ('paid', 'Reimbursed'), ('cancelled', 'Cancelled')], - 'State', readonly=True), + 'State', readonly=True, help='When the expense request is created the state is \'Draft\'. It is confirmed by the user and request is sent to admin, the state is \'Waiting Confirmation\'.\ + If the admin accepts it, the state is \'Accepted\'. If an invoice is made for the expense request, the state is \'Invoiced\'. If the expense is paid to user, the state is \'Reimbursed\'.'), } _defaults = { 'date' : lambda *a: time.strftime('%Y-%m-%d'), diff --git a/addons/hr_holidays/hr.py b/addons/hr_holidays/hr.py index 0d638d67a08..68fc6b7ccbb 100644 --- a/addons/hr_holidays/hr.py +++ b/addons/hr_holidays/hr.py @@ -96,7 +96,8 @@ class hr_holidays(osv.osv): _columns = { 'name' : fields.char('Description', required=True, readonly=True, size=64, states={'draft':[('readonly',False)]}), - 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate', 'Validated'), ('cancel', 'Cancelled')], 'Status', readonly=True), + 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Validation'), ('refuse', 'Refused'), ('validate', 'Validated'), ('cancel', 'Cancelled')], 'State', readonly=True, help='When the holiday request is created the state is \'Draft\'. It is confirmed by the user and request is sent to admin, the state is \'Waiting Validation\'.\ + If the admin accepts it, the state is \'Validated\'. If it is refused, the state is \'Refused\'.'), 'date_from' : fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}), 'user_id':fields.many2one('res.users', 'User', states={'draft':[('readonly',False)]}, select=True, readonly=True), 'date_to' : fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}), diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml index c363a4172e5..4ff5ac27c95 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml @@ -15,7 +15,7 @@ - + diff --git a/addons/idea/idea.py b/addons/idea/idea.py index ad5b29e42e1..45275aa78c3 100644 --- a/addons/idea/idea.py +++ b/addons/idea/idea.py @@ -119,7 +119,9 @@ class idea_idea(osv.osv): 'count_votes' : fields.function(_vote_count, method=True, string="Count of votes", type="integer"), 'count_comments': fields.function(_comment_count, method=True, string="Count of comments", type="integer"), 'category_id': fields.many2one('idea.category', 'Category', required=True ), - 'state': fields.selection([('draft','Draft'),('open','Opened'),('close','Accepted'),('cancel','Cancelled')], 'Status', readonly=True), + 'state': fields.selection([('draft','Draft'),('open','Opened'),('close','Accepted'),('cancel','Cancelled')], 'State', readonly=True, + help='When the Idea is created the state is \'Draft\'. It is opened by the user, the state is \'Opened\'.\ + If the idea is accepted, the state is \'Accepted\'.'), 'stat_vote_ids': fields.one2many('idea.vote.stat', 'idea_id', 'Statistics', readonly=True), } diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 5ba9d487400..65eed59ec10 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -435,8 +435,10 @@ class mrp_production(osv.osv): 'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods'), 'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Workcenters Utilisation'), - 'state': fields.selection([('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'Status', readonly=True), - 'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder'), + 'state': fields.selection([('draft','Draft'),('picking_except', 'Packing Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'State', readonly=True, + help='When the production order is created the state is set to \'Draft\'. If the order is confirmed the state is set to \'Waiting Goods\'. If any exceptions are there, the state is set to \'Packing Exception\'.\ + If the stock is available then the state is set to \'Ready to Produce\'. When the production get started then the state is set to \'In Production\'. When the production is over, the state is set to \'Done\'.'), + 'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder'), 'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder'), 'sale_name': fields.function(_sale_name_calc, method=True, type='char', string='Sale Name'), @@ -820,7 +822,9 @@ class mrp_procurement(osv.osv): ('cancel','Cancel'), ('ready','Ready'), ('done','Done'), - ('waiting','Waiting')], 'Status', required=True), + ('waiting','Waiting')], 'State', required=True, + help='When a procurement is created the state is set to \'Draft\'. If the procurement is confirmed, the state is set to \'Confirmed\'.\ + After confirming the state is set to \'Running\'. If any exception arises in the order then the state is set to \'Exception\'. Once the exception is removed the state becomes \'Ready\'. It is in \'Waiting\'. state when the procurement is waiting for another one to finish.'), 'note' : fields.text('Note'), } _defaults = { diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py index 155ca928077..e446f4a5014 100644 --- a/addons/mrp_operations/mrp_operations.py +++ b/addons/mrp_operations/mrp_operations.py @@ -68,7 +68,7 @@ class mrp_production_workcenter_line(osv.osv): return res _inherit = 'mrp.production.workcenter.line' _columns = { - 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'Status', readonly=True), + 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'State', readonly=True), 'date_start_date': fields.function(_get_date_date, method=True, string='Start Date', type='date'), 'date_planned': fields.related('production_id', 'date_planned', type='datetime', string='Date Planned'), 'date_planned_end': fields.function(_get_date_end, method=True, string='End Date', type='datetime'), diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 48986c3918e..93f671baeaa 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -503,7 +503,7 @@ class mrp_repair_line(osv.osv, ProductChangeMixin): 'location_id': fields.many2one('stock.location', 'Source Location', required=True, select=True), 'location_dest_id': fields.many2one('stock.location', 'Dest. Location', required=True, select=True), 'move_id': fields.many2one('stock.move', 'Inventory Move', readonly=True), - 'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Canceled')], 'Status', required=True, readonly=True), + 'state': fields.selection([('draft','Draft'),('confirmed','Confirmed'),('done','Done'),('cancel','Canceled')], 'State', required=True, readonly=True), } _defaults = { 'state': lambda *a: 'draft', diff --git a/addons/product/product.py b/addons/product/product.py index 509bd61c373..7a497fbe344 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -262,7 +262,7 @@ class product_template(osv.osv): 'warranty': fields.float('Warranty (months)'), 'sale_ok': fields.boolean('Can be sold', help="Determine if the product can be visible in the list of product within a selection from a sale order line."), 'purchase_ok': fields.boolean('Can be Purchased', help="Determine if the product is visible in the list of products within a selection from a purchase order line."), - 'state': fields.selection([('',''),('draft', 'In Development'),('sellable','In Production'),('end','End of Lifecycle'),('obsolete','Obsolete')], 'Status', help="Tells the user if he can use the product or not."), + 'state': fields.selection([('',''),('draft', 'In Development'),('sellable','In Production'),('end','End of Lifecycle'),('obsolete','Obsolete')], 'State', help="Tells the user if he can use the product or not."), 'uom_id': fields.many2one('product.uom', 'Default UoM', required=True, help="Default Unit of Measure used for all stock operation."), 'uom_po_id': fields.many2one('product.uom', 'Purchase UoM', required=True, help="Default Unit of Measure used for purchase orders. It must in the same category than the default unit of measure."), 'uos_id' : fields.many2one('product.uom', 'Unit of Sale', diff --git a/addons/project/project.py b/addons/project/project.py index 96e86b4153c..694c308551c 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -115,7 +115,9 @@ class project(osv.osv): 'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed."), 'notes': fields.text('Notes', help="Internal description of the project."), 'timesheet_id': fields.many2one('hr.timesheet.group', 'Working Time', help="Timetable working hours to adjust the gantt diagram report"), - 'state': fields.selection([('template', 'Template'), ('open', 'Running'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', required=True, readonly=True), + 'state': fields.selection([('template', 'Template'), ('open', 'Running'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', required=True, readonly=True, + help='The project can be in either if the states \'Template\' and \'Running\'. If it is template then we can make projects based on the template projects. If its in \'Running\' state it is a normal project.\ + If it is to be reviewed then the state is \'Pending\'. When the project is completed the state is set to \'Done\'.'), } _defaults = { @@ -278,7 +280,9 @@ class task(osv.osv): 'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'), 'sequence': fields.integer('Sequence'), 'type': fields.many2one('project.task.type', 'Type'), - 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status', readonly=True, required=True), + 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True, + help='If the task is created the state \'Draft\'. If the task is started, the state becomes \'In Progress\'. If review is needed the task is in \'Pending\' state.\ + If the task is over, the states is set to \'Done\'.'), 'date_start': fields.datetime('Starting Date'), 'date_deadline': fields.datetime('Deadline'), 'date_close': fields.datetime('Date Closed', readonly=True), diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 05128504ed5..9b100e9998d 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -163,7 +163,7 @@ class purchase_order(osv.osv): 'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, help="The pricelist sets the currency used for this purchase order. It also computes the supplier price for the selected products/quantities."), - 'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Waiting Supplier Ack'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order Status', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True), + 'state': fields.selection([('draft', 'Request for Quotation'), ('wait', 'Waiting'), ('confirmed', 'Waiting Supplier Ack'), ('approved', 'Approved'),('except_picking', 'Shipping Exception'), ('except_invoice', 'Invoice Exception'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Order State', readonly=True, help="The state of the purchase order or the quotation request. A quotation is a purchase order in a 'Draft' state. Then the order has to be confirmed by the user, the state switch to 'Confirmed'. Then the supplier must confirm the order to change the state to 'Approved'. When the purchase order is paid and received, the state becomes 'Done'. If a cancel action occurs in the invoice or in the reception of goods, the state becomes in exception.", select=True), 'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order Lines', states={'approved':[('readonly',True)]}), 'validator' : fields.many2one('res.users', 'Validated by', readonly=True), 'notes': fields.text('Notes'), diff --git a/addons/purchase_manual/purchase_manual.py b/addons/purchase_manual/purchase_manual.py index 2f5cf2cb44d..d9ce523f078 100644 --- a/addons/purchase_manual/purchase_manual.py +++ b/addons/purchase_manual/purchase_manual.py @@ -26,7 +26,7 @@ import netsvc class purchase_order_line(osv.osv): _inherit='purchase.order.line' _columns = { - 'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', required=True, readonly=True), + 'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', required=True, readonly=True), 'invoice_lines': fields.many2many('account.invoice.line', 'purchase_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True), 'invoiced': fields.boolean('Invoiced', readonly=True), 'partner_id': fields.related('order_id','partner_id',string='Partner',readonly=True,type="many2one", relation="res.partner"), diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 794935855a2..676a406d9de 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -763,7 +763,7 @@ class sale_order_line(osv.osv): 'number_packages': fields.function(_number_packages, method=True, type='integer', string='Number Packages'), 'notes': fields.text('Notes'), 'th_weight': fields.float('Weight'), - 'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled'), ('exception', 'Exception')], 'Status', required=True, readonly=True), + 'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled'), ('exception', 'Exception')], 'State', required=True, readonly=True), 'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'), 'salesman_id':fields.related('order_id','user_id',type='many2one',relation='res.users',string='Salesman'), } diff --git a/addons/scrum/scrum.py b/addons/scrum/scrum.py index a0bacc41f11..387c1ce0f00 100644 --- a/addons/scrum/scrum.py +++ b/addons/scrum/scrum.py @@ -98,7 +98,7 @@ class scrum_sprint(osv.osv): 'progress': fields.function(_calc_progress, method=True, string='Progress (0-100)'), 'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours'), 'planned_hours': fields.function(_calc_planned, method=True, string='Planned Hours'), - 'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'Status', required=True), + 'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'State', required=True), } _defaults = { 'state': lambda *a: 'draft', @@ -166,7 +166,7 @@ class scrum_product_backlog(osv.osv): 'sequence' : fields.integer('Sequence'), 'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Priority'), 'tasks_id': fields.one2many('scrum.task', 'product_backlog_id', 'Tasks Details'), - 'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'Status', required=True), + 'state': fields.selection([('draft','Draft'),('open','Open'),('done','Done')], 'State', required=True), 'progress': fields.function(_calc_progress, method=True, string='Progress (0-100)'), 'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours'), 'planned_hours': fields.function(_calc_planned, method=True, string='Planned Hours') diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 0128fb0a2ed..7585ebc6466 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -453,7 +453,9 @@ class stock_picking(osv.osv): ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled'), - ], 'Status', readonly=True, select=True), + ], 'State', readonly=True, select=True, + help=' The \'Draft\' state is used when a user is encoding a new and unconfirmed picking. The \'Confirmed\' state is used for stock movement to do with unavailable products. The \'Available\' state is set automatically when the \ + products are ready to be moved. The \'Waiting\' state is used in MTO moves when a movement is waiting for another one.'), 'min_date': fields.function(get_min_max_date, fnct_inv=_set_minimum_date, multi="min_max_date", method=True, store=True, type='datetime', string='Planned Date', select=1, help="Planned date for Packing. Default it takes current date"), 'date': fields.datetime('Date Order', help="Date of Order"), @@ -979,7 +981,9 @@ class stock_move(osv.osv): 'note': fields.text('Notes'), - 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', readonly=True, select=True), + 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True, + help='When the stock move is created it is in the \'Draft\' state. After that it is set to \'Confirmed\' state. If stock is available state is set to \'Avaiable\'. When the packing it done the state is \'Done\'.\ + The state is \'Waiting\' if the move is waiting for another one.'), 'price_unit': fields.float('Unit Price', digits=(16, int(config['price_accuracy']))), } @@ -1340,7 +1344,7 @@ class stock_inventory(osv.osv): 'date_done': fields.datetime('Date done'), 'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', readonly=True, states={'draft': [('readonly', False)]}), 'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'), - 'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('cancel','Cancelled')), 'Status', readonly=True), + 'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('cancel','Cancelled')), 'State', readonly=True), } _defaults = { 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), diff --git a/addons/subscription/subscription.py b/addons/subscription/subscription.py index 412b317d388..49ad477759a 100644 --- a/addons/subscription/subscription.py +++ b/addons/subscription/subscription.py @@ -70,7 +70,7 @@ class subscription_subscription(osv.osv): 'interval_type': fields.selection([('days', 'Days'), ('weeks', 'Weeks'), ('months', 'Months')], 'Interval Unit'), 'exec_init': fields.integer('Number of documents'), 'date_init': fields.datetime('First Date'), - 'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'Status'), + 'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'State'), 'doc_source': fields.reference('Source Document', required=True, selection=_get_document_types, size=128), 'doc_lines': fields.one2many('subscription.subscription.history', 'subscription_id', 'Documents created', readonly=True), 'cron_id': fields.many2one('ir.cron', 'Cron Job') From 6c95ad76ef8284bc3f25db2691f44267b13ef35e Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Tue, 24 Nov 2009 10:30:17 +0530 Subject: [PATCH 11/59] [FIX]: Corrected product process view. bzr revid: uco@tinyerp.co.in-20091124050017-ooxdi3zeq7uaohan --- addons/product/process/product_process.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/product/process/product_process.xml b/addons/product/process/product_process.xml index 1a77aae17fb..e91c0e7cf29 100755 --- a/addons/product/process/product_process.xml +++ b/addons/product/process/product_process.xml @@ -32,7 +32,7 @@ - + @@ -44,8 +44,8 @@ - - + + From e56a3b5a70bfc6799ddc6d241d04c33140cd7a1d Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Tue, 24 Nov 2009 10:15:43 +0100 Subject: [PATCH 12/59] [IMP] Add the support for the override of any attribute. You can override an attribute of an xml view with the tag Example: res.partner.form res.partner form top Regards, bzr revid: stephane@openerp.com-20091124091543-wsxu48hx117e0w6h --- bin/addons/base/rng/view.rng | 16 ++++++++++++++++ bin/osv/orm.py | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/bin/addons/base/rng/view.rng b/bin/addons/base/rng/view.rng index 41f10afa690..37f681de92f 100644 --- a/bin/addons/base/rng/view.rng +++ b/bin/addons/base/rng/view.rng @@ -20,6 +20,7 @@ + @@ -48,6 +49,7 @@ + @@ -182,6 +184,7 @@ + @@ -219,6 +222,7 @@ + @@ -265,6 +269,15 @@ + + + + + + + + + @@ -314,6 +327,7 @@ + @@ -348,6 +362,7 @@ + @@ -413,6 +428,7 @@ + diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 0ce305c2142..e417d6371c7 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1242,6 +1242,13 @@ class orm_template(object): for child in node2: node.addprevious(child) node.getparent().remove(node) + elif pos == 'attributes': + for child in node2.getiterator('attribute'): + attribute = (child.get('name'), child.text and child.text.encode('utf8') or None) + if attribute[1]: + node.set(attribute[0], attribute[1]) + else: + del(node.attrib[attribute[0]]) else: sib = node.getnext() for child in node2: From daaf25bfaa28b6136dd79d9b3f1dd54a570beb73 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Tue, 24 Nov 2009 14:52:25 +0530 Subject: [PATCH 13/59] =?UTF-8?q?[IMP]:=20Removed=20the=20Create=20Opportu?= =?UTF-8?q?nity=20button=20of=20the=20partner=20form=20view=20&=20put=20a?= =?UTF-8?q?=20button=C2=A0on=20the=20right=20sidebar,=20like=20'Schedule?= =?UTF-8?q?=20a=20Meeting'.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bzr revid: rpa@tinyerp.com-20091124092225-a868ru61s2xe8gh8 --- .../crm_configuration_wizard.xml | 5 ++--- addons/crm_configuration/crm_lead_view.xml | 15 --------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/addons/crm_configuration/crm_configuration_wizard.xml b/addons/crm_configuration/crm_configuration_wizard.xml index 379602c39a6..6d0512a6f95 100644 --- a/addons/crm_configuration/crm_configuration_wizard.xml +++ b/addons/crm_configuration/crm_configuration_wizard.xml @@ -52,11 +52,10 @@ string="Schedule Phone Call" /> diff --git a/addons/crm_configuration/crm_lead_view.xml b/addons/crm_configuration/crm_lead_view.xml index fa8e73f4aea..d760758bebc 100644 --- a/addons/crm_configuration/crm_lead_view.xml +++ b/addons/crm_configuration/crm_lead_view.xml @@ -213,20 +213,5 @@ - - - res.partner.crm.form.inherit - res.partner - form - - - -