diff --git a/addons/account/account.py b/addons/account/account.py index 2bbc3ffe7d2..212aaee26d5 100755 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -430,7 +430,7 @@ class account_account(osv.osv): _constraints = [ (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']), - (_check_type, 'You cannot create an account! \nMake sure if the account has children then it should be type "View"! ', ['type']), + (_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']), ] _sql_constraints = [ ('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !') @@ -2317,7 +2317,7 @@ class account_account_template(osv.osv): _check_recursion = check_cycle _constraints = [ (_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']), - (_check_type, 'You cannot create an account template! \nMake sure if the account template has parent then it should be type "View"! ', ['type']), + (_check_type, 'Configuration Error! \nYou cannot define children to an account with internal type different of "View"! ', ['type']), ] diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 125e5b57e7d..dfd6acdf7c3 100755 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -954,6 +954,7 @@ class account_move_line(osv.osv): if view_type == 'search' and result['fields'].get('journal_id', False): result['fields']['journal_id']['selection'] = journal_pool.name_search(cr, uid, '', [], context=context) ctx = context.copy() + #we add the refunds journal in the selection field of journal if context.get('journal_type', False) == 'sale': ctx.update({'journal_type': 'sale_refund'}) result['fields']['journal_id']['selection'] += journal_pool.name_search(cr, uid, '', [], context=ctx) diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index fa1f9d28e87..b3030dbaa96 100755 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -2,7 +2,7 @@ - + diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index bea71e92a08..a56d850a8e3 100755 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -170,6 +170,8 @@ + + @@ -179,7 +181,6 @@ - @@ -2387,6 +2388,7 @@ + diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 884aa9a5faf..78b3322bbf4 100755 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -540,7 +540,7 @@ class account_invoice(osv.osv): journal_ids = obj_journal.search(cr, uid, [('company_id','=',company_id), ('type', '=', journal_type)]) if journal_ids: val['journal_id'] = journal_ids[0] - res_journal_default = self.pool.get('ir.values').get(cr, uid, 'default', False, ['account.invoice']) + res_journal_default = self.pool.get('ir.values').get(cr, uid, 'default', 'type=%s' % (type), ['account.invoice']) for r in res_journal_default: if r[1] == 'journal_id' and r[2] in journal_ids: val['journal_id'] = r[2] diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py index 53f85dd4860..1047b9017d6 100755 --- a/addons/account/report/account_general_ledger.py +++ b/addons/account/report/account_general_ledger.py @@ -121,7 +121,7 @@ class general_ledger(report_sxw.rml_parse, common_report_header): res.append(child_account) elif self.display_account == 'bal_solde': if child_account.type != 'view' and num_entry <> 0: - if currency_obj.is_zero(self.cr, self.uid, currency, sold_account) != 0: + if not currency_obj.is_zero(self.cr, self.uid, currency, sold_account): res.append(child_account) else: res.append(child_account) diff --git a/addons/account_accountant/__openerp__.py b/addons/account_accountant/__openerp__.py index 41dc6c130a8..089d930d4d5 100755 --- a/addons/account_accountant/__openerp__.py +++ b/addons/account_accountant/__openerp__.py @@ -37,6 +37,6 @@ items and the chart of accounts. 'test': [], 'installable': True, 'active': False, - 'certificate': '', + 'certificate': '00395091383933390541', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_sequence/__openerp__.py b/addons/account_sequence/__openerp__.py index 1e3f91a7876..cc13869b1f2 100755 --- a/addons/account_sequence/__openerp__.py +++ b/addons/account_sequence/__openerp__.py @@ -38,7 +38,7 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': '', + 'certificate': '00475376442024623469', } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/anonymization/ir.model.fields.anonymization.csv b/addons/anonymization/ir.model.fields.anonymization.csv index 7f04f813c95..f0918ccda80 100644 --- a/addons/anonymization/ir.model.fields.anonymization.csv +++ b/addons/anonymization/ir.model.fields.anonymization.csv @@ -22,6 +22,7 @@ anonymization_field_account_move_line_credit,account.move.line,credit anonymization_field_account_move_line_tax_amount,account.move.line,tax_amount anonymization_field_account_move_line_amount_currency,account.move.line,amount_currency anonymization_field_account_move_line_amount_taxed,account.move.line,amount_taxed +anonymization_field_account_analytic_line_amount,account.analytic.line,amount anonymization_field_sale_order_amount_tax,sale.order,amount_tax anonymization_field_sale_order_amount_total,sale.order,amount_total anonymization_field_sale_order_amount_untaxed,sale.order,amount_untaxed @@ -33,3 +34,6 @@ anonymization_field_purchase_order_amount_untaxed,purchase.order,amount_untaxed anonymization_field_purchase_order_line_price_unit,purchase.order.line,price_unit anonymization_field_account_invoice_tax_amount,account.invoice.tax,amount anonymization_field_account_invoice_tax_base,account.invoice.tax,base +anonymization_field_product_name,product.template,name +anonymization_field_res_users_name,res.users,name +anonymization_field_res_users_signature,res.users,signature diff --git a/addons/base_calendar/test/base_calendar_test.yml b/addons/base_calendar/test/base_calendar_test.yml index 766d46e0257..4c0f3fc126f 100755 --- a/addons/base_calendar/test/base_calendar_test.yml +++ b/addons/base_calendar/test/base_calendar_test.yml @@ -3,8 +3,8 @@ - !record {model: calendar.event, id: calendar_event_technicalpresentation0}: class: private - date: !eval "'%s-04-30 16:00:00' %(datetime.now().year)" - date_deadline: !eval "'%s-04-30 18:30:00' %(datetime.now().year)" + date: '2011-04-30 16:00:00' + date_deadline: '2011-04-30 18:30:00' description: The Technical Presentation will cover following topics:\n* Creating OpenERP class\n* Views\n* Wizards\n* Workflows duration: 2.5 @@ -35,8 +35,8 @@ !record {model: calendar.event, id: calendar_event_alldaytestevent0}: allday: 1 class: confidential - date: !eval "'%s-04-30 00:00:00' %(datetime.now().year)" - date_deadline: !eval "'%s-04-30 00:00:00' %(datetime.now().year)" + date: '2011-04-30 00:00:00' + date_deadline: '2011-04-30 00:00:00' description: 'All day technical test ' location: School name: All day test event diff --git a/addons/base_contact/base_contact_installer.py b/addons/base_contact/base_contact_installer.py index 3936b336e9f..febba654350 100755 --- a/addons/base_contact/base_contact_installer.py +++ b/addons/base_contact/base_contact_installer.py @@ -37,25 +37,30 @@ class base_contact_installer(osv.osv_memory): """ obj = self.pool.get("base.contact.installer").browse(cr, uid, uid, context=context) if obj.migrate: - cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact; - CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$ + # Enable PL/pgSQL if not enabled yet in the database + cr.execute("SELECT 1 FROM pg_language WHERE lanname = 'plpgsql'") + if not cr.fetchone(): + cr.execute("CREATE LANGUAGE plpgsql;") + + cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact; + CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$ DECLARE new_name varchar; new_phonenum varchar; BEGIN - IF(TG_OP='INSERT') THEN - INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current'); - UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id; + IF(TG_OP='INSERT') THEN + INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current'); + UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id; END IF; RETURN NEW; END; - $contactjob$ LANGUAGE plpgsql; - CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""") + $contactjob$ LANGUAGE plpgsql; + CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""") cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)") cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact") - + cr.execute("DROP FUNCTION IF EXISTS add_to_job()") base_contact_installer() diff --git a/addons/base_module_doc_rst/__openerp__.py b/addons/base_module_doc_rst/__openerp__.py index 9a2e33240ac..a8b54d12abd 100755 --- a/addons/base_module_doc_rst/__openerp__.py +++ b/addons/base_module_doc_rst/__openerp__.py @@ -36,6 +36,6 @@ 'update_xml': ['base_module_doc_rst_view.xml', 'base_module_doc_rst_wizard.xml', 'module_report.xml'], 'demo_xml': [], 'installable': True, - 'certificate': '', + 'certificate': '001288481437217734509', } diff --git a/addons/crm_partner_assign/__openerp__.py b/addons/crm_partner_assign/__openerp__.py index 0c91627d518..5c12261a6a6 100755 --- a/addons/crm_partner_assign/__openerp__.py +++ b/addons/crm_partner_assign/__openerp__.py @@ -39,5 +39,5 @@ based on geolocalization. ], 'installable': True, 'active': False, - 'certificate': False, + 'certificate': '00503409558942442061', } diff --git a/addons/document_ftp/__openerp__.py b/addons/document_ftp/__openerp__.py index 798ecba72c3..d7d087f234e 100755 --- a/addons/document_ftp/__openerp__.py +++ b/addons/document_ftp/__openerp__.py @@ -45,7 +45,7 @@ ], 'installable': True, 'active': False, - 'certificate': None, + 'certificate': '00934787762705016005', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/html_view/__openerp__.py b/addons/html_view/__openerp__.py index aaaec27fc09..1cb7aa9e608 100755 --- a/addons/html_view/__openerp__.py +++ b/addons/html_view/__openerp__.py @@ -12,6 +12,6 @@ 'update_xml': ['security/ir.model.access.csv','html_view.xml',], 'installable': True, 'active': False, - 'certificate': '', + 'certificate': '001302129363003126557', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_ca/__openerp__.py b/addons/l10n_ca/__openerp__.py index 9526eaba373..b3edda0a80e 100755 --- a/addons/l10n_ca/__openerp__.py +++ b/addons/l10n_ca/__openerp__.py @@ -44,7 +44,7 @@ ], "demo_xml" : [], "installable" : True, - "certificate" : '' + "certificate" : '00941680933773696173', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_cn/__openerp__.py b/addons/l10n_cn/__openerp__.py index 33085c430ad..c7d60e67937 100755 --- a/addons/l10n_cn/__openerp__.py +++ b/addons/l10n_cn/__openerp__.py @@ -39,9 +39,9 @@ "l10n_chart_cn_wizard.xml", ], "license": "GPL-3", - "certificate":"", - "active": False, - "installable": True + "active": False, + "installable": True, + "certificate": '00925445983542952285', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_gr/__terp__.py b/addons/l10n_gr/__terp__.py index 687b7ff91b1..1a871d8a8ee 100755 --- a/addons/l10n_gr/__terp__.py +++ b/addons/l10n_gr/__terp__.py @@ -31,7 +31,8 @@ "demo_xml" : [], "update_xml" : ["account_types.xml","account_chart.xml", "account_full_chart.xml", "account_tax.xml","l10n_gr_wizard.xml"], - "installable": True + "installable": True, + 'certificate': '001146244418929008029', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_gt/__openerp__.py b/addons/l10n_gt/__openerp__.py index e8b5bcdd0dc..8e4e686820c 100755 --- a/addons/l10n_gt/__openerp__.py +++ b/addons/l10n_gt/__openerp__.py @@ -49,6 +49,6 @@ ], 'demo_xml': [], 'installable': True, - 'certificate': '', + 'certificate': '00815146661827601309', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/l10n_nl/__openerp__.py b/addons/l10n_nl/__openerp__.py index 12430e99243..5e61b7fd46e 100755 --- a/addons/l10n_nl/__openerp__.py +++ b/addons/l10n_nl/__openerp__.py @@ -120,7 +120,7 @@ Dit is een basismodule om een uitgebreid grootboek- en BTW schema voor Nederland ], "installable": True, - 'certificate': '', + 'certificate': '00976041422960053277', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mail_gateway/__openerp__.py b/addons/mail_gateway/__openerp__.py index f442124193a..e91257fd148 100755 --- a/addons/mail_gateway/__openerp__.py +++ b/addons/mail_gateway/__openerp__.py @@ -39,6 +39,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': None, + 'certificate': '001056784984222247309', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/membership/membership_view.xml b/addons/membership/membership_view.xml index bf766ca654b..2b0869670e9 100755 --- a/addons/membership/membership_view.xml +++ b/addons/membership/membership_view.xml @@ -201,6 +201,7 @@ Members res.partner + {"search_default_all_members": 1} diff --git a/addons/procurement/__openerp__.py b/addons/procurement/__openerp__.py index 1cdc1462f89..d30128041f3 100755 --- a/addons/procurement/__openerp__.py +++ b/addons/procurement/__openerp__.py @@ -48,6 +48,6 @@ 'demo_xml': ['stock_orderpoint.xml'], 'installable': True, 'active': False, - 'certificate': '', + 'certificate': '00954248826881074509', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_long_term/__openerp__.py b/addons/project_long_term/__openerp__.py index 25d06e3efe1..79d3722bbb9 100755 --- a/addons/project_long_term/__openerp__.py +++ b/addons/project_long_term/__openerp__.py @@ -60,7 +60,7 @@ Features. ], 'installable': True, 'active': False, - 'certificate': None, + 'certificate': '001227470751077315069', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_mailgate/__openerp__.py b/addons/project_mailgate/__openerp__.py index a5e7fd46f4c..6221f781fa7 100755 --- a/addons/project_mailgate/__openerp__.py +++ b/addons/project_mailgate/__openerp__.py @@ -40,7 +40,7 @@ Moreover, it keeps track of all further communications and task states. ], 'installable': True, 'active': False, - 'certificate': '', + 'certificate': '001075048780413258261', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml b/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml index 86ad19c9943..4cf790c4e2b 100755 --- a/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml +++ b/addons/project_timesheet/test/worktask_entry_to_timesheetline_entry.yml @@ -50,9 +50,9 @@ Create a timesheet sheet for HR manager - !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_sheetforhrmanager0}: - date_current: !eval time.strftime('%Y-%m-%d') - date_from: !eval "'%s-%s-01' %(datetime.now().year, datetime.now().month)" - date_to: !eval "'%s-%s-30' %(datetime.now().year, datetime.now().month)" + date_current: !eval time.strftime('%Y-06-%d') + date_from: !eval "'%s-06-01' %(datetime.now().year)" + date_to: !eval "'%s-06-30' %(datetime.now().year)" name: Sheet for hr manager state: new user_id: res_users_hrmanager0 @@ -70,7 +70,7 @@ Create a task 'Get all timesheet records' - !record {model: project.task, id: project_task_getalltimesheetrecords0}: - date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S') + date_start: !eval time.strftime('%Y-06-%d %H:%M:%S') name: Get all timesheet records planned_hours: 20.0 project_id: project_project_timesheetmanagement0 @@ -92,7 +92,7 @@ - !record {model: project.task, id: project_task_getalltimesheetrecords0}: work_ids: - - date: !eval time.strftime('%Y-%m-%d %H:%M:%S') + - date: !eval time.strftime('%Y-06-%d %H:%M:%S') hours: 10.0 name: Get work calendar of all employees user_id: res_users_hrmanager0 diff --git a/addons/resource/__openerp__.py b/addons/resource/__openerp__.py index 9b9f6c7ca89..3c24403add3 100755 --- a/addons/resource/__openerp__.py +++ b/addons/resource/__openerp__.py @@ -45,7 +45,7 @@ ], 'installable': True, 'active': False, - 'certificate': None, + 'certificate': '00746371192190459469', } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_mrp/__openerp__.py b/addons/sale_mrp/__openerp__.py index 9c3404ada74..ea6bafae1b2 100755 --- a/addons/sale_mrp/__openerp__.py +++ b/addons/sale_mrp/__openerp__.py @@ -43,6 +43,6 @@ 'test':['test/sale_mrp.yml'], 'installable': True, 'active': False, - 'certificate': '', + 'certificate': '00395598976683092013', } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/stock.py b/addons/stock/stock.py index e6a82c977b6..109c7c5024b 100755 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2588,7 +2588,7 @@ class stock_inventory_line(osv.osv): 'product_id': fields.many2one('product.product', 'Product', required=True, select=True), 'product_uom': fields.many2one('product.uom', 'Product UOM', required=True), 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')), - 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True), + 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True), 'prod_lot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]"), 'state': fields.related('inventory_id','state',type='char',string='State',readonly=True), } diff --git a/addons/stock_planning/test/stock_planning.yml b/addons/stock_planning/test/stock_planning.yml index beb4c654a3e..562edb94b03 100755 --- a/addons/stock_planning/test/stock_planning.yml +++ b/addons/stock_planning/test/stock_planning.yml @@ -58,7 +58,7 @@ I create a sale order for PC1-Basic PC and PC3-Medium PC. - !record {model: sale.order, id: sale_order_so0}: - date_order: !eval time.strftime('%Y-%m-%d') + date_order: !eval time.strftime('%Y-07-20') invoice_quantity: order name: SO006 order_line: diff --git a/addons/web_livechat/publisher_warranty.py b/addons/web_livechat/publisher_warranty.py index a0726c63c40..dfbef00c507 100755 --- a/addons/web_livechat/publisher_warranty.py +++ b/addons/web_livechat/publisher_warranty.py @@ -32,7 +32,7 @@ class publisher_warranty_contract(osv.osv): @cache(skiparg=3) def get_default_livechat_text(self, cr, uid): - return 'Support' + return 'Support' publisher_warranty_contract()