Skip to content

Commit

Permalink
[IMP] website_sale_invoice_address: billing info
Browse files Browse the repository at this point in the history
Display partner invoice address as billing in checkout, instead of
order's partner.

Co-authored-by: George Smirnov <[email protected]>
  • Loading branch information
danielduqma and Aldeigja committed Oct 11, 2024
1 parent f56e877 commit b585de4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website_sale_invoice_address/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Website Sale Invoice Address
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:767a41574e3aed01e48610c2c33b2c900fb6998c18f34e07959079f391f9ee20
!! source digest: sha256:102519c7b4cf425752cd2770589235275df7cf64aa948f2f82081a81aea8081d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
1 change: 1 addition & 0 deletions website_sale_invoice_address/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
"/website_sale_invoice_address/static/src/js/website_sale_invoice_address_tour.js"
]
},
"data": ["views/templates.xml"],
}
2 changes: 1 addition & 1 deletion website_sale_invoice_address/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Website Sale Invoice Address</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:767a41574e3aed01e48610c2c33b2c900fb6998c18f34e07959079f391f9ee20
!! source digest: sha256:102519c7b4cf425752cd2770589235275df7cf64aa948f2f82081a81aea8081d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/e-commerce/tree/16.0/website_sale_invoice_address"><img alt="OCA/e-commerce" src="https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_invoice_address"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Since versión <cite>12.0</cite>, the e-Commerce orders are force to have the order partner
Expand Down
40 changes: 40 additions & 0 deletions website_sale_invoice_address/views/templates.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<template
id="website_sale_invoice_address.address_on_payment"
inherit_id="website_sale.address_on_payment"
priority="100"
>

<xpath expr="//span[@t-esc='order.partner_id']" position="attributes">
<attribute name="t-esc">
order.partner_invoice_id
</attribute>
</xpath>
<xpath expr="//t[@t-set='same_shipping']" position="attributes">
<attribute name="t-value">
bool(order.partner_shipping_id==order.partner_invoice_id or only_services)
</attribute>
</xpath>

</template>

<template
id="website_sale_invoice_address.checkout"
inherit_id="website_sale.checkout"
priority="100"
>

<xpath
expr="//div[hasclass('col-lg-6', 'one_kanban')]//t//t[@t-set='contact']"
position="attributes"
>
<attribute name="t-value">
order.partner_invoice_id
</attribute>
</xpath>

</template>

</odoo>

0 comments on commit b585de4

Please sign in to comment.