[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:
avs 2023-01-13 15:17:26 +01:00 committed by xdo
parent d011bb7f8c
commit 6fffa0264a

View File

@ -203,10 +203,11 @@ class Bundle(models.Model):
return res
def write(self, values):
super().write(values)
res = super().write(values)
if 'is_base' in values:
model = self.browse()
model._get_base_ids.clear_cache(model)
return res
def _force(self, category_id=None):
self.ensure_one()