Skip to content

Commit

Permalink
feat: add company field in donation form
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément committed Jul 16, 2024
1 parent 991552b commit 88f3e2b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions muskathlon/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"templates/my_tasks_forms.xml",
"templates/donation_result.xml",
"templates/assets.xml",
"templates/muskathlon_address_form.xml",
"data/website_redirect.xml",
],
"depends": [
Expand Down
19 changes: 19 additions & 0 deletions muskathlon/templates/muskathlon_address_form.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="address_muskathlon" inherit_id="website_sale.address">
<xpath expr="//input[@name='email']/.." position="before">
<div
t-attf-class="form-group #{error.get('company') and 'o_has_error' or ''} col-lg-12 div_company_name"
>
<label class="col-form-label" for="company_name">Company</label>
<input
type="text"
name="company_name"
id="company_name"
t-attf-class="form-control #{error.get('company_name') and 'is-invalid' or ''}"
t-att-value="'company_name' in checkout and checkout['company_name']"
/>
</div>
</xpath>
</template>
</odoo>

0 comments on commit 88f3e2b

Please sign in to comment.