Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T0280 Muskathlon Company Donation form #21

Merged
merged 7 commits into from
Jul 30, 2024

Conversation

clementcharmillot
Copy link
Contributor

Adds a new Company field for the form. The value is saved in res_partner.company_name.

image

Task

Can we adapte the donation form for companies?
Can we have a drop down menu to chose name or company?
We have quite a few companies donating, so it would be nice to give the opinion to chose whether it is a company or person who donates.

@clementcharmillot clementcharmillot self-assigned this Jul 16, 2024
@clementcharmillot clementcharmillot force-pushed the T0280-muskathlon-company-donation-form branch from ffe8e8d to 88f3e2b Compare July 16, 2024 13:03
@clementcharmillot clementcharmillot marked this pull request as ready for review July 16, 2024 13:08
Copy link
Contributor

@NoeBerdoz NoeBerdoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To no create a potential case of redundant field, the "Company" field you implemented shouldn't be shown if the form is in b2b mode, see reference here: templates.xm in odoo website_sale module

@NoeBerdoz
Copy link
Contributor

The translations of the new implemented field are missing, please add the french and german translations

@clementcharmillot
Copy link
Contributor Author

clementcharmillot commented Jul 29, 2024

There exists a template in Odoo to show the company and VAT

image

named website_sale.address_b2b, defined in file addons/website_sale/views/templates.xml:1457.
The view is disabled in the database on the Muskathlon website, and can be activated in the views settings.

The status of the view can also be found by running the following SQL query:

select w.name, iuv.key, iuv.active, iuv.customize_show , * from ir_ui_view iuv
left join website w on w.id = iuv.website_id
where iuv."key" = 'website_sale.address_b2b' and w.name like 'Muskathlon';

Should we enable this view instead of adding it manually?

@ecino
Copy link
Member

ecino commented Jul 29, 2024

Yes it would be better. However we don't wan't the VAT field. So maybe you could inherit this b2b template only to hide the VAT field and then we can activate it in production.

Copy link

sonarcloud bot commented Jul 30, 2024

@ecino ecino merged commit 5d530f8 into 14.0 Jul 30, 2024
2 checks passed
@ecino ecino deleted the T0280-muskathlon-company-donation-form branch July 30, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants