mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-26 02:18:40 -06:00
Fix and tested
This commit is contained in:
parent
34e0bb42c6
commit
b74597deac
@ -2,7 +2,6 @@
|
||||
<odoo>
|
||||
<template id="assets_backend" name="google_drive assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" href="/document_url/static/src/css/url.css" type="text/css"/>
|
||||
<script type="text/javascript" src="/document_url/static/src/js/url.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
@ -22,6 +22,7 @@ class AddUrlWizard(models.TransientModel):
|
||||
|
||||
if not self._context.get('active_model'):
|
||||
return
|
||||
attachment_obj = self.env['ir.attachment']
|
||||
for form in self:
|
||||
url = urlparse(form.url)
|
||||
if not url.scheme:
|
||||
@ -34,5 +35,5 @@ class AddUrlWizard(models.TransientModel):
|
||||
'res_id': active_id,
|
||||
'res_model': self._context.get('active_model')
|
||||
}
|
||||
self.env['ir.attachment'].create(attachment)
|
||||
return {'type': 'ir.actions.act_close_wizard_and_reload_view'}
|
||||
attachment_obj.create(attachment)
|
||||
return False
|
Loading…
Reference in New Issue
Block a user