transportista_vista.xml
5.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="0">
<!-- explicit list view definition -->
<record model="ir.ui.view" id="hgt_transportar.trans_transportista_list">
<field name="name">Transportista</field>
<field name="model">trans.transportista</field>
<field name="arch" type="xml">
<tree>
<field name="trans_nombre"/>
<field name="trans_razon_social"/>
<field name="trans_tipo_ent"/>
<field name="trans_telefono"/>
<field name="trans_tipo"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="hgt_transportar.trans_transportista_form">
<field name="name">Transportista</field>
<field name="model">trans.transportista</field>
<field name="arch" type="xml">
<form>
<header>
<button name="deduplicar_pr" class='btn btn-warning' string="Quitar puntos de retiro duplicados" type="object" />
<button name="comprar" class='btn btn-info' string="Comprar membresia" type="object" />
</header>
<sheet>
<group col="2" string="Datos generales">
<field name="trans_nombre" colspan="2"/>
<field name="trans_razon_social" colspan="2" required="1"/>
<field name="trans_cuit" colspan="2" required="1"/>
</group>
<group col="2" string="Imagen">
<field name="trans_logo_nombre" invisible="1"/>
<field name="trans_logo" widget="file" filename="trans_logo_nombre"/>
<field name="soy_admin" nolabel="1"/>
</group>
<group col="4" string="Imagen Administracion" attrs="{'invisible': [('soy_admin','!=','Soy adinistrador')]}">
<button name="previsualizar_imagen" class='btn btn-success' string="Previsualizar imagen" type="object" />
<button name="publicar" class='btn btn-warning' string="Publicar imagen" type="object" />
<button name="quitar_imagen" class='btn btn-danger' string="Quitar imagen" type="object" />
<field name="url_img" nolabel="1" colspan="4"/>
<field name="publicada_img" colspan="4"/>
<field name="muestra" nolabel="1"/>
</group>
<group col="2" string="Datos de contacto">
<field name="trans_telefono" colspan="2" required="1"/>
<field name="trans_email" widget="email" colspan="2"/>
<field name="trans_pagina_web" colspan="2"/>
<field name="imagen" colspan="2" />
</group>
<group col="2" string="Características del transporte">
<field name="trans_tipo_ent" colspan="2" required="1"/>
<field name="trans_tipo" placeholder="Tipo de transporte" widget="many2many_tags" colspan="2" />
<field name="trans_restriccion_elem" colspan="2"/>
<!-- <field name="trans_pto_retiro" nolabel="1" colspan="2" /> -->
<field name="trans_posee_ayu" colspan="2"/>
<field name="trans_observ" colspan="2"/>
</group>
<group col="2" string="Puntos de retiro / Sucursales">
<field name="trans_pto_retiro" nolabel="1" widget="one2many" >
<tree create="1" edit="1" editable="bot" delete="1">
<field name="pr_nombre" create_edit="1" create="1" editable="1"/>
<field name="pr_localidad" options="{'no_create': True, 'no_create_edit':True}"/>
<field name="pr_direccion"/>
<field name="pr_telefono" />
<button name="AbrirMe" class='btn btn-info' string="Ver detalles" type="object" />
</tree>
</field>
</group>
<group col="2" string="Datos de usuario">
<field name="trans_categoria" readonly="0" colspan="2"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="hgt_transportar.trans_transportista_search">
<field name="name">Transportista</field>
<field name="model">trans.transportista</field>
<field name="arch" type="xml">
<search string="Busqueda de transportista">
<field name="trans_nombre"/>
<field name="trans_razon_social"/>
<field name="trans_tipo_ent"/>
<field name="trans_tipo"/>
<field name="controlar_robot"/>
</search>
</field>
</record>
<!-- accion con reglas de acceso -->
<record model="ir.actions.act_window" id="hgt_transportar.trans_transportista_action_window">
<field name="name">Transportista</field>
<field name="res_model">trans.transportista</field>
<field name="view_mode">tree,form</field>
<field name="domain">[["ejecutor","=",uid]]</field>
</record>
<!-- accion sin reglas para administrador -->
<record model="ir.actions.act_window" id="hgt_transportar.trans_transportista_desdoblado_action_window">
<field name="name">Transportista</field>
<field name="res_model">trans.transportista</field>
<field name="view_mode">tree,form</field>
</record>
</data>
</odoo>