|
|
@ -45,7 +45,7 @@ class ScssEditor(models.AbstractModel): |
|
|
|
def _get_custom_attachment(self, url): |
|
|
|
return self.env["ir.attachment"].with_context( |
|
|
|
bin_size=False, bin_size_datas=False |
|
|
|
).search([("url", '=', url)]) |
|
|
|
).search([("url", '=', url)], limit=1) |
|
|
|
|
|
|
|
def _get_custom_view(self, url): |
|
|
|
return self.env["ir.ui.view"].search([("name", '=', url)]) |
|
|
@ -142,4 +142,4 @@ class ScssEditor(models.AbstractModel): |
|
|
|
def reset_values(self, url, xmlid): |
|
|
|
custom_url = self._get_custom_url(url, xmlid) |
|
|
|
self._get_custom_attachment(custom_url).unlink() |
|
|
|
self._get_custom_view(custom_url).unlink() |
|
|
|
self._get_custom_view(custom_url).unlink() |