Debian Codegraph @

addons/sale_pdf_quote_builder/views/quotation_document_views.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <odoo>
3
4 <record id="quotation_document_form" model="ir.ui.view">
5 <field name="name">quotation.document.form</field>
6 <field name="model">quotation.document</field>
7 <field name="arch" type="xml">
8 <form>
9 <sheet>
10 <h1>
11 <field name="name" readonly="not datas"/>
12 </h1>
13 <group>
14 <group>
15 <field name="document_type"/>
16 <label for="datas"/>
17 <div class="o_row">
18 <field
19 name="datas"
20 filename="name"
21 options="{'accepted_file_extensions': '.pdf', 'allowed_mime_type' : 'application/pdf'}"
22 class="oe_inline"
23 />
24 <button
25 name="action_open_pdf_form_fields"
26 type="object"
27 string="Configure dynamic fields"
28 help="Mark fields as safe to fill in the quote."
29 class="btn btn-link"
30 icon="fa-pencil"
31 colspan="2"
32 groups="base.group_system,base.group_no_one"
33 invisible="not (datas and form_field_ids)"
34 />
35 </div>
36 <field
37 name="quotation_template_ids"
38 options="{'no_create': True}"
39 widget="many2many_tags"
40 />
41 <field name="add_by_default"/>
42 </group>
43 </group>
44 <group string="Attached To" groups="base.group_multi_company,base.group_no_one">
45 <field
46 name="company_id"
47 placeholder="Visible to all"
48 groups="base.group_multi_company"
49 options="{'no_create': True}"
50 class="oe_inline"
51 />
52 <field
53 name="form_field_ids"
54 groups="base.group_no_one"
55 widget="many2many_tags"
56 />
57 </group>
58 <group string="History" groups="base.group_no_one" invisible="not create_date">
59 <label for="create_uid" string="Creation"/>
60 <div name="creation_div">
61 <field name="create_uid" readonly="1" class="oe_inline"/> on
62 <field name="create_date" readonly="1" class="oe_inline"/>
63 </div>
64 </group>
65 </sheet>
66 </form>
67 </field>
68 </record>
69
70 <record id="quotation_document_kanban" model="ir.ui.view">
71 <field name="name">quotation.document.kanban</field>
72 <field name="model">quotation.document</field>
73 <field name="arch" type="xml">
74 <kanban js_class="quotation_document_kanban">
75 <field name="sequence" widget="handle"/>
76 <field name="ir_attachment_id"/>
77 <field name="mimetype"/>
78 <field name="document_type"/>
79 <field name="name"/>
80 <field name="active"/>
81 <templates>
82 <t t-name="menu">
83 <a t-if="widget.editable" type="open" class="dropdown-item">Edit</a>
84 <a t-if="widget.deletable" type="delete" class="dropdown-item">Delete</a>
85 <a
86 t-attf-href="/web/content/#{record.ir_attachment_id.raw_value}?download=true"
87 download=""
88 class="dropdown-item"
89 >Download</a>
90 </t>
91 <t t-name="card" class="o_kanban_attachment flex-row">
92 <widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
93 <aside>
94 <div class="o_image o_kanban_previewer w-100 h-100" t-att-data-mimetype="record.mimetype.value"/>
95 </aside>
96 <main class="ms-2">
97 <field name="name" class="fw-bolder text-truncate"/>
98 <div class="d-flex mt-2">
99 <span>Document type:</span>
100 <field name="document_type" class="ms-2" widget="selection"/>
101 </div>
102 <div
103 t-if="!context.hide_template_ids
104 and !!record.quotation_template_ids.raw_value.length"
105 class="mt-2"
106 >
107 <span class="pe-2">Templates:</span>
108 <field name="quotation_template_ids" class="d-inline-block" widget="many2many_tags"/>
109 </div>
110 </main>
111 </t>
112 </templates>
113 </kanban>
114 </field>
115 </record>
116
117 <record id="quotation_document_list" model="ir.ui.view">
118 <field name="name">quotation.document.list</field>
119 <field name="model">quotation.document</field>
120 <field name="arch" type="xml">
121 <list editable="top" multi_edit="true">
122 <field name="sequence" widget="handle"/>
123 <field name="name"/>
124 <field name="document_type"/>
125 <field name="quotation_template_ids" widget="many2many_tags"/>
126 <field name="add_by_default" widget="boolean_toggle" optional="show"/>
127 <field name="company_id" groups="base.group_multi_company" optional="show"/>
128 </list>
129 </field>
130 </record>
131
132 <record id="quotation_document_search_view" model="ir.ui.view">
133 <field name="name">quotation.document.search</field>
134 <field name="model">quotation.document</field>
135 <field name="arch" type="xml">
136 <search string="Quotation Document">
137 <field name="name"/>
138 <separator/>
139 <group>
140 <filter
141 string="Document type"
142 name="doc_type"
143 context="{'group_by': 'document_type'}"
144 />
145 <filter
146 string="Quotation Template"
147 name="quotation_template"
148 context="{'group_by': 'quotation_template_ids'}"
149 />
150 <filter name="all" string="All"/>
151 <filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
152 <filter name="add_by_default" string="Add By Default" domain="[('add_by_default', '=', True)]"/>
153 </group>
154 </search>
155 </field>
156 </record>
157
158 <record id="quotation_document_action" model="ir.actions.act_window">
159 <field name="name">Headers/Footers</field>
160 <field name="res_model">quotation.document</field>
161 <field name="view_mode">kanban,list,form</field>
162 <field name="help" type="html">
163 <p class="o_view_nocontent_smiling_face">
164 Upload quotation headers and footers
165 </p>
166 <p>
167 Personalize your quotes with catchy header and footer pages
168 <br/>
169 to boost your sales.
170 </p>
171 </field>
172 </record>
173
174 </odoo>