mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-26 18:38:41 -06:00
Fix update attachment
This commit is contained in:
parent
3c0ed6b98b
commit
65e4a1998f
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
|
||||||
<template id="assets_backend" name="google_drive assets" inherit_id="web.assets_backend">
|
<template id="assets_backend" name="google_drive assets" inherit_id="web.assets_backend">
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
<link rel="stylesheet" href="/document_url/static/src/css/url.css" type="text/css"/>
|
<link rel="stylesheet" href="/document_url/static/src/css/url.css" type="text/css"/>
|
||||||
@ -34,5 +33,4 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
</data>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
@ -20,6 +20,8 @@ class AddUrlWizard(models.TransientModel):
|
|||||||
def action_add_url(self):
|
def action_add_url(self):
|
||||||
"""Adds the URL with the given name as an ir.attachment record."""
|
"""Adds the URL with the given name as an ir.attachment record."""
|
||||||
|
|
||||||
|
if not self._context.get('active_model'):
|
||||||
|
return
|
||||||
for form in self:
|
for form in self:
|
||||||
url = urlparse(form.url)
|
url = urlparse(form.url)
|
||||||
if not url.scheme:
|
if not url.scheme:
|
||||||
|
Loading…
Reference in New Issue
Block a user