Skip to Content
Menu
This question has been flagged

hello im struggling to do this and i need it to resolve it soon, i would apreciate if someone could help me.

I have created a custom module named(x) in which i have created views for 4 iframes, all is working with a little problem, i need to display the iframes in the view by i clickling on the action buttons but it doesnt work if i dont save an id in the database using the default form save button before, i just need to delete this default form(save) bar and display my iframe directly... i would be very glad if someone can help me

code: 

(iframes.py) 

iframe_sellos = fields.Char("iframe_sellos", store = False, compute = "_iframe_sellos")


def _iframe_sellos(self):

for record in self:

usuario = record.env.uid

record.iframe_sellos = "URL" + str(usuario) 


View XML:

<odoo>

     <template id="assets_backend" name="herramientas_dis assets"         inherit_id="web.assets_backend">

        <xpath expr="." position="inside">

            <link href="/herramientas_dis/static/src/css/estilos.css" rel="stylesheet" type =                 "text/css"/>

            <link href="/herramientas_dis/static/src/css/estilos.scss" rel="stylesheet"                 type="text/scss"/>

            <script src="/herramientas_dis/static/src/js/herramientas.js"                 type="text/javascript"/>

        </xpath>

    </template>


<record id = "sellos_view" model = "ir.ui.view">

<field name = "name">Sellos</field>

<field name = "model">dis.herramientas</field>

<field name = "arch" type = "xml">

<group>

<field name = "iframe_sellos" string = "Sellos" widget = "iframe_sellos_widget" />

</group>

</field>

</record>

Avatar
Discard
Related Posts Replies Views Activity
2
Jul 21
7510
2
Mar 23
2901
3
Dec 23
5816
1
Nov 22
3749
1
Mar 22
8409