← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3

 

Purnendu Singh (OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #568537 The __compute method of account_account needs optmization to improve Accounting Performance!
  https://bugs.launchpad.net/bugs/568537
  #588776 Error when closing fiscal year
  https://bugs.launchpad.net/bugs/588776
  #686508 Not able to validate sales receipt
  https://bugs.launchpad.net/bugs/686508
  #686513 Not able to validate supplier vouchers
  https://bugs.launchpad.net/bugs/686513
  #691218 add an employee to a department
  https://bugs.launchpad.net/bugs/691218
  #692139 Account Journal onchange_type method context undefined error
  https://bugs.launchpad.net/bugs/692139
  #692962 In hr contract, shouldn't be able to enter an end date lower than a start date
  https://bugs.launchpad.net/bugs/692962
  #693476 [6.0] sale manager dashboard - "Sales by Customer" - incomplete
  https://bugs.launchpad.net/bugs/693476
  #693810 [RC1]Pay button when you pay directly in Sales receipt form
  https://bugs.launchpad.net/bugs/693810
  #693833 [6.0] performance issues - stock_move, account_move_lines and others
  https://bugs.launchpad.net/bugs/693833
  #694937 [6.0] account entry analysis - unreconciled does not filter 
  https://bugs.launchpad.net/bugs/694937
  #695439 membership: can't open members via GTK client
  https://bugs.launchpad.net/bugs/695439
  #697080 Payment Invoice is not considering the currency in Invoice
  https://bugs.launchpad.net/bugs/697080
  #697207 Bug when sending followups without specifying any email address
  https://bugs.launchpad.net/bugs/697207
  #697714 Unclear warning on cancel opening entries
  https://bugs.launchpad.net/bugs/697714
  #699809 [6.0 and 5.0] Installing account_analytic_analysis you have a maximu of 2147 analytic accounts
  https://bugs.launchpad.net/bugs/699809
  #701895 [Trunk] account_analytic_plan  break the creation of inovice from analytic lines
  https://bugs.launchpad.net/bugs/701895
  #702027 [trunk]hr_payroll minor typos
  https://bugs.launchpad.net/bugs/702027

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2/+merge/46468

Hello sir,

Fixes:
https://bugs.launchpad.net/openobject-addons/+bug/693833
  performance issues - stock_move, account_move_lines and others

Thanks,
Purnendu Singh
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2/+merge/46468
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'account/account.py'
--- account/account.py	2011-01-14 15:01:06 +0000
+++ account/account.py	2011-01-17 11:28:02 +0000
@@ -1130,7 +1130,7 @@
         'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'),
         'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True),
         'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
-        'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}),
+        'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),
         'narration':fields.text('Narration'),
         'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
     }

=== modified file 'account/account_move_line.py'
--- account/account_move_line.py	2011-01-17 05:56:37 +0000
+++ account/account_move_line.py	2011-01-17 11:28:02 +0000
@@ -494,12 +494,12 @@
         'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1),
         'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"),
         'partner_id': fields.many2one('res.partner', 'Partner', select=1, ondelete='restrict'),
-        'date_maturity': fields.date('Due date', help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
-        'date': fields.related('move_id','date', string='Effective date', type='date', required=True,
+        'date_maturity': fields.date('Due date', select=True ,help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
+        'date': fields.related('move_id','date', string='Effective date', type='date', required=True, select=True,
                                 store = {
                                     'account.move': (_get_move_lines, ['date'], 20)
                                 }),
-        'date_created': fields.date('Creation date'),
+        'date_created': fields.date('Creation date', select=True),
         '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'),

=== modified file 'account/invoice.py'
--- account/invoice.py	2011-01-14 00:11:01 +0000
+++ account/invoice.py	2011-01-17 11:28:02 +0000
@@ -211,8 +211,8 @@
             \n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \
             \n* The \'Paid\' state is set automatically when invoice is paid.\
             \n* The \'Cancelled\' state is used when user cancel invoice.'),
-        'date_invoice': fields.date('Invoice Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, help="Keep empty to use the current date"),
-        'date_due': fields.date('Due Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]},
+        'date_invoice': fields.date('Invoice Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, select=True, help="Keep empty to use the current date", select=True),
+        'date_due': fields.date('Due Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, select=True,
             help="If you use payment terms, the due date will be computed automatically at the generation "\
                 "of accounting entries. If you keep the payment term and the due date empty, it means direct payment. The payment term may compute several due dates, for example 50% now, 50% in one month."),
         'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, readonly=True, required=True, states={'draft':[('readonly',False)]}),

=== modified file 'account_followup/account_followup.py'
--- account_followup/account_followup.py	2011-01-14 00:11:01 +0000
+++ account_followup/account_followup.py	2011-01-17 11:28:02 +0000
@@ -54,7 +54,7 @@
     _inherit = 'account.move.line'
     _columns = {
         'followup_line_id': fields.many2one('account_followup.followup.line', 'Follow-up Level'),
-        'followup_date': fields.date('Latest Follow-up'),
+        'followup_date': fields.date('Latest Follow-up', select=True),
                 }
 
 account_move_line()

=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2011-01-14 00:11:01 +0000
+++ account_voucher/account_voucher.py	2011-01-17 11:28:02 +0000
@@ -181,7 +181,7 @@
             ('receipt','Receipt'),
         ],'Default Type', readonly=True, states={'draft':[('readonly',False)]}),
         'name':fields.char('Memo', size=256, readonly=True, states={'draft':[('readonly',False)]}),
-        'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
+        'date':fields.date('Date', readonly=True, select=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
         'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
         'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}),
         'line_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=True, states={'draft':[('readonly',False)]}),
@@ -218,7 +218,7 @@
         ],'Payment', select=True, readonly=True, states={'draft':[('readonly',False)]}),
         'tax_id':fields.many2one('account.tax', 'Tax', readonly=True, states={'draft':[('readonly',False)]}),
         'pre_line':fields.boolean('Previous Payments ?', required=False),
-        'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}),
+        'date_due': fields.date('Due Date', readonly=True, select=True, states={'draft':[('readonly',False)]}),
         'payment_option':fields.selection([
                                            ('without_writeoff', 'Keep Open'),
                                            ('with_writeoff', 'Reconcile with Write-Off'),

=== modified file 'analytic/analytic.py'
--- analytic/analytic.py	2011-01-14 00:11:01 +0000
+++ analytic/analytic.py	2011-01-17 11:28:02 +0000
@@ -60,7 +60,7 @@
             return res
 
         where_date = ''
-        where_clause_args = [tuple(child_ids)]  
+        where_clause_args = [tuple(child_ids)]
         if context.get('from_date', False):
             where_date += " AND l.date >= %s"
             where_clause_args  += [context['from_date']]
@@ -71,20 +71,20 @@
               SELECT a.id,
                      sum(
                          CASE WHEN l.amount > 0
-                         THEN l.amount 
+                         THEN l.amount
                          ELSE 0.0
                          END
                           ) as debit,
                      sum(
                          CASE WHEN l.amount < 0
                          THEN -l.amount
-                         ELSE 0.0 
+                         ELSE 0.0
                          END
                           ) as credit,
                      COALESCE(SUM(l.amount),0) AS balance,
                      COALESCE(SUM(l.unit_amount),0) AS quantity
-              FROM account_analytic_account a 
-                  LEFT JOIN account_analytic_line l ON (a.id = l.account_id) 
+              FROM account_analytic_account a
+                  LEFT JOIN account_analytic_line l ON (a.id = l.account_id)
               WHERE a.id IN %s
               """ + where_date + """
               GROUP BY a.id""", where_clause_args)
@@ -128,7 +128,7 @@
         'contact_id': fields.many2one('res.partner.address', 'Contact'),
         'user_id': fields.many2one('res.users', 'Account Manager'),
         'date_start': fields.date('Date Start'),
-        'date': fields.date('Date End'),
+        'date': fields.date('Date End', select=True),
         'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
         'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
                                   help='* When an account is created its in \'Draft\' state.\
@@ -230,7 +230,7 @@
 
     _columns = {
         'name': fields.char('Description', size=256, required=True),
-        'date': fields.date('Date', required=True, select=1),
+        'date': fields.date('Date', required=True, select=True),
         'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
         'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
         'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True, domain=[('type','<>','view')]),

=== modified file 'hr_evaluation/hr_evaluation.py'
--- hr_evaluation/hr_evaluation.py	2011-01-14 00:11:01 +0000
+++ hr_evaluation/hr_evaluation.py	2011-01-17 11:28:02 +0000
@@ -143,7 +143,7 @@
     _description = "Employee Evaluation"
     _rec_name = 'employee_id'
     _columns = {
-        'date': fields.date("Evaluation Deadline", required=True),
+        'date': fields.date("Evaluation Deadline", required=True, select=True),
         'employee_id': fields.many2one('hr.employee', "Employee", required=True),
         'note_summary': fields.text('Evaluation Summary'),
         'note_action': fields.text('Action Plan',
@@ -165,7 +165,7 @@
             ('done','Done'),
             ('cancel','Cancelled'),
         ], 'State', required=True, readonly=True),
-        'date_close': fields.date('Ending Date'),
+        'date_close': fields.date('Ending Date', select=True),
         'progress': fields.float("Progress"),
     }
     _defaults = {

=== modified file 'hr_expense/hr_expense.py'
--- hr_expense/hr_expense.py	2011-01-14 00:11:01 +0000
+++ hr_expense/hr_expense.py	2011-01-17 11:28:02 +0000
@@ -60,12 +60,12 @@
         'name': fields.char('Description', size=128, required=True),
         'id': fields.integer('Sheet ID', readonly=True),
         'ref': fields.char('Reference', size=32),
-        'date': fields.date('Date'),
+        'date': fields.date('Date', select=True),
         'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is invoiced"),
         'employee_id': fields.many2one('hr.employee', "Employee", required=True),
         'user_id': fields.many2one('res.users', 'User', required=True),
-        'date_confirm': fields.date('Confirmation Date', help = "Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."),
-        'date_valid': fields.date('Validation Date', help = "Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."),
+        'date_confirm': fields.date('Confirmation Date', select=True, help = "Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."),
+        'date_valid': fields.date('Validation Date', select=True, help = "Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."),
         'user_valid': fields.many2one('res.users', 'Validation User'),
         'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
         'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),

=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py	2011-01-14 00:11:01 +0000
+++ hr_recruitment/hr_recruitment.py	2011-01-17 11:28:02 +0000
@@ -126,7 +126,7 @@
         'partner_id': fields.many2one('res.partner', 'Partner'),
         'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
                                  domain="[('partner_id','=',partner_id)]"),
-        'create_date': fields.datetime('Creation Date', readonly=True),
+        'create_date': fields.datetime('Creation Date', readonly=True, select=True),
         'write_date': fields.datetime('Update Date', readonly=True),
         'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage'),
         'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True,
@@ -137,8 +137,8 @@
         'company_id': fields.many2one('res.company', 'Company'),
         'user_id': fields.many2one('res.users', 'Responsible'),
         # Applicant Columns
-        'date_closed': fields.datetime('Closed', readonly=True),
-        'date_open': fields.datetime('Opened', readonly=True),
+        'date_closed': fields.datetime('Closed', readonly=True, select=True),
+        'date_open': fields.datetime('Opened', readonly=True, select=True),
         'date': fields.datetime('Date'),
         'date_action': fields.date('Next Action Date'),
         'title_action': fields.char('Next Action', size=64),

=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
--- hr_timesheet_sheet/hr_timesheet_sheet.py	2011-01-14 00:11:01 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet.py	2011-01-17 11:28:02 +0000
@@ -262,7 +262,7 @@
         'user_id': fields.related('employee_id', 'user_id', type="many2one", relation="res.users", store=True, string="User", required=False, readonly=True),#fields.many2one('res.users', 'User', required=True, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}),
         'date_from': fields.date('Date from', required=True, select=1, readonly=True, states={'new':[('readonly', False)]}),
         'date_to': fields.date('Date to', required=True, select=1, readonly=True, states={'new':[('readonly', False)]}),
-        'date_current': fields.date('Current date', required=True),
+        'date_current': fields.date('Current date', required=True, select=1),
         'timesheet_ids' : one2many_mod('hr.analytic.timesheet', 'sheet_id',
             'Timesheet lines', domain=[('date', '=', time.strftime('%Y-%m-%d'))],
             readonly=True, states={

=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py	2011-01-17 08:28:47 +0000
+++ point_of_sale/point_of_sale.py	2011-01-17 11:28:02 +0000
@@ -33,7 +33,7 @@
     """ Point of Sale journal configuration"""
     _name = 'pos.config.journal'
     _description = "Journal Configuration"
-    
+
     _columns = {
         'name': fields.char('Description', size=64),
         'code': fields.char('Code', size=64),
@@ -46,7 +46,7 @@
 class pos_company_discount(osv.osv):
     """ Company Discount and Cashboxes """
     _inherit = 'res.company'
-    
+
     _columns = {
         'company_discount': fields.float('Max Discount(%)', digits_compute=dp.get_precision('Point Of Sale')),
         'max_diff': fields.float('Max Difference for Cashboxes', digits_compute=dp.get_precision('Point Of Sale Discount')),
@@ -247,14 +247,14 @@
         'num_sale': fields.char('Internal Note', size=64),
         'shop_id': fields.many2one('sale.shop', 'Shop', required=True,
             states={'draft': [('readonly', False)]}, readonly=True),
-        'date_order': fields.datetime('Date Ordered', readonly=True),
+        'date_order': fields.datetime('Date Ordered', readonly=True, select=True),
         'date_validation': fields.function(_get_date_payment,
                                            method=True,
                                            string='Validation Date',
-                                           type='date', store=True),
+                                           type='date', select=True, store=True),
         'date_payment': fields.function(_get_date_payment2, method=True,
                                         string='Payment Date',
-                                        type='date', store=True),
+                                        type='date', select=True, store=True),
         'date_validity': fields.date('Validity Date', required=True),
         'user_id': fields.many2one('res.users', 'Connected Salesman', help="Person who uses the the cash register. It could be a reliever, a student or an interim employee."),
         'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True, help="User who is logged into the system."),
@@ -332,7 +332,7 @@
 
 
     def test_order_lines(self, cr, uid, order, context=None):
-        """ Test order line is created or not for the order 
+        """ Test order line is created or not for the order
         @param name: Names of fields.
         @return: True
         """
@@ -573,9 +573,9 @@
         return statement_id
 
     def add_product(self, cr, uid, order_id, product_id, qty, context=None):
-        
+
         """Create a new order line the order"""
-        
+
         line_obj = self.pool.get('pos.order.line')
         values = self.read(cr, uid, order_id, ['partner_id', 'pricelist_id'])
 
@@ -596,9 +596,9 @@
         return order_line_id, price
 
     def refund(self, cr, uid, ids, context=None):
-        
+
         """Create a copy of order  for refund order"""
-        
+
         clone_list = []
         line_obj = self.pool.get('pos.order.line')
 
@@ -623,9 +623,9 @@
         return clone_list
 
     def action_invoice(self, cr, uid, ids, context=None):
-        
+
         """Create a invoice of order  """
-        
+
         inv_ref = self.pool.get('account.invoice')
         inv_line_ref = self.pool.get('account.invoice.line')
         product_obj = self.pool.get('product.product')

=== modified file 'sale/sale.py'
--- sale/sale.py	2011-01-17 10:19:58 +0000
+++ sale/sale.py	2011-01-17 11:28:02 +0000
@@ -185,7 +185,7 @@
         for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context):
             result[line.order_id.id] = True
         return result.keys()
-    
+
     _columns = {
         'name': fields.char('Order Reference', size=64, required=True,
             readonly=True, states={'draft': [('readonly', False)]}, select=True),
@@ -202,9 +202,9 @@
             ('done', 'Done'),
             ('cancel', 'Cancelled')
             ], 'Order State', readonly=True, help="Gives the state of the quotation or sales order. \nThe exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception). \nThe 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to run on the date 'Ordered Date'.", select=True),
-        'date_order': fields.date('Ordered Date', required=True, readonly=True, states={'draft': [('readonly', False)]}),
-        'create_date': fields.date('Creation Date', readonly=True, help="Date on which sales order is created."),
-        'date_confirm': fields.date('Confirmation Date', readonly=True, help="Date on which sales order is confirmed."),
+        'date_order': fields.date('Ordered Date', required=True, readonly=True, select=True, states={'draft': [('readonly', False)]}),
+        'create_date': fields.date('Creation Date', readonly=True, select=True, help="Date on which sales order is created."),
+        'date_confirm': fields.date('Confirmation Date', readonly=True, select=True, help="Date on which sales order is confirmed."),
         'user_id': fields.many2one('res.users', 'Salesman', states={'draft': [('readonly', False)]}, select=True),
         'partner_id': fields.many2one('res.partner', 'Customer', readonly=True, states={'draft': [('readonly', False)]}, required=True, change_default=True, select=True),
         'partner_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True, required=True, states={'draft': [('readonly', False)]}, help="Invoice address for current sales order."),