diff --git a/addons/account/account.py b/addons/account/account.py index a67bb002d35..7c9405c2d70 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -526,7 +526,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 = { @@ -590,7 +591,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.'), 'company_id': fields.many2one('res.company', 'Company', required=True) } _defaults = { @@ -674,7 +676,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'), 'company_id' : fields.many2one('res.company', 'Company') } @@ -761,7 +764,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 \'Posted\' 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"), @@ -1613,7 +1617,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..0b9b8868ca2 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -126,7 +126,9 @@ 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\'. \ + \n* 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_invoice_view.xml b/addons/account/account_invoice_view.xml index 84fb0684e3c..217af3e22f9 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -327,7 +327,7 @@ - + @@ -392,7 +392,6 @@ [('type','=','out_invoice')] {'type':'out_invoice'} - Supplier Invoices @@ -414,7 +413,6 @@ [('type','=','in_invoice')] {'type':'in_invoice'} - Customer Refunds @@ -437,7 +435,6 @@ [('type','=','out_refund')] {'type':'out_refund'} - Supplier Refunds @@ -460,7 +457,6 @@ [('type','=','in_refund')] {'type':'in_refund'} - @@ -485,8 +481,6 @@ - - PRO-FORMA Customer Invoices account.invoice @@ -509,8 +503,6 @@ - - Unpaid Customer Invoices account.invoice @@ -533,8 +525,6 @@ - - Draft Supplier Invoices account.invoice @@ -557,8 +547,6 @@ - - Unpaid Supplier Invoices account.invoice @@ -581,8 +569,6 @@ - - Draft Customer Refunds account.invoice @@ -605,8 +591,6 @@ - - Unpaid Customer Refunds account.invoice @@ -629,8 +613,6 @@ - - Draft Supplier Refunds account.invoice @@ -653,8 +635,6 @@ - - Unpaid Supplier Refunds account.invoice @@ -677,8 +657,6 @@ - - diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index a798a57f94e..02882fad1e7 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\'.\n* 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/account_view.xml b/addons/account/account_view.xml index d034b508f46..5cbc8ef8d4a 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -394,7 +394,6 @@ [('state','=','draft')] - New Statement @@ -402,7 +401,6 @@ form form,tree - account.bank.statement.reconcile.form @@ -1350,7 +1348,6 @@ [('state','=','running')] - New Subscription @@ -1359,7 +1356,6 @@ form,tree - account.subscription.line.form diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml index 02f56a39f8a..117b7723c68 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/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml index 27880f663c2..80d57de1f41 100755 --- a/addons/account/process/supplier_invoice_process.xml +++ b/addons/account/process/supplier_invoice_process.xml @@ -28,7 +28,7 @@ - + diff --git a/addons/account/project/project.py b/addons/account/project/project.py index 4439fef4245..f446b6fdf29 100644 --- a/addons/account/project/project.py +++ b/addons/account/project/project.py @@ -189,7 +189,11 @@ 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.\ + \n* If any associated partner is there, it can be in \'Open\' state.\ + \n* If any pending balance is there it can be in \'Pending\'. \ + \n* 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/project/project_view.xml b/addons/account/project/project_view.xml index 436dfc8cca3..7a963c73bf6 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -116,7 +116,6 @@ form,tree,graph - diff --git a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml index 6c21ede5dd3..3a68fa513d0 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml @@ -1,4 +1,3 @@ - @@ -7,13 +6,9 @@ form tree,form,graph [('user_id','=',uid)] + - + @@ -21,6 +16,7 @@ All Uninvoiced Entries + account.analytic.line form tree,form @@ -34,6 +30,7 @@ form tree,form [('invoice_id','=',False),('to_invoice','!=',False),('account_id.user_id','=',uid)] + @@ -42,38 +39,25 @@ account.analytic.account form tree,form,graph + [('user_id','=',uid),('state','=','open')] - - My Pending Accounts account.analytic.account form + tree,form,graph [('user_id','=',uid),('state','=','pending')] - - - - New Analytic Account - account.analytic.account - form - form,tree,graph - - - All Analytic Accounts account.analytic.account + form tree,form,graph @@ -88,27 +72,25 @@ form tree,form,graph [('date','<=',time.strftime('%Y-%m-%d')),('state','=','open')] + - + Current Analytic Accounts account.analytic.account form + tree,form,graph [('state','=','open')] - Pending Analytic Accounts + account.analytic.account form tree,form,graph @@ -116,7 +98,6 @@ [('state','=','pending')] - diff --git a/addons/account_payment/payment.py b/addons/account_payment/payment.py index 1b3392564bf..8d46db771f4 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\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n 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/account_payment/payment_view.xml b/addons/account_payment/payment_view.xml index 7c53d4858c1..df1e25a419c 100644 --- a/addons/account_payment/payment_view.xml +++ b/addons/account_payment/payment_view.xml @@ -192,7 +192,6 @@ [('state','=','draft')] - Payment Orders to Validate @@ -202,16 +201,12 @@ [('state','=','open')] - - New Payment Order payment.order form form,tree - - Payment Line diff --git a/addons/auction/auction.py b/addons/auction/auction.py index 0c275578180..29ce8b30421 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\'.\n 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/auction/auction_view.xml b/addons/auction/auction_view.xml index 3406fa80504..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/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 8d37bb84a20..4b246a0665b 100755 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -511,7 +511,11 @@ 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.\ + \nIf the case is in progress the state is set to \'Open\'.\ + \nWhen the case is over, the state is set to \'Done\'.\ + \nIf 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/crm/crm_view.xml b/addons/crm/crm_view.xml index add1c01c418..92216e63187 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 4599ca5f5f6..5e1151b0877 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.py b/addons/event/event.py index e3595987c7d..d330a0cbec4 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\'.\n If event is confirmed for the particular dates the state is set to \'Confirmed\'.\ + \nIf the event is over, the state is set to \'Done\'.\n 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/event/event_view.xml b/addons/event/event_view.xml index 3141b1a9ee2..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_expense/hr.expense.expense.csv b/addons/hr_expense/hr.expense.expense.csv index 9cf0cf7d2aa..6147af8d754 100644 --- a/addons/hr_expense/hr.expense.expense.csv +++ b/addons/hr_expense/hr.expense.expense.csv @@ -1,3 +1,3 @@ -name,ref,employee_id,line_ids/date_value,line_ids/name,line_ids/analytic_account,line_ids/unit_quantity,line_ids/ref,line_ids/unit_amount -September Expenses,09/06,Fabien Pinckaers,2006-09-05,Travel by Car - Customer Seagate 2 - Double,Thymbra,130.0,,0.22 -,,,2006-09-05,Basic PC - Server for Seagate,Seagate P2,1.0,S1234435,300.0 +"id","name","ref","employee_id","line_ids/date_value","line_ids/name","line_ids/analytic_account","line_ids/unit_quantity","line_ids/ref","line_ids/unit_amount" +1,"September Expenses",09/06/09,"Fabien Pinckaers",05/09/06,"Travel by Car - Customer Seagate 2 - Double","Thymbra",130,,0.22 +,,,,05/09/06,"Basic PC - Server for Seagate","Seagate P2",1,"S1234435",300 diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index dd9c4e44aba..0658300bf14 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\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Confirmation\'.\ + \nIf the admin accepts it, the state is \'Accepted\'.\n If an invoice is made for the expense request, the state is \'Invoiced\'.\n 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_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml index 7af1c0c92ca..c4317c6fd8f 100644 --- a/addons/hr_expense/hr_expense_view.xml +++ b/addons/hr_expense/hr_expense_view.xml @@ -1,7 +1,9 @@ + + hr.expense.line.tree tree @@ -34,6 +36,8 @@ + + hr.expense.form form @@ -93,6 +97,7 @@ + hr.expense.expense.filter hr.expense.expense @@ -120,59 +125,18 @@ form - - - - Draft expenses - hr.expense.expense - form - tree,form - [('state','=','draft')] - - - - - - Expenses waiting validation - hr.expense.expense - form - tree,form - [('state','=','confirm')] - - - - - - Expenses waiting invoice - hr.expense.expense - form - tree,form - [('state','=','accepted')] - - - - - - Expenses waiting payment - hr.expense.expense - form - tree,form - [('state','=','invoiced')] - - - - + + + + + My expenses menu + --> + + My Expenses hr.expense.expense @@ -182,38 +146,11 @@ - - - - New Expenses Sheet - hr.expense.expense - form - form,tree - [('user_id','=',uid)] - - - - - - My Draft expenses - hr.expense.expense - form - tree,form - [('user_id','=',uid),('state','=','draft')] - - - - - - My expenses waiting validation - hr.expense.expense - form - tree,form - [('user_id','=',uid),('state','=','confirm')] - - - - + + + product.product.expense.form diff --git a/addons/hr_holidays/hr.py b/addons/hr_holidays/hr.py index 0d638d67a08..7abc9f5ffb6 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\'.\n 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_holidays/hr_view.xml b/addons/hr_holidays/hr_view.xml index 400381275d9..9aa266a1c5b 100644 --- a/addons/hr_holidays/hr_view.xml +++ b/addons/hr_holidays/hr_view.xml @@ -2,7 +2,8 @@ - + + Leave Request hr.holidays @@ -20,7 +21,6 @@ - @@ -36,7 +36,8 @@ - + + Allocation Request hr.holidays @@ -49,7 +50,6 @@ - @@ -67,7 +67,8 @@ - + + Company Allocation hr.holidays @@ -81,7 +82,6 @@ - @@ -106,7 +106,7 @@ hr.holidays tree - + @@ -121,52 +121,68 @@ + Leave Request(s) hr.holidays form [('type','=','remove')] + - - + + tree + + + + + + + form + + + + + + Allocation Request(s) hr.holidays form {'type':'add'} [('type','=','add')] - - + + tree + + + + + + + form + + + + + - - hr.holidays - form - form,tree - - {'allocation_type':'company'} - - - - hr.holidays.status.form @@ -201,6 +217,7 @@ form tree,form + - - ir.actions.act_window - hr.holidays - form - tree,form - - - - - - My Leave Requests - ir.actions.act_window - hr.holidays - form - tree,form - [('user_id','=',uid)] - - - - - - - My Draft Leave Request - ir.actions.act_window - hr.holidays - form - tree,form - [('user_id','=',uid), ('state','=','draft')] - - - - - - - - My Awaiting Confirmation Leave Requests - ir.actions.act_window - hr.holidays - form - tree,form - [('user_id','=',uid), ('state','=','confirm')] - - - - - - - My Validated Leave Requests - ir.actions.act_window - hr.holidays - form - tree,form - [('user_id','=',uid), ('state','=','validate')] - - - - - - - My Refused Leave Requests - ir.actions.act_window - hr.holidays - form - tree,form - [('user_id','=',uid), ('state','=','refuse')] - - - - - - - - My Department's Leave Requests - ir.actions.act_window - hr.holidays - form - tree,form - [('user_id', 'child_of', [uid])] - - - - - - - - Leave Requests to Validate - ir.actions.act_window - hr.holidays - form - tree,form - [('user_id', 'child_of', [uid]), ('state','=','confirm')] - - - - - - - - - Requests Awaiting for Validation - ir.actions.act_window - hr.holidays - form - tree,form - [('state','=','confirm')] - - - - - - @@ -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..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 @@ - + @@ -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 ea3317e10e2..f6443c0cf0b 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -175,15 +175,16 @@ search - + + + + - - @@ -224,7 +225,6 @@ - My Department's Timesheets @@ -248,7 +248,6 @@ - My Department's Timesheets to Validate @@ -260,7 +259,6 @@ - @@ -276,8 +274,6 @@ - - Timesheets To Validate ir.actions.act_window @@ -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.py b/addons/mrp/mrp.py index 5ba9d487400..c3c70ccd61e 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\'.\n If the order is confirmed the state is set to \'Waiting Goods\'.\n If any exceptions are there, the state is set to \'Packing Exception\'.\ + \nIf the stock is available then the state is set to \'Ready to Produce\'.\n When the production get started then the state is set to \'In Production\'.\n When the production is over, the state is set to \'Done\'.'), + 'hour_total': fields.function(_production_calc, 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\'.\n If the procurement is confirmed, the state is set to \'Confirmed\'.\ + \nAfter confirming the state is set to \'Running\'.\n If any exception arises in the order then the state is set to \'Exception\'.\n Once the exception is removed the state becomes \'Ready\'.\n 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/mrp_view.xml b/addons/mrp/mrp_view.xml index 74be287ea82..7434045ca97 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -560,11 +560,6 @@ gantt,tree,form,calendar,graph [('state','in',('ready','confirmed','in_production'))] - Production Orders To Start @@ -576,7 +571,7 @@ - + Production Orders in Progress ir.actions.act_window @@ -587,7 +582,7 @@ - + Production Orders Waiting Products ir.actions.act_window @@ -598,7 +593,6 @@ - New Production Order @@ -607,7 +601,6 @@ form form,tree,calendar,graph,gantt - mrp.production.lot.line.form @@ -787,7 +780,6 @@ tree,form [('state','=','confirmed')] - Exceptions Procurements @@ -797,7 +789,6 @@ tree,form [('state','=','exception')] - Exceptions Procurements to Fix @@ -808,7 +799,6 @@ [('state','=','exception'), ('message', '<>', '')] - Temporary Procurement Exceptions @@ -818,7 +808,6 @@ tree,form [('state','=','exception'), ('message', '=', '')] - New Procurement @@ -827,7 +816,6 @@ form form,tree - 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_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.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/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml index 9988d106824..4c3cf5a08bc 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..22cd23cffff 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 +234,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/product/product.py b/addons/product/product.py index e640628dbf9..9a1ac0cc3b3 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -289,7 +289,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 4eb85cbee31..edd03ee68e3 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\'.\n If it is template then we can make projects based on the template projects. If its in \'Running\' state it is a normal project.\ + \n If it is to be reviewed then the state is \'Pending\'.\n When the project is completed the state is set to \'Done\'.'), 'company_id': fields.many2one('res.company', 'Company'), } @@ -280,7 +282,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\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\ + \n If the task is over, the states is set to \'Done\'.'), 'date_start': fields.datetime('Starting Date'), 'date_deadline': fields.datetime('Deadline'), 'date_close': fields.datetime('Date Closed', readonly=True), diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 621fbd91ffe..dd38f2d392b 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -164,7 +164,6 @@ - Templates of Projects @@ -249,11 +248,6 @@ - Projects Structure @@ -566,7 +560,6 @@ - My Current Tasks @@ -579,7 +572,6 @@ - My Tasks in Progress @@ -591,7 +583,6 @@ - My Draft Tasks @@ -603,7 +594,6 @@ - My Department's Pending Tasks @@ -615,7 +605,6 @@ - My Department's Current Tasks @@ -627,7 +616,6 @@ - My Department's Tasks in Progress @@ -638,7 +626,6 @@ - My Department's Draft Tasks @@ -649,7 +636,6 @@ - Overpassed Tasks @@ -677,7 +663,6 @@ [('state','=','open')] - Unassigned Tasks @@ -688,7 +673,6 @@ - diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml index 8e7b34ac735..ddd23c9bf79 100755 --- a/addons/purchase/process/purchase_process.xml +++ b/addons/purchase/process/purchase_process.xml @@ -17,7 +17,7 @@ --> - + @@ -84,7 +84,7 @@ - + @@ -119,7 +119,7 @@ - + diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index b260f7c24d0..d23761a7ed3 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/purchase_view.xml b/addons/purchase/purchase_view.xml index 7a3b4e96ee6..5fb25f2ac9b 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -142,13 +142,45 @@ + + Request For Quotations + ir.actions.act_window + purchase.order + [('state','=','draft')] + form + tree,form,calendar,graph + + + + + + Purchase Order Waiting Approval + ir.actions.act_window + purchase.order + form + tree,form,calendar,graph + [('state','=','confirmed')] + + + + + + Purchase Orders in Progress + ir.actions.act_window + purchase.order + form + tree,form,calendar,graph + [('state','=','approved')] + + + + New Purchase Order ir.actions.act_window purchase.order form,tree - Purchase Order Waiting Approval 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/report_account/report_receivable.py b/addons/report_account/report_receivable.py index 45dc1f5a376..8d106193cf7 100644 --- a/addons/report_account/report_receivable.py +++ b/addons/report_account/report_receivable.py @@ -24,6 +24,7 @@ import datetime import mx.DateTime import pooler +import tools from osv import fields,osv @@ -207,21 +208,25 @@ class report_account_type_sales(osv.osv): _description = "Report of the Sales by Account Type" _auto = False _columns = { - 'name': fields.char('Month', size=64, readonly=True), + 'name': fields.char('Year',size=64,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), 'user_type': fields.many2one('account.account.type', 'Account Type', readonly=True), 'amount_total': fields.float('Total', readonly=True), - 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True), + 'currency_id': fields.many2one('res.currency', 'Currency', 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), } _order = 'name desc,amount_total desc' def init(self, cr): + tools.drop_view_if_exists(cr, 'report_account_type_sales') cr.execute("""create or replace view report_account_type_sales as ( select min(inv_line.id) as id, - to_char(inv.date_invoice, 'YYYY-MM-01') as name, + to_char(inv.date_invoice, 'YYYY') as name, + to_char(inv.date_invoice,'MM') as month, sum(inv_line.price_subtotal) as amount_total, inv.currency_id as currency_id, inv.period_id, @@ -235,7 +240,7 @@ class report_account_type_sales(osv.osv): where inv.state in ('open','paid') group by - to_char(inv.date_invoice, 'YYYY-MM-01'),inv.currency_id, inv.period_id, inv_line.product_id, account.user_type + to_char(inv.date_invoice, 'YYYY'),to_char(inv.date_invoice,'MM'),inv.currency_id, inv.period_id, inv_line.product_id, account.user_type )""") report_account_type_sales() @@ -245,21 +250,25 @@ class report_account_sales(osv.osv): _description = "Report of the Sales by Account" _auto = False _columns = { - 'name': fields.char('Month', size=64, readonly=True), + 'name': fields.char('Year',size=64,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), 'account_id': fields.many2one('account.account', 'Account', readonly=True), 'amount_total': fields.float('Total', readonly=True), - 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True), + 'currency_id': fields.many2one('res.currency', 'Currency', 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), } _order = 'name desc,amount_total desc' def init(self, cr): + tools.drop_view_if_exists(cr, 'report_account_sales') cr.execute("""create or replace view report_account_sales as ( select min(inv_line.id) as id, - to_char(inv.date_invoice, 'YYYY-MM-01') as name, + to_char(inv.date_invoice, 'YYYY') as name, + to_char(inv.date_invoice,'MM') as month, sum(inv_line.price_subtotal) as amount_total, inv.currency_id as currency_id, inv.period_id, @@ -273,7 +282,7 @@ class report_account_sales(osv.osv): where inv.state in ('open','paid') group by - to_char(inv.date_invoice, 'YYYY-MM-01'),inv.currency_id, inv.period_id, inv_line.product_id, account.id + to_char(inv.date_invoice, 'YYYY'),to_char(inv.date_invoice,'MM'),inv.currency_id, inv.period_id, inv_line.product_id, account.id )""") report_account_sales() diff --git a/addons/report_account/report_receivable_view.xml b/addons/report_account/report_receivable_view.xml index 694bdf690e7..7ef469c96fe 100644 --- a/addons/report_account/report_receivable_view.xml +++ b/addons/report_account/report_receivable_view.xml @@ -124,8 +124,8 @@ tree - - + + @@ -175,6 +175,7 @@ + @@ -185,6 +186,18 @@ + + report.account_type.sales.form + report.account_type.sales + form + + + + + + + + report.account_type.sales.graph diff --git a/addons/report_analytic_line/report_analytic_line.py b/addons/report_analytic_line/report_analytic_line.py index 006a36cc3a4..42f219df1f3 100644 --- a/addons/report_analytic_line/report_analytic_line.py +++ b/addons/report_analytic_line/report_analytic_line.py @@ -20,27 +20,32 @@ ############################################################################## from osv import fields,osv +import tools class report_account_analytic_line_to_invoice(osv.osv): _name = "report.account.analytic.line.to.invoice" _description = "Analytic lines to invoice report" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,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', 'UoM', readonly=True), 'unit_amount': fields.float('Units', readonly=True), 'sale_price': fields.float('Sale price', readonly=True), 'amount': fields.float('Amount', 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), } _order = 'name desc, product_id asc, account_id asc' def init(self, cr): + tools.drop_view_if_exists(cr, 'report_account_analytic_line_to_invoice') cr.execute(""" CREATE OR REPLACE VIEW report_account_analytic_line_to_invoice AS ( SELECT - DISTINCT(to_char(l.date,'YYYY-MM-DD')) AS name, + DISTINCT(to_char(l.date,'MM')) as month, + to_char(l.date, 'YYYY') as name, MIN(l.id) AS id, l.product_id, l.account_id, @@ -57,7 +62,7 @@ class report_account_analytic_line_to_invoice(osv.osv): WHERE (invoice_id IS NULL) and (to_invoice IS NOT NULL) GROUP BY - to_char(l.date,'YYYY-MM-DD'), product_id, product_uom_id, account_id + to_char(l.date, 'YYYY'), to_char(l.date,'MM'), product_id, product_uom_id, account_id ) """) report_account_analytic_line_to_invoice() diff --git a/addons/report_analytic_line/report_analytic_line_view.xml b/addons/report_analytic_line/report_analytic_line_view.xml index ef61bd70645..e5c9a3d2c06 100644 --- a/addons/report_analytic_line/report_analytic_line_view.xml +++ b/addons/report_analytic_line/report_analytic_line_view.xml @@ -9,6 +9,7 @@
+ diff --git a/addons/report_crm/report_crm.py b/addons/report_crm/report_crm.py index df133b53b4f..d6c2e9d0066 100644 --- a/addons/report_crm/report_crm.py +++ b/addons/report_crm/report_crm.py @@ -20,6 +20,7 @@ ############################################################################## from osv import fields,osv +import tools AVAILABLE_STATES = [ ('draft','Draft'), @@ -34,7 +35,7 @@ class report_crm_case_user(osv.osv): _description = "Cases by user and section" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'user_id':fields.many2one('res.users', 'User', readonly=True), 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), 'amount_revenue': fields.float('Est.Revenue', readonly=True), @@ -44,14 +45,18 @@ class report_crm_case_user(osv.osv): 'probability': fields.float('Avg. Probability', readonly=True), 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True), 'delay_close': fields.char('Delay to close', size=20, 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), } _order = 'name desc, user_id, section_id' def init(self, cr): + tools.drop_view_if_exists(cr, 'report_crm_case_user') cr.execute(""" create or replace view report_crm_case_user as ( select min(c.id) as id, - to_char(c.create_date, 'YYYY-MM-01') as name, + to_char(c.create_date, 'YYYY') as name, + to_char(c.create_date, 'MM') as month, c.state, c.user_id, c.section_id, @@ -63,7 +68,7 @@ class report_crm_case_user(osv.osv): to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close from crm_case c - group by to_char(c.create_date, 'YYYY-MM-01'), c.state, c.user_id, c.section_id + group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id, c.section_id )""") report_crm_case_user() @@ -72,7 +77,7 @@ class report_crm_case_categ(osv.osv): _description = "Cases by section and category" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'categ_id':fields.many2one('crm.case.categ', 'Category', readonly=True), 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), 'amount_revenue': fields.float('Est.Revenue', readonly=True), @@ -82,14 +87,18 @@ class report_crm_case_categ(osv.osv): 'probability': fields.float('Avg. Probability', readonly=True), 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True), 'delay_close': fields.char('Delay Close', size=20, 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), } _order = 'name desc, categ_id, section_id' def init(self, cr): + tools.drop_view_if_exists(cr, 'report_crm_case_categ') cr.execute(""" create or replace view report_crm_case_categ as ( select min(c.id) as id, - to_char(c.create_date, 'YYYY-MM-01') as name, + to_char(c.create_date, 'YYYY') as name, + to_char(c.create_date, 'MM') as month, c.state, c.categ_id, c.section_id, @@ -101,7 +110,7 @@ class report_crm_case_categ(osv.osv): to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close from crm_case c - group by to_char(c.create_date, 'YYYY-MM-01'), c.state, c.categ_id, c.section_id + group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.categ_id, c.section_id )""") report_crm_case_categ() @@ -134,7 +143,7 @@ class report_crm_case_section(osv.osv): return res _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), # 'user_id':fields.many2one('res.users', 'User', readonly=True), 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), 'nbr_cases': fields.integer('# of Cases', readonly=True), @@ -142,14 +151,18 @@ class report_crm_case_section(osv.osv): 'perc_done': fields.function(_get_data,string='%Done', method=True,type="float"), 'perc_cancel': fields.function(_get_data,string='%Cancel', method=True,type="float"), 'delay_close': fields.char('Delay to close', size=20, 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), } _order = 'name desc, section_id' def init(self, cr): + tools.drop_view_if_exists(cr, 'report_crm_case_section') cr.execute(""" create or replace view report_crm_case_section as ( select min(c.id) as id, - to_char(c.create_date, 'YYYY-MM-01') as name, + to_char(c.create_date, 'YYYY') as name, + to_char(c.create_date, 'MM') as month, c.section_id as section_id, count(*) as nbr_cases, 0 as avg_answers, @@ -158,7 +171,7 @@ class report_crm_case_section(osv.osv): to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close from crm_case c - group by to_char(c.create_date, 'YYYY-MM-01'),c.section_id + group by to_char(c.create_date, 'YYYY'),to_char(c.create_date, 'MM'),c.section_id )""") report_crm_case_section() diff --git a/addons/report_crm/report_crm_view.xml b/addons/report_crm/report_crm_view.xml index 947a457c289..4e9af483d67 100644 --- a/addons/report_crm/report_crm_view.xml +++ b/addons/report_crm/report_crm_view.xml @@ -12,7 +12,8 @@ tree - + + @@ -32,6 +33,7 @@ + @@ -103,6 +105,7 @@ + @@ -122,6 +125,7 @@ + @@ -165,6 +169,7 @@ + diff --git a/addons/report_document/report_document.py b/addons/report_document/report_document.py index 0da5b3430e5..911dc3a6ace 100644 --- a/addons/report_document/report_document.py +++ b/addons/report_document/report_document.py @@ -32,7 +32,7 @@ from osv import fields,osv import time - +import tools class report_document_user(osv.osv): _name = "report.document.user" @@ -81,7 +81,7 @@ class report_files_partner(osv.osv): _description = "Files details by Partners" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'file_title': fields.char('File Name',size=64,readonly=True), 'directory': fields.char('Directory',size=64,readonly=True), 'create_date': fields.datetime('Date Created', readonly=True), @@ -90,19 +90,23 @@ class report_files_partner(osv.osv): 'nbr':fields.integer('# of Files', readonly=True), 'type':fields.char('Directory Type',size=64,readonly=True), 'partner':fields.char('Partner',size=64,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), } def init(self, cr): + tools.drop_view_if_exists(cr, 'report_files_partner') cr.execute(""" create or replace view report_files_partner as ( select min(f.id) as id,count(*) as nbr, - min(to_char(f.create_date,'YYYY-MM-01')) as name, + to_char(f.create_date,'YYYY') as name, + min(to_char(f.create_date,'MM')) as month, min(f.title) as file_title, p.name as partner from ir_attachment f inner join res_partner p on (f.partner_id=p.id) where f.datas_fname is not null - group by p.name + group by p.name, to_char(f.create_date,'YYYY') ) """) report_files_partner() diff --git a/addons/report_document/report_document_view.xml b/addons/report_document/report_document_view.xml index 746bf6d89c4..7226e953aa9 100644 --- a/addons/report_document/report_document_view.xml +++ b/addons/report_document/report_document_view.xml @@ -209,13 +209,14 @@ tree - + + - + Files by Month report.document.user @@ -269,11 +270,27 @@ + + + + view.files.partner.form + report.files.partner + form + + + + + + + + + + Files Per Partner report.files.partner diff --git a/addons/report_project/report_project.py b/addons/report_project/report_project.py index 321ac59d28a..e6f5fd828e1 100644 --- a/addons/report_project/report_project.py +++ b/addons/report_project/report_project.py @@ -20,13 +20,14 @@ ############################################################################## from osv import fields,osv +import tools class report_project_task_user(osv.osv): _name = "report.project.task.user" _description = "Tasks by user and project" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'user_id':fields.many2one('res.users', 'User', readonly=True), 'project_id':fields.many2one('project.project', 'Project', readonly=True), 'hours_planned': fields.float('Planned Hours', readonly=True), @@ -34,14 +35,19 @@ class report_project_task_user(osv.osv): 'hours_delay': fields.float('Avg. Plan.-Eff.', readonly=True), 'closing_days': fields.char('Avg Closing Delay', size=64, readonly=True), 'task_closed': fields.integer('Task Closed', 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), + } _order = 'name desc, project_id' def init(self, cr): + tools.sql.drop_view_if_exists(cr, 'report_project_task_user') cr.execute(""" create or replace view report_project_task_user as ( select min(t.id) as id, - to_char(date_close, 'YYYY-MM-01') as name, + to_char(date_close, 'YYYY') as name, + to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.user_id, t.project_id, @@ -54,7 +60,7 @@ class report_project_task_user(osv.osv): where t.state='done' group by - to_char(date_close, 'YYYY-MM-01'),t.user_id,project_id + to_char(date_close, 'YYYY'),to_char(date_close, 'MM'),t.user_id,project_id ) """) report_project_task_user() @@ -65,21 +71,26 @@ class report_project_task(osv.osv): _description = "Tasks by project" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'project_id':fields.many2one('project.project', 'Project', readonly=True), 'hours_planned': fields.float('Planned Hours', readonly=True), 'hours_effective': fields.float('Effective Hours', readonly=True), 'hours_delay': fields.float('Avg. Plan.-Eff.', readonly=True), 'closing_days': fields.char('Avg Closing Delay', size=64, readonly=True), 'task_closed': fields.integer('Task Closed', 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), + } _order = 'name desc, project_id' def init(self, cr): + tools.sql.drop_view_if_exists(cr, 'report_project_task') cr.execute(""" create or replace view report_project_task as ( select min(t.id) as id, - to_char(date_close, 'YYYY-MM-01') as name, + to_char(date_close, 'YYYY') as name, + to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.project_id, sum(planned_hours) as hours_planned, @@ -91,7 +102,7 @@ class report_project_task(osv.osv): where t.state='done' group by - to_char(date_close, 'YYYY-MM-01'),project_id + to_char(date_close, 'YYYY'),to_char(date_close, 'MM'),project_id ) """) report_project_task() diff --git a/addons/report_project/report_project_view.xml b/addons/report_project/report_project_view.xml index 366564c7237..6589c5cea35 100644 --- a/addons/report_project/report_project_view.xml +++ b/addons/report_project/report_project_view.xml @@ -10,6 +10,7 @@ + @@ -29,6 +30,7 @@ + @@ -65,6 +67,7 @@ + @@ -81,6 +84,7 @@ + diff --git a/addons/report_purchase/report_purchase.py b/addons/report_purchase/report_purchase.py index 3730e7349c9..342423422d2 100644 --- a/addons/report_purchase/report_purchase.py +++ b/addons/report_purchase/report_purchase.py @@ -24,13 +24,14 @@ # from osv import fields,osv +import tools class report_purchase_order_product(osv.osv): _name = "report.purchase.order.product" _description = "Purchases Orders by Products" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'state': fields.selection([ ('draft','Quotation'), ('waiting_date','Waiting Schedule'), @@ -46,14 +47,19 @@ class report_purchase_order_product(osv.osv): 'price_total': fields.float('Total Price', readonly=True), 'price_average': fields.float('Average Price', readonly=True), 'count': fields.integer('# of Lines', 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), + } _order = 'name desc,price_total desc' def init(self, cr): + tools.sql.drop_view_if_exists(cr, 'report_purchase_order_product') cr.execute(""" create or replace view report_purchase_order_product as ( select min(l.id) as id, - to_char(s.date_order, 'YYYY-MM-01') as name, + to_char(s.date_order, 'YYYY') as name, + to_char(s.date_order, 'MM') as month, s.state, l.product_id, sum(l.product_qty*u.factor) as quantity, @@ -64,7 +70,7 @@ class report_purchase_order_product(osv.osv): left join purchase_order_line l on (s.id=l.order_id) left join product_uom u on (u.id=l.product_uom) where l.product_id is not null - group by l.product_id, to_char(s.date_order, 'YYYY-MM-01'),s.state + group by l.product_id, to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),s.state ) """) report_purchase_order_product() @@ -74,7 +80,7 @@ class report_purchase_order_category(osv.osv): _description = "Purchases Orders by Categories" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'state': fields.selection([ ('draft','Quotation'), ('waiting_date','Waiting Schedule'), @@ -90,14 +96,18 @@ class report_purchase_order_category(osv.osv): 'price_total': fields.float('Total Price', readonly=True), 'price_average': fields.float('Average Price', readonly=True), 'count': fields.integer('# of Lines', 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), } _order = 'name desc,price_total desc' def init(self, cr): + tools.sql.drop_view_if_exists(cr, 'report_purchase_order_category') cr.execute(""" create or replace view report_purchase_order_category as ( select min(l.id) as id, - to_char(s.date_order, 'YYYY-MM-01') as name, + to_char(s.date_order, 'YYYY') as name, + to_char(s.date_order, 'MM') as month, s.state, t.categ_id as category_id, sum(l.product_qty*u.factor) as quantity, @@ -110,7 +120,7 @@ class report_purchase_order_category(osv.osv): left join product_template t on (t.id=p.product_tmpl_id) left join product_uom u on (u.id=l.product_uom) where l.product_id is not null - group by t.categ_id, to_char(s.date_order, 'YYYY-MM-01'),s.state + group by t.categ_id, to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),s.state ) """) report_purchase_order_category() diff --git a/addons/report_purchase/report_purchase_view.xml b/addons/report_purchase/report_purchase_view.xml index e3c625797ac..b4640915c70 100644 --- a/addons/report_purchase/report_purchase_view.xml +++ b/addons/report_purchase/report_purchase_view.xml @@ -10,6 +10,7 @@ + @@ -75,6 +76,7 @@ + diff --git a/addons/report_sale/report_sale.py b/addons/report_sale/report_sale.py index 8c4705644ac..424b0c7042b 100644 --- a/addons/report_sale/report_sale.py +++ b/addons/report_sale/report_sale.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,18 +15,20 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## +import tools from osv import fields,osv + class report_sale_order_product(osv.osv): _name = "report.sale.order.product" _description = "Sales Orders by Products" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'state': fields.selection([ ('draft','Quotation'), ('waiting_date','Waiting Schedule'), @@ -42,14 +44,18 @@ class report_sale_order_product(osv.osv): 'price_total': fields.float('Total Price', readonly=True), 'price_average': fields.float('Average Price', readonly=True), 'count': fields.integer('# of Lines', 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), } _order = 'name desc,price_total desc' def init(self, cr): + tools.drop_view_if_exists(cr, 'report_sale_order_product') cr.execute(""" create or replace view report_sale_order_product as ( select min(l.id) as id, - to_char(s.date_order, 'YYYY-MM-01') as name, + to_char(s.date_order, 'YYYY') as name, + to_char(s.date_order,'MM') as month, s.state, l.product_id, sum(l.product_uom_qty*u.factor) as quantity, @@ -60,7 +66,7 @@ class report_sale_order_product(osv.osv): right join sale_order_line l on (s.id=l.order_id) left join product_uom u on (u.id=l.product_uom) where l.product_uom_qty != 0 - group by l.product_id, to_char(s.date_order, 'YYYY-MM-01'),s.state + group by l.product_id, to_char(s.date_order, 'YYYY'),to_char(s.date_order,'MM'),s.state ) """) report_sale_order_product() @@ -70,7 +76,7 @@ class report_sale_order_category(osv.osv): _description = "Sales Orders by Categories" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'state': fields.selection([ ('draft','Quotation'), ('waiting_date','Waiting Schedule'), @@ -86,14 +92,19 @@ class report_sale_order_category(osv.osv): 'price_total': fields.float('Total Price', readonly=True), 'price_average': fields.float('Average Price', readonly=True), 'count': fields.integer('# of Lines', 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), + } _order = 'name desc,price_total desc' def init(self, cr): + tools.drop_view_if_exists(cr, 'report_sale_order_category') cr.execute(""" create or replace view report_sale_order_category as ( select min(l.id) as id, - to_char(s.date_order, 'YYYY-MM-01') as name, + to_char(s.date_order, 'YYYY') as name, + to_char(s.date_order,'MM') as month, s.state, t.categ_id as category_id, sum(l.product_uom_qty*u.factor) as quantity, @@ -105,8 +116,8 @@ class report_sale_order_category(osv.osv): left join product_product p on (p.id=l.product_id) left join product_template t on (t.id=p.product_tmpl_id) left join product_uom u on (u.id=l.product_uom) - where l.product_uom_qty != 0 - group by t.categ_id, to_char(s.date_order, 'YYYY-MM-01'),s.state + where l.product_uom_qty != 0 + group by t.categ_id,to_char(s.date_order, 'YYYY'),to_char(s.date_order,'MM'),s.state ) """) report_sale_order_category() @@ -119,13 +130,13 @@ class report_turnover_per_month(osv.osv): 'name': fields.date('Month', readonly=True), 'turnover': fields.float('Total Turnover', readonly=True), } - + def init(self, cr): cr.execute(""" create or replace view report_turnover_per_month as ( select min(am.id) as id, sum(credit) as turnover,to_char(am.date, 'YYYY-MM-01') as name from account_move_line am - where am.account_id in (select distinct(account_id) from account_invoice_line) - and + where am.account_id in (select distinct(account_id) from account_invoice_line) + and am.move_id in(select distinct(aw.move_id) from account_invoice aw,account_invoice_line l where l.invoice_id=aw.id) group by to_char(am.date, 'YYYY-MM-01') ) @@ -137,17 +148,17 @@ class report_turnover_per_product(osv.osv): _description = "Turnover Per Product" _auto = False _rec_name = 'product_id' - + _columns = { 'product_id': fields.many2one('product.product','Product', readonly=True), 'turnover': fields.float('Total Turnover', readonly=True), } - + def init(self, cr): cr.execute(""" create or replace view report_turnover_per_product as ( - select min(am.id) as id, sum(credit) as turnover,am.product_id as product_id - from account_move_line am + select min(am.id) as id, sum(credit) as turnover,am.product_id as product_id + from account_move_line am group by am.product_id ) """) @@ -176,12 +187,12 @@ class report_sale_order_created(osv.osv): 'create_date' : fields.datetime('Create Date', readolnly=True) } _order = 'create_date' - + def init(self, cr): cr.execute("""create or replace view report_sale_order_created as ( select sale.id as id, sale.date_order as date_order, sale.name as name, - sale.partner_id as partner_id, + sale.partner_id as partner_id, sale.partner_shipping_id as partner_shipping_id, sale.amount_untaxed as amount_untaxed, sale.state as state, sale.create_date as create_date diff --git a/addons/report_sale/report_sale_view.xml b/addons/report_sale/report_sale_view.xml index 4194f374d15..c7a09a1804b 100644 --- a/addons/report_sale/report_sale_view.xml +++ b/addons/report_sale/report_sale_view.xml @@ -9,6 +9,7 @@ + @@ -73,6 +74,7 @@ + diff --git a/addons/report_timesheet/report_timesheet.py b/addons/report_timesheet/report_timesheet.py index ee7cb8a23fd..015634b9001 100644 --- a/addons/report_timesheet/report_timesheet.py +++ b/addons/report_timesheet/report_timesheet.py @@ -27,10 +27,12 @@ class report_timesheet_user(osv.osv): _description = "Timesheet per day" _auto = False _columns = { - 'name': fields.date('Date', readonly=True), + 'name': fields.char('Year',size=64,required=False, readonly=True), 'user_id':fields.many2one('res.users', 'User', readonly=True), 'quantity': fields.float('Quantity', readonly=True), - 'cost': fields.float('Cost', 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), } _order = 'name desc,user_id desc' def init(self, cr): @@ -39,7 +41,8 @@ class report_timesheet_user(osv.osv): create or replace view report_timesheet_user as ( select min(l.id) as id, - l.date as name, + to_char(l.date,'YYYY') as name, + to_char(l.date,'MM') as month, l.user_id, sum(l.unit_amount) as quantity, sum(l.amount) as cost @@ -47,7 +50,7 @@ class report_timesheet_user(osv.osv): account_analytic_line l where user_id is not null - group by l.date, l.user_id + group by l.date, to_char(l.date,'YYYY'),to_char(l.date,'MM'), l.user_id ) """) report_timesheet_user() @@ -57,10 +60,13 @@ class report_timesheet_account(osv.osv): _description = "Timesheet per account" _auto = False _columns = { - 'name': fields.date('Month', readonly=True), + 'name': fields.char('Year',size=64,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('Quantity', 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), + } _order = 'name desc,account_id desc,user_id desc' def init(self, cr): @@ -69,14 +75,15 @@ class report_timesheet_account(osv.osv): create or replace view report_timesheet_account as ( select min(id) as id, - to_char(create_date, 'YYYY-MM-01') as name, + to_char(create_date, 'YYYY') as name, + to_char(create_date,'MM') as month, user_id, account_id, sum(unit_amount) as quantity from account_analytic_line group by - to_char(create_date, 'YYYY-MM-01'), user_id, account_id + to_char(create_date, 'YYYY'),to_char(create_date, 'MM'), user_id, account_id ) """) report_timesheet_account() @@ -87,10 +94,12 @@ class report_timesheet_account_date(osv.osv): _description = "Daily timesheet per account" _auto = False _columns = { - 'name': fields.date('Date', readonly=True), + 'name': fields.char('Year',size=64,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('Quantity', 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), } _order = 'name desc,account_id desc,user_id desc' @@ -100,14 +109,15 @@ class report_timesheet_account_date(osv.osv): create or replace view report_timesheet_account_date as ( select min(id) as id, - date as name, + to_char(date,'YYYY') as name, + to_char(date,'MM') as month, user_id, account_id, sum(unit_amount) as quantity from account_analytic_line group by - date, user_id, account_id + to_char(date,'YYYY'),to_char(date,'MM'), user_id, account_id ) """) report_timesheet_account_date() diff --git a/addons/report_timesheet/report_timesheet_view.xml b/addons/report_timesheet/report_timesheet_view.xml index ae127fdb9f8..4ebaaca7e86 100644 --- a/addons/report_timesheet/report_timesheet_view.xml +++ b/addons/report_timesheet/report_timesheet_view.xml @@ -25,6 +25,7 @@ + @@ -185,6 +186,7 @@
+ @@ -246,6 +248,7 @@ + diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml index 0bcdd12d545..5240adc3775 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.py b/addons/sale/sale.py index 5b163a3fb45..1ab84d9fb98 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -764,7 +764,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'), 'company_id': fields.related('order_id','company_id',type='many2one',object='res.company',string='Company') diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index c8af35d8f52..584aed919fb 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -252,6 +252,27 @@ + + My Sales Order + ir.actions.act_window + sale.order + form + tree,form,calendar,graph + [('user_id','=',uid)] + + + + + + All Sales Order + ir.actions.act_window + sale.order + form + tree,form,calendar,graph + + + + New Quotation ir.actions.act_window @@ -290,10 +311,61 @@ form tree,form,calendar,graph [('state','in',('progress','waiting_date','manual'))] - + - + + + All Quotations + ir.actions.act_window + sale.order + form + tree,form,calendar,graph + [('state','=','draft')] + + + + + My sales in shipping exception + ir.actions.act_window + sale.order + form + tree,form,calendar,graph + [('state','in',('shipping_except','invoice_except')),('user_id','=',uid)] + + + + + My sales order waiting Invoice + ir.actions.act_window + sale.order + form + tree,form,calendar,graph + [('state','=','manual'),('user_id','=',uid)] + + + + + My sales order in progress + ir.actions.act_window + sale.order + form + tree,form,calendar,graph + [('state','in',('progress','waiting_date','manual')),('user_id','=',uid)] + + + + + My Quotations + ir.actions.act_window + sale.order + form + tree,form,calendar,graph + [('state','=','draft'),('user_id','=',uid)] + + + + Old Quotations ir.actions.act_window sale.order diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml index 124c60c4a4b..a78da2362e5 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 @@ -323,9 +322,8 @@ form 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