[MERGE] forward port branch 9.0 up to bbdf9605e4

This commit is contained in:
Christophe Simonis
2017-01-18 16:13:03 +01:00
4 changed files with 27 additions and 4 deletions
@@ -23,5 +23,15 @@
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record id="calendar_event_rule_private" model="ir.rule">
<field ref="model_calendar_event" name="model_id"/>
<field name="name">Private events</field>
<field name="domain_force">['|', ('class', '!=', 'private'), '&amp;', ('class', '=', 'private'), ('partner_ids', 'in', user.partner_id.id)]</field>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="True"/>
</record>
</data>
</openerp>
+9
View File
@@ -0,0 +1,9 @@
Chile, 2016-05-31
I hereby agree to the terms of the Odoo Individual Contributor License Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this declaration.
Signed,
Daniel Santibáñez Polanco dansanti@gmail.com https://github.com/dansanti
@@ -307,7 +307,12 @@ class TestOnChange(common.TransactionCase):
# When one2many domain contains non-computed field, things are ok
self.assertEqual(result['value']['important_messages'],
[(5,)] + [(4, msg.id) for msg in discussion.important_messages])
[(5,)] + [(1, msg.id, {
'name': msg.name,
'body': msg.body,
'author': (msg.author.id, msg.author.display_name),
'size': msg.size
}) for msg in discussion.important_messages])
# But here with commit 5676d81, we get value of: [(2, email.id)]
self.assertEqual(
+2 -3
View File
@@ -1961,9 +1961,8 @@ class One2many(_RelationalMulti):
_column_limit = property(attrgetter('limit'))
def convert_to_onchange(self, value, record, fnames=()):
if fnames:
# do not serialize self's inverse field
fnames = [name for name in fnames if name != self.inverse_name]
fnames = set(fnames or value.fields_view_get()['fields'])
fnames.discard(self.inverse_name)
return super(One2many, self).convert_to_onchange(value, record, fnames)