From d1f49ab27ae25c38e2322b3844a43d6e8635d9c5 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Thu, 15 Nov 2012 12:59:16 +0100 Subject: [PATCH 1/8] [IMP] removing some warnings (those one are generated by tests). bzr revid: vmt@openerp.com-20121115115916-6i2ljxn7s9qz4rlv --- addons/mail/security/ir.model.access.csv | 2 ++ addons/mail/tests/test_mail_access_rights.py | 6 +++++- addons/sale/sale_demo.xml | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/mail/security/ir.model.access.csv b/addons/mail/security/ir.model.access.csv index b87c323b53d..37c6952717c 100644 --- a/addons/mail/security/ir.model.access.csv +++ b/addons/mail/security/ir.model.access.csv @@ -17,3 +17,5 @@ access_mail_alias_system,mail.alias.system,model_mail_alias,base.group_system,1, access_mail_message_subtype_all,mail.message.subtype.all,model_mail_message_subtype,,1,0,0,0 access_mail_vote_all,mail.vote.all,model_mail_vote,,1,1,1,1 access_mail_favorite_all,mail.favorite.all,model_mail_favorite,,1,1,1,1 +access_mail_thread_all,mail.thread.all,model_mail_thread,,1,1,1,1 +access_publisher_warranty_contract_all,publisher.warranty.contract.all,model_publisher_warranty_contract,,1,1,1,1 diff --git a/addons/mail/tests/test_mail_access_rights.py b/addons/mail/tests/test_mail_access_rights.py index ec08d257efe..7594de87faf 100644 --- a/addons/mail/tests/test_mail_access_rights.py +++ b/addons/mail/tests/test_mail_access_rights.py @@ -20,7 +20,8 @@ ############################################################################## from openerp.addons.mail.tests import test_mail_mockup -from osv.orm import except_orm +from openerp.osv.orm import except_orm +from openerp.tools.misc import mute_logger class test_mail_access_rights(test_mail_mockup.TestMailMockups): @@ -84,6 +85,7 @@ class test_mail_access_rights(test_mail_mockup.TestMailMockups): msg_ids = self.mail_message.search(cr, uid, [('subject', 'like', '_Test')]) self.assertEqual(set([msg_id1, msg_id2, msg_id3, msg_id4, msg_id5, msg_id6, msg_id7, msg_id8]), set(msg_ids), 'mail_message search failed') + @mute_logger('openerp.osv.orm') def test_05_mail_message_read_access_rights(self): """ Test basic mail_message read access rights. """ cr, uid = self.cr, self.uid @@ -131,6 +133,8 @@ class test_mail_access_rights(test_mail_mockup.TestMailMockups): self.assertRaises(except_orm, self.mail_message.read, cr, user_bert_id, message_id) + @mute_logger('openerp.addons.base.ir.ir_model') + @mute_logger('openerp.osv.orm') def test_10_mail_flow_access_rights(self): """ Test a Chatter-looks alike flow. """ cr, uid = self.cr, self.uid diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index ba75b1571cb..f5566e68365 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -329,7 +329,6 @@ Thanks! service 150.0 100.0 - produce From 1fcdb5adbe6f823c765d95e1f125eb2229349bb5 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Thu, 15 Nov 2012 15:03:37 +0100 Subject: [PATCH 2/8] [FIX] Original location of the field has been changed. Maximum sales, events, and fields. If not specified the Aformentioned fields runbot 'still doesn' t ' t like it. bzr revid: vmt@openerp.com-20121115140337-4tqplv17th4hs0l5 --- addons/sale/sale_demo.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index f5566e68365..428b586ffa8 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -329,6 +329,7 @@ Thanks! service 150.0 100.0 + produce From d2bb377b61c0b487c000d673d0a6c52106428a03 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Thu, 15 Nov 2012 15:55:47 +0100 Subject: [PATCH 3/8] [FIX] fleet: removed unexisting field. bzr revid: vmt@openerp.com-20121115145547-9f2y8nvh2d1qhjpn --- addons/fleet/fleet_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/fleet/fleet_view.xml b/addons/fleet/fleet_view.xml index 8eb1baba760..bed4cd872fa 100644 --- a/addons/fleet/fleet_view.xml +++ b/addons/fleet/fleet_view.xml @@ -227,7 +227,6 @@ fleet.vehicle.tree fleet.vehicle - 1 From d05a945fc56329a140fef2aafcb15b4146f7c1db Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Thu, 15 Nov 2012 16:25:57 +0100 Subject: [PATCH 4/8] [IMP] lunch: removed a few initialization warnings. bzr revid: vmt@openerp.com-20121115152557-3lroffi0dtar3rs4 --- addons/lunch/lunch_demo.xml | 6 ------ addons/lunch/lunch_view.xml | 14 -------------- addons/lunch/security/ir.model.access.csv | 5 ++++- addons/lunch/wizard/lunch_cancel_view.xml | 3 +-- addons/lunch/wizard/lunch_order.py | 2 +- addons/lunch/wizard/lunch_order_view.xml | 1 - addons/lunch/wizard/lunch_validation_view.xml | 1 - 7 files changed, 6 insertions(+), 26 deletions(-) diff --git a/addons/lunch/lunch_demo.xml b/addons/lunch/lunch_demo.xml index a9b03137bf2..9e92291b62d 100644 --- a/addons/lunch/lunch_demo.xml +++ b/addons/lunch/lunch_demo.xml @@ -21,12 +21,10 @@ Coin gourmand - True Pizza Inn - True @@ -106,7 +104,6 @@ new - 1 @@ -114,7 +111,6 @@ confirmed - 1 @@ -122,7 +118,6 @@ cancelled - 1 @@ -175,7 +170,6 @@ Lunch must be ordered before 10h30 am - days diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml index 32b978dfab0..ea9356bddc5 100644 --- a/addons/lunch/lunch_view.xml +++ b/addons/lunch/lunch_view.xml @@ -12,7 +12,6 @@ Search lunch.order.line - search @@ -34,7 +33,6 @@ lunch employee payment lunch.cashmove - search @@ -49,7 +47,6 @@ lunch cashmove lunch.cashmove - search @@ -65,7 +62,6 @@ lunch orders lunch.order - search @@ -79,7 +75,6 @@ Search lunch.alert - search @@ -243,7 +238,6 @@ Product category Form lunch.product.category - form
@@ -285,7 +279,6 @@ Order lines Tree lunch.order.line - tree @@ -306,7 +299,6 @@ Orders Tree View lunch.order - tree @@ -360,7 +352,6 @@ Products Tree lunch.product - tree @@ -375,7 +366,6 @@ Products Form lunch.product - form
@@ -398,7 +388,6 @@ cashmove tree lunch.cashmove - tree @@ -412,7 +401,6 @@ cashmove form lunch.cashmove - form @@ -432,7 +420,6 @@ alert tree lunch.alert - tree @@ -446,7 +433,6 @@ alert form lunch.alert - form diff --git a/addons/lunch/security/ir.model.access.csv b/addons/lunch/security/ir.model.access.csv index 026a43e0a61..22966129142 100644 --- a/addons/lunch/security/ir.model.access.csv +++ b/addons/lunch/security/ir.model.access.csv @@ -10,4 +10,7 @@ order_line_user,"Order Line user",model_lunch_order_line,group_lunch_user,1,1,1, cashmove_user,"Cashmove user",model_lunch_cashmove,group_lunch_user,1,0,0,0 product_user,"Product user",model_lunch_product,group_lunch_user,1,0,0,0 product_category_user,"Product category user",model_lunch_product_category,group_lunch_user,1,0,0,0 -alert_user,"Alert user",model_lunch_alert,group_lunch_user,1,0,0,0 \ No newline at end of file +alert_user,"Alert user",model_lunch_alert,group_lunch_user,1,0,0,0 +access_report_order_line,access_report_order_line,model_report_lunch_order_line,,1,1,1,1 +access_lunch_validation,access_lunch_validation,model_lunch_validation,,1,1,1,1 +access_lunch_cancel,access_lunch_cancel,model_lunch_cancel,,1,1,1,1 diff --git a/addons/lunch/wizard/lunch_cancel_view.xml b/addons/lunch/wizard/lunch_cancel_view.xml index 4df5c8739e9..acc0cfc9f13 100644 --- a/addons/lunch/wizard/lunch_cancel_view.xml +++ b/addons/lunch/wizard/lunch_cancel_view.xml @@ -4,7 +4,6 @@ cancel order lines lunch.cancel - form @@ -29,4 +28,4 @@ view_mode="form" target="new" view_type="form" view_id="cancel_order_lines_view"/> - \ No newline at end of file + diff --git a/addons/lunch/wizard/lunch_order.py b/addons/lunch/wizard/lunch_order.py index 20de4adc263..767497bcc4b 100644 --- a/addons/lunch/wizard/lunch_order.py +++ b/addons/lunch/wizard/lunch_order.py @@ -20,7 +20,7 @@ ############################################################################## from osv import osv, fields -class lunch_order_order(osv.Model): +class lunch_order_order(osv.TransientModel): """ lunch order meal """ _name = 'lunch.order.order' _description = 'Wizard to order a meal' diff --git a/addons/lunch/wizard/lunch_order_view.xml b/addons/lunch/wizard/lunch_order_view.xml index 990add2564e..ba2d372a543 100644 --- a/addons/lunch/wizard/lunch_order_view.xml +++ b/addons/lunch/wizard/lunch_order_view.xml @@ -4,7 +4,6 @@ Order meal lunch.order.order - form diff --git a/addons/lunch/wizard/lunch_validation_view.xml b/addons/lunch/wizard/lunch_validation_view.xml index 5e9fb92956f..bec141d2d4a 100644 --- a/addons/lunch/wizard/lunch_validation_view.xml +++ b/addons/lunch/wizard/lunch_validation_view.xml @@ -4,7 +4,6 @@ validate order lines lunch.validation - form From 724f452f1e96d0eb8feeb8f0c1d273a2a543e671 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Thu, 15 Nov 2012 17:06:43 +0100 Subject: [PATCH 5/8] [IMP] fleet/porta/account_budget: removed some initialization warnings. bzr revid: vmt@openerp.com-20121115160643-lc0b07n6xiaq1rl3 --- addons/account_budget/account_budget_view.xml | 1 - addons/fleet/security/ir.model.access.csv | 4 +++- addons/portal/tests/test_portal.py | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/account_budget/account_budget_view.xml b/addons/account_budget/account_budget_view.xml index d24124e307d..35194e96b82 100644 --- a/addons/account_budget/account_budget_view.xml +++ b/addons/account_budget/account_budget_view.xml @@ -224,7 +224,6 @@ account.budget.line.search crossovered.budget.lines - search diff --git a/addons/fleet/security/ir.model.access.csv b/addons/fleet/security/ir.model.access.csv index 0c50a6fbee3..823b3cb2945 100644 --- a/addons/fleet/security/ir.model.access.csv +++ b/addons/fleet/security/ir.model.access.csv @@ -8,4 +8,6 @@ fleet_vehicle_access_right,fleet_vehicle_access_right,model_fleet_vehicle,,1,1,1 fleet_vehicle_log_fuel_access_right,fleet_vehicle_log_fuel_access_right,model_fleet_vehicle_log_fuel,,1,1,1,1 fleet_vehicle_log_services_access_right,fleet_vehicle_log_services_access_right,model_fleet_vehicle_log_services,,1,1,1,1 fleet_vehicle_log_contract_access_right,fleet_vehicle_log_contract_access_right,model_fleet_vehicle_log_contract,,1,1,1,1 -fleet_service_type_access_right,fleet_service_type_access_right,model_fleet_service_type,,1,1,1,1 \ No newline at end of file +fleet_service_type_access_right,fleet_service_type_access_right,model_fleet_service_type,,1,1,1,1 +access_fleet_vehicle_cost,access_fleet_vehicle_cost,model_fleet_vehicle_cost,,1,1,1,1 +access_fleet_contract_state,access_fleet_contract_state,model_fleet_contract_state,,1,1,1,1 diff --git a/addons/portal/tests/test_portal.py b/addons/portal/tests/test_portal.py index be32b015743..0a2772c9cfe 100644 --- a/addons/portal/tests/test_portal.py +++ b/addons/portal/tests/test_portal.py @@ -20,7 +20,8 @@ ############################################################################## from openerp.addons.mail.tests import test_mail_mockup -from osv.orm import except_orm +from openerp.osv.orm import except_orm +from openerp.tools.misc import mute_logger class test_portal(test_mail_mockup.TestMailMockups): @@ -52,6 +53,7 @@ class test_portal(test_mail_mockup.TestMailMockups): # Set an email address for the user running the tests, used as Sender for outgoing mails self.res_users.write(cr, uid, uid, {'email': 'test@localhost'}) + @mute_logger('openerp.addons.base.ir.ir_model') def test_00_access_rights(self): """ Test basic mail_message and mail_group access rights for portal users. """ cr, uid = self.cr, self.uid From 071de661931ac6a7d31304677b6e522103f3c914 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Thu, 15 Nov 2012 17:37:56 +0100 Subject: [PATCH 6/8] [FIX] base_import: added security csv file in __openerp__.py. bzr revid: vmt@openerp.com-20121115163756-vfocdshvwo524dya --- addons/anonymization/security/ir.model.access.csv | 1 + addons/base_import/__openerp__.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/addons/anonymization/security/ir.model.access.csv b/addons/anonymization/security/ir.model.access.csv index 745913eaa65..e758867ce46 100644 --- a/addons/anonymization/security/ir.model.access.csv +++ b/addons/anonymization/security/ir.model.access.csv @@ -3,3 +3,4 @@ access_ir_model_fields_anonymization_group_system,ir_model_fields_anonymization access_ir_model_fields_anonymization_user,ir_model_fields_anonymization user,model_ir_model_fields_anonymization,,1,0,0,0 access_ir_model_fields_anonymization_history_group_system,ir_model_fields_anonymization_history group_user,model_ir_model_fields_anonymization_history,base.group_system,1,1,1,1 access_ir_model_fields_anonymization_history_user,ir_model_fields_anonymization_history user,model_ir_model_fields_anonymization_history,,1,0,0,0 +access_ir_model_fields_anonymization_migration_fix,access_ir_model_fields_anonymization_migration_fix,model_ir_model_fields_anonymization_migration_fix,,1,1,1,1 diff --git a/addons/base_import/__openerp__.py b/addons/base_import/__openerp__.py index 0df83eed035..eb8b4561c7e 100644 --- a/addons/base_import/__openerp__.py +++ b/addons/base_import/__openerp__.py @@ -27,6 +27,9 @@ Re-implement openerp's file import system: 'depends': ['web'], 'installable': True, 'auto_install': False, + 'data': [ + 'security/ir.model.access.csv', + ], 'css': [ 'static/lib/select2/select2.css', 'static/src/css/import.css', From 2cd9443b92952800b307efbae0b2cbcd9735e1e4 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Fri, 16 Nov 2012 12:35:51 +0100 Subject: [PATCH 7/8] [IMP] email_template: dont give mail.mail.create() an unneeded email_recipients field. bzr revid: vmt@openerp.com-20121116113551-le30lwfmignrxl0e --- addons/email_template/email_template.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index 0ca92d8effa..a9bee623f66 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -345,6 +345,7 @@ class email_template(osv.osv): values = self.generate_email(cr, uid, template_id, res_id, context=context) assert 'email_from' in values, 'email_from is missing or empty after template rendering, send_mail() cannot proceed' attachments = values.pop('attachments') or {} + del values['email_recipients'] # TODO Properly use them. msg_id = mail_mail.create(cr, uid, values, context=context) # link attachments attachment_ids = [] From 8c32318152481b25996aac42b7d0a9848e5c65fd Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Fri, 16 Nov 2012 14:51:44 +0100 Subject: [PATCH 8/8] [IMP] base_status: removed unneeded `date_open` field from call to crm.claim.create(). bzr revid: vmt@openerp.com-20121116135144-talk5y0owm848mj7 --- addons/base_status/base_stage.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/base_status/base_stage.py b/addons/base_status/base_stage.py index 867b2207a99..86edff46920 100644 --- a/addons/base_status/base_stage.py +++ b/addons/base_status/base_stage.py @@ -224,8 +224,6 @@ class base_stage(object): cases = self.browse(cr, uid, ids, context=context) for case in cases: data = {'active': True} - if case.stage_id and case.stage_id.state == 'draft': - data['date_open'] = fields.datetime.now() if not case.user_id: data['user_id'] = uid self.case_set(cr, uid, [case.id], 'open', data, context=context)