mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[IMP] runbot: make runbot.bundle::write() callable through xml-rpc
The XML-RPC implementation does not allow for receiving or sending `None` values (both as query parameters and response). Since the `write` method of `runbot.bundle` was overriden without returning a value, an exception is raised when the method is called through the external API. This makes the `write` method return the value from its call to `super()` which should be equal to `True` if all went well.
This commit is contained in:
parent
d011bb7f8c
commit
6fffa0264a
@ -203,10 +203,11 @@ class Bundle(models.Model):
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
def write(self, values):
|
def write(self, values):
|
||||||
super().write(values)
|
res = super().write(values)
|
||||||
if 'is_base' in values:
|
if 'is_base' in values:
|
||||||
model = self.browse()
|
model = self.browse()
|
||||||
model._get_base_ids.clear_cache(model)
|
model._get_base_ids.clear_cache(model)
|
||||||
|
return res
|
||||||
|
|
||||||
def _force(self, category_id=None):
|
def _force(self, category_id=None):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
|
Loading…
Reference in New Issue
Block a user