[MERGE] removed a few warnings.

bzr revid: vmt@openerp.com-20121116141517-1dwjs27cwk2nq9t4
This commit is contained in:
Vo Minh Thu 2012-11-16 15:15:17 +01:00
commit 01b9f4c3ed
18 changed files with 25 additions and 34 deletions

View File

@ -224,7 +224,6 @@
<record id="view_crossovered_budget_line_search" model="ir.ui.view">
<field name="name">account.budget.line.search</field>
<field name="model">crossovered.budget.lines</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Budget Lines">
<field name="analytic_account_id"/>

View File

@ -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

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
3 access_ir_model_fields_anonymization_user ir_model_fields_anonymization user model_ir_model_fields_anonymization 1 0 0 0
4 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
5 access_ir_model_fields_anonymization_history_user ir_model_fields_anonymization_history user model_ir_model_fields_anonymization_history 1 0 0 0
6 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

View File

@ -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',

View File

@ -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)

View File

@ -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 = []

View File

@ -227,7 +227,6 @@
<record model='ir.ui.view' id='fleet_vehicle_tree'>
<field name="name">fleet.vehicle.tree</field>
<field name="model">fleet.vehicle</field>
<field name="sequence">1</field>
<field name="arch" type="xml">
<tree string="Vehicle" version="7.0" colors="orange:contract_renewal_due_soon and not contract_renewal_overdue;red:contract_renewal_overdue">
<field name="license_plate" />

View File

@ -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
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

1 id name model_id/id group_id/id perm_read perm_write perm_create perm_unlink
8 fleet_vehicle_log_fuel_access_right fleet_vehicle_log_fuel_access_right model_fleet_vehicle_log_fuel 1 1 1 1
9 fleet_vehicle_log_services_access_right fleet_vehicle_log_services_access_right model_fleet_vehicle_log_services 1 1 1 1
10 fleet_vehicle_log_contract_access_right fleet_vehicle_log_contract_access_right model_fleet_vehicle_log_contract 1 1 1 1
11 fleet_service_type_access_right fleet_service_type_access_right model_fleet_service_type 1 1 1 1
12 access_fleet_vehicle_cost access_fleet_vehicle_cost model_fleet_vehicle_cost 1 1 1 1
13 access_fleet_contract_state access_fleet_contract_state model_fleet_contract_state 1 1 1 1

View File

@ -21,12 +21,10 @@
<record model="res.partner" id="partner_coin_gourmand">
<field name="name">Coin gourmand</field>
<field name="supplier_lunch">True</field>
</record>
<record model="res.partner" id="partner_pizza_inn">
<field name="name">Pizza Inn</field>
<field name="supplier_lunch">True</field>
</record>
<record model="lunch.product" id="product_cheese_ham">
@ -106,7 +104,6 @@
<field name="date" eval="time.strftime('2012-10-23')"/>
<field name="order_line_ids" eval="[]"/>
<field name="state">new</field>
<field name='company_id'>1</field>
</record>
<record model="lunch.order" id="order_2">
@ -114,7 +111,6 @@
<field name="date" eval="time.strftime('2012-10-22')"/>
<field name="order_line_ids" eval="[]"/>
<field name="state">confirmed</field>
<field name='company_id'>1</field>
</record>
<record model="lunch.order" id="order_3">
@ -122,7 +118,6 @@
<field name="date" eval="time.strftime('2012-10-24')"/>
<field name="order_line_ids" eval="[]"/>
<field name="state">cancelled</field>
<field name='company_id'>1</field>
</record>
<record model="lunch.order.line" id="order_line_1">
@ -175,7 +170,6 @@
<record model="lunch.alert" id="alert_1">
<field name="message">Lunch must be ordered before 10h30 am</field>
<field name="day">days</field>
</record>
</data>

View File

@ -12,7 +12,6 @@
<record model="ir.ui.view" id="lunch_order_line_search_view">
<field name="name">Search</field>
<field name="model">lunch.order.line</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search">
<field name="name" filter_domain="['|', ('name', 'ilike', self), ('note', 'ilike', self)]"/>
@ -34,7 +33,6 @@
<record id="view_lunch_employee_payment_filter" model="ir.ui.view">
<field name='name'>lunch employee payment</field>
<field name='model'>lunch.cashmove</field>
<field name='type'>search</field>
<field name='arch' type='xml'>
<search string="lunch employee payment">
<field name="description"/>
@ -49,7 +47,6 @@
<record id="view_lunch_cashmove_filter" model="ir.ui.view">
<field name='name'>lunch cashmove</field>
<field name='model'>lunch.cashmove</field>
<field name='type'>search</field>
<field name='arch' type='xml'>
<search string="lunch cashmove">
<field name="description"/>
@ -65,7 +62,6 @@
<record id="view_search_my_order" model="ir.ui.view">
<field name='name'>lunch orders</field>
<field name='model'>lunch.order</field>
<field name='type'>search</field>
<field name='arch' type='xml'>
<search string="lunch orders">
<field name="date"/>
@ -79,7 +75,6 @@
<record model="ir.ui.view" id="alert_search_view">
<field name="name">Search</field>
<field name="model">lunch.alert</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search">
<field name="message"/>
@ -243,7 +238,6 @@
<record model="ir.ui.view" id="product_category_form_view">
<field name="name">Product category Form</field>
<field name="model">lunch.product.category</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Products Form" version="7.0">
<sheet>
@ -285,7 +279,6 @@
<record model="ir.ui.view" id="orders_order_lines_tree_view">
<field name="name">Order lines Tree</field>
<field name="model">lunch.order.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Order lines Tree">
<field name='date'/>
@ -306,7 +299,6 @@
<record model="ir.ui.view" id="orders_tree_view">
<field name="name">Orders Tree View</field>
<field name="model">lunch.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Orders Tree">
<field name="date"/>
@ -360,7 +352,6 @@
<record model="ir.ui.view" id="products_tree_view">
<field name="name">Products Tree</field>
<field name="model">lunch.product</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Products Tree">
<field name="name"/>
@ -375,7 +366,6 @@
<record model="ir.ui.view" id="products_form_view">
<field name="name">Products Form</field>
<field name="model">lunch.product</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Products Form" version="7.0">
<header>
@ -398,7 +388,6 @@
<record model="ir.ui.view" id="casmove_tree_view">
<field name="name">cashmove tree</field>
<field name="model">lunch.cashmove</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="cashmove tree">
<field name="date"/>
@ -412,7 +401,6 @@
<record model="ir.ui.view" id="casmove_form_view">
<field name="name">cashmove form</field>
<field name="model">lunch.cashmove</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="cashmove form" version="7.0">
<sheet>
@ -432,7 +420,6 @@
<record model="ir.ui.view" id="alert_tree_view">
<field name="name">alert tree</field>
<field name="model">lunch.alert</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="alert tree">
<field name="message"/>
@ -446,7 +433,6 @@
<record model="ir.ui.view" id="alert_form_view">
<field name="name">alert form</field>
<field name="model">lunch.alert</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="alert tree" version="7.0">
<sheet>

View File

@ -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
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

1 id name model_id/id group_id/id perm_read perm_write perm_create perm_unlink
10 cashmove_user Cashmove user model_lunch_cashmove group_lunch_user 1 0 0 0
11 product_user Product user model_lunch_product group_lunch_user 1 0 0 0
12 product_category_user Product category user model_lunch_product_category group_lunch_user 1 0 0 0
13 alert_user Alert user model_lunch_alert group_lunch_user 1 0 0 0
14 access_report_order_line access_report_order_line model_report_lunch_order_line 1 1 1 1
15 access_lunch_validation access_lunch_validation model_lunch_validation 1 1 1 1
16 access_lunch_cancel access_lunch_cancel model_lunch_cancel 1 1 1 1

View File

@ -4,7 +4,6 @@
<record model="ir.ui.view" id="cancel_order_lines_view">
<field name="name">cancel order lines</field>
<field name="model">lunch.cancel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="cancel order lines" version="7.0">
<separator string="Are you sure you want to cancel these meals?"/>
@ -29,4 +28,4 @@
view_mode="form" target="new" view_type="form" view_id="cancel_order_lines_view"/>
</data>
</openerp>
</openerp>

View File

@ -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'

View File

@ -4,7 +4,6 @@
<record model="ir.ui.view" id="order_order_lines_view">
<field name="name">Order meal</field>
<field name="model">lunch.order.order</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Order meal" version="7.0">
<separator string="Are you sure you want to order these meals?"/>

View File

@ -4,7 +4,6 @@
<record model="ir.ui.view" id="validate_order_lines_view">
<field name="name">validate order lines</field>
<field name="model">lunch.validation</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="validate order lines" version="7.0">
<separator string="Did your received these meals?"/>

View File

@ -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

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
17 access_mail_message_subtype_all mail.message.subtype.all model_mail_message_subtype 1 0 0 0
18 access_mail_vote_all mail.vote.all model_mail_vote 1 1 1 1
19 access_mail_favorite_all mail.favorite.all model_mail_favorite 1 1 1 1
20 access_mail_thread_all mail.thread.all model_mail_thread 1 1 1 1
21 access_publisher_warranty_contract_all publisher.warranty.contract.all model_publisher_warranty_contract 1 1 1 1

View File

@ -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

View File

@ -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

View File

@ -329,7 +329,7 @@ Thanks!</field>
<field name="type">service</field>
<field name="list_price">150.0</field>
<field name="standard_price">100.0</field>
<field name="supply_method">produce</field>
<field name="supply_method">produce</field> <!-- TODO this is a procurement field, which is not a sale dependency -->
<field name="uom_id" ref="product.product_uom_day"/>
<field name="uom_po_id" ref="product.product_uom_day"/>
<field name="company_id" eval="[]"/>