formataddr (from the email python library) writes email_from as '"name" <email>'
in the email_from field of the mail.compose.message record.
When the mail is rendered, onchange_template_id is triggered.
This then overwrites the values of email_from among other fields.
What happens is that it uses the email_from field from the template to render
the email_from, bypassing what was put by formataddr before.
What happens in some cases is that it is rendered as 'name <email>'
(note the quotes have been stripped away).
If name contains arbitrary symbols, e.g. name = 'pépé [company] <pdg>, ohlala',
then getaddresses which is supposed to parse the (name, email) pairs gets thrown
off (in particular, <pdg> will be interpreted as an email address, and many
other problems with the various special symbols).
It then gives these wrong elements as email addresses, which will usually crash
when getting non-ascii symbols (i.e. these strings don't respect the relevant
RFC for email addresses).
Closes:
https://github.com/odoo/odoo/issues/23502https://github.com/odoo/odoo/pull/2311823118
opw 815202
opw 1824243
Steps to reproduce the bug:
- Set a multi company environment with two company A and B
- Set user admin in company A
- Set user demo in company B
- Create a PO with user demo
- Send a RFQ
Bug:
The company of the admin user was displayed in the footer of the email.
The function _notify called on res.parter model is called in sudo by
the function _notify on mail.message model.
The function render_template on mail.template model uses the user defined
on self.env to render the template. So the user admin was always used.
opw:1835647
Before this commit, Sale order and invoice notification email templates broke when doing any action on them (duplicating, open preview etc...)
This is because the model is saved during those operation, and the css style gets converted to inline style.
The table tag present in those templates, was wrongly associated with the bootstrap rule for tables, collapsing their border, hence the break of the templates.
After this commit, we force the borders not to collapse, and the templates don't break
OPW 774323
Before this commit, when Sending the receipt by email (payments) the full partner form was displayed in case the partner didn't have an email set.
Now, just like invoices, the simpler version is displayed
This commit adds a page view for invoices on the customer portal. Layout
is based on the invoice report to closely match what is already done in
Odoo. It replaces the old controller that returned only the pdf.
Customers should now be able to receive both.
Future commits will improve invoice page view notably in account_payment
while adding payment options in account customer portal.
* rename some files according to guidelines;
* clean template name to clean their ordering and ease template browsing;
* use html type for mail templates body instead of cdata;
* clean html for mail templates introduced at 96da10de6cc20486b3e37fd4c6c88eb61cbb919c;
No horse has been harmed and no functional change performed.
PURPOSE
=======
Users don't find where to print the payment receipts because it's under the `Action` menu
SPECIFICATION
=============
Allow to print the payment receipt pdf directly from the print menu
Mail now can handles a generic access_token in /mail/view route. Mail does
not do anything with it. Addons can override the controller and add their
specific management of this token according to some specific business
logic.
Sale order emails now contains the access token to grant access from the
notification email url without logging in. Sale portal now allow customers
to log in using an access token without having to use Online Quote. If
the user doesn't have an account yet and signup is allowed (B2C) an extra
parameter is added to the url to link the correct partner to the user upon
signup. If the user already has an account an extra parameter is added to
auto-fill the user's login if he wants to login from that session.
Account is also updated to prepare accepting access tokens. However the
complete implementation of accounting customer portal will be done in
another task coming soon.
Otherwise a constraint is raised because new line are added to the
payment term instead of recreating them from scratch. This constraint
blocks people from reinitializing the module, which is quite boring
when developing.
- RML Reports
- Webkit Reports (most part already removed by 13b9982c62)
- LocalService in netsvc.py
- rename attributes like rml_% to report_%
- rename ir.actions.report.xml to ir.actions.report
- allow rendering directly on an ir.actions.report by calling render method
- remove 'controller' report_type
- remove unused res.font stuff
- remove print_report method in models.py (not used)
- restore removed call to pdftotext process in test_reports
Currently the link is always the website link once website_portal is
installed. However it is better to use the generic /mail/view controller
that chooses the right redirection depending on the user trying to access
the document.
The notification mail template of a SO and an Invoice displays the logo
of the company. However, the logo is always the logo of the superuser's
company.
When accessing the logo from an email client, the UID is not defined.
Therefore, we fall back on the superuser, and display the logo of his
company.
We add the support of a `company` key in the kwargs, so we can force the
company from which we retrieve the logo. Note that this key was used
elsewhere, such as:
addons/web/static/src/js/web_client.js
opw-705420
Purpose
=======
External links in the data sometimes open in the same tab, the users loses times as he has to come back (and looses the context).
Specification
=============
Any external links in data (planners, settings) should open in new tabs.
Purpose
=======
we use to make proforma invoice to get payment before the creation of the real invoice. In the current odoo, the proforma state is too late. Because you have to confirm the SO to generate the draft invoice and so the proforma. But, if you do that, you have generated a subscription or a delivery order in the mean time. A proforma is actually a quote. In old ERP they used to make proforma to send a quote and don't generate invoice number.
Specification
=============
- Remove everything related to Proforma from accounting
- Remove the configuration of pro-forma from account setting
- Invoice form, remove "Pro-froma" button, stage, report title
- Add proforma configuration option in sales setting under "Quotation and Sales" section
- In quote/sale, add Pro-forma under Print
- A pro-forma is a quote, but the title of the report is Pro-Forma and not Quotation
- button (secondary) on quotation form "SEND PRO-FORMA" to send proforma by mail attached with related report.
- button
- mail template
- when preparing a quotation this button is visible but if even one invoice this should be invisible (as confirming SO doesn't generate invoice currently)
- create a report for payment to print a receipt. Simple report with the amount received and name of the partner header of the company
- add a new action in action menu for print receipt
- add a new button action menu to send the receipt by email : STRING of the button = Send Receipt
- default template of payment receipt like sales
- add chatter history same as sales object
- this report use for both ('customer payment' & 'vendor payment)
Change color #a24689 to #875A7B
Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).
Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
We use summary instead of class as classes are often stripped by gmail or even odoo.
Summary is a commonly kept attribute so it is used in the mail gateway to hide
what is considered as internal content and should not be rendered in the chatter.
As we will soon improve the sanitizer we will be able to sanitize email
templates body. However this implies some cleaning in the templates to
be sure mako is not considered as invalid html / xml and therefore removed
from the template body.
[FIX] sale: Don't display 'View quotation' button on email if no website
If the website module is not installed, the button 'View Quotation' will lead to the backend chatter page, which is not very useful in our case.
As the quotation is already attached in the mail as a pdf, just don't display the button if the website module is not installed
[FIX] account,sale: Don't send notif template to portal customers if no website
[FIX] account: Don't display 'View Invoice' button on email if no website
If the website module is not installed, the button 'View Invoice' will lead to the backend chatter page, which is not very useful in our case.
As the invoice is already attached in the mail as a pdf, just don't display the button if the website module is not installed
[FIX] website_sale: override get_access_action to redirect to my/invoices