feat(snippets): update
This commit is contained in:
1 parent
2d4a6a423a
commit
6cfadb8967
2 files changed
+42
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
<data priority="50">
|
||||
<xpath expr="//t[@t-if='o.partner_shipping_id and (o.partner_shipping_id != o.partner_id)']" position="before">
|
||||
<t t-set="sale_order" t-value="o.invoice_line_ids.sale_line_ids.order_id[:1]"/>
|
||||
<t t-set="show_sale_partner_block" t-value="bool(sale_order and sale_order.partner_id and sale_order.partner_id != o.commercial_partner_id)"/>
|
||||
<div class="col-4" name="sale_order_customer_address_block_wrapper">
|
||||
<t t-set="sale_partner_block">
|
||||
<div t-if="sale_order and sale_order.partner_id and sale_order.partner_id != o.commercial_partner_id">
|
||||
<strong class="d-block mt-3">Customer Address</strong>
|
||||
<div t-field="sale_order.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": True}"/>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[@class='col-6'][t[@t-set='information_block']]" position="attributes">
|
||||
<attribute name="class">'col-4' if show_sale_partner_block else 'col-6'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='address_not_same_as_shipping']" position="attributes">
|
||||
<attribute name="class">'col-4' if show_sale_partner_block else 'col-6'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='address_same_as_shipping']" position="attributes">
|
||||
<attribute name="class">'offset-col-4 col-4' if show_sale_partner_block else 'offset-col-6 col-6'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='no_shipping']" position="attributes">
|
||||
<attribute name="class">'offset-col-4 col-4' if show_sale_partner_block else 'offset-col-6 col-6'</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
@@ -0,0 +1,16 @@
|
||||
<data priority="50">
|
||||
<xpath expr="//t[@t-if='information_block']" position="before">
|
||||
<t t-if="show_sale_partner_block">
|
||||
<div name="sale_partner_block" class="col-4">
|
||||
<t t-raw="sale_partner_block"/>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@name='information_block']" position="attributes">
|
||||
<attribute name="t-att-class">'col-4' if show_sale_partner_block else 'col-6'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='address']" position="attributes">
|
||||
<attribute name="t-att-class">'col-4' if show_sale_partner_block else (not custom_layout_address and colclass or information_block and colclass)</attribute>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in new issue
Block a user