Commit Graph
203 Commits
Author SHA1 Message Date
len-odoo 42aff92a4e [FIX] account, purchase, sale: properly quote the name of the email sender
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/23502
https://github.com/odoo/odoo/pull/2311823118

opw 815202
opw 1824243
2018-06-01 13:06:09 +02:00
Christophe Simonis 3ab25b60bc [MERGE] forward port branch saas-15 up to cae950e826 2018-04-23 17:59:59 +02:00
Goffin Simon 4ac10f20c4 [FIX] account, purchase, sale: Wrong company displayed in the footer
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
2018-04-23 09:33:22 +02:00
Christophe Simonis 9d25cc3429 [FIX] *: correcly format amounts in mail templates 2018-02-28 19:01:35 +01:00
Christophe Simonis 10128fa7e8 [MERGE] forward port branch saas-16 up to dc2a6c6cd2 2017-10-20 19:27:04 +02:00
Christophe Simonis 5ea0f55d65 [MERGE] forward port branch saas-15 up to bee0c11ef7 2017-10-20 17:57:21 +02:00
Christophe Simonis bee0c11ef7 [MERGE] forward port branch saas-14 up to f3ac68ed29 2017-10-20 17:24:15 +02:00
Christophe Simonis f3ac68ed29 [MERGE] forward port branch 10.0 up to e2532f855f 2017-10-20 16:09:28 +02:00
Lucas Perais (lpe) af6baac9c7 [FIX] account, sale: fix notification templates inline style
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
2017-10-20 09:09:04 +02:00
qdp-odoo f9dc8cf76d [FIX] account: email template name changed (again)
As per discussion on commit https://github.com/odoo/odoo/commit/48a8d68194c4802320984cbd487ccd650e1bb096#diff-356151c8ac0f23574964c7c9da863c70, I add the App name in the template name.
2017-09-29 15:43:40 +02:00
Lucas Perais (lpe) 2fcb780a01 [FIX] account: enforce simple res.partner form on send receipt
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
2017-09-29 13:30:17 +02:00
Prakash Prajapati 48a8d68194 [FIX] account: email template name change 2017-09-29 11:03:44 +02:00
Thibault Delavallée 6c7e128b33 [IMP] account: add invoice page view on customer portal
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.
2017-08-25 15:33:18 +02:00
Thibault Delavallée 4e11d2fcb0 [CLN] account: perform some guidelining and cleaning
* 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.
2017-08-25 11:41:41 +02:00
jpr-odoo 711455f9b9 [IMP] account: Print payment receipts from Print menu.
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
2017-07-10 14:07:56 +02:00
Denis Vermylen 7dd6225f0b [IMP] mail, account, sale: improve sales order mail link
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.
2017-07-06 12:53:39 +02:00
Thibault Delavallée dbe6aa4292 [FIX] account: finally allows to reinit the module
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.
2017-05-10 17:09:29 +02:00
Laurent Smet 3425752eac [REM] odoo/report: remove deprecated stuff
- 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
2017-05-08 09:22:56 +02:00
dbh 4b074ca11c [IMP] account: rename 'Refund' to 'Credit Note' 2017-05-04 16:05:32 +02:00
Thibault Delavallée a4c76239fd [IMP] account: fix link and redirection in invoice email
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.
2017-04-25 14:10:54 +02:00
Christophe Simonis 68176d80ad [MERGE] forward port branch saas-14 up to eddefc9948 2017-03-01 16:49:15 +01:00
Christophe Simonis 85368d7f86 [MERGE] forward port branch 10.0 up to 387b2acfcb 2017-02-23 20:15:38 +01:00
Nicolas Martinelli 7a03f9ce93 [FIX] web, sale, account: company logo
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
2017-02-14 12:14:23 +01:00
Denis Ledoux 41ffb5032b [FIX] mail, sale, account: company used in notification emails
The `user` variable in the mail templates is the `self.env.user`,
https://github.com/odoo/odoo/blob/10.0/addons/mail/models/mail_template.py#L370

which will always be the administrator in the use case
of a notification email
https://github.com/odoo/odoo/blob/10.0/addons/mail/models/res_partner.py#L151-L156

Using `user.company_id` to determine the company of the sales order
or the invoice is therefore wrong, as it will always be the administrator
company, which can be different than the order/invoice company.

opw-706267
2017-02-13 15:18:23 +01:00
Christophe Simonis a282d4ae7f [MERGE] forward port branch saas-14 up to be9dfb331f 2017-02-10 18:41:06 +01:00
mmo 33b09d0d5e [IMP] generic: Open external links in a new tab by default
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.
2017-02-10 14:29:29 +01:00
Mansi Gandhi c3cf05af3e [IMP] sale,account: Move pro-forma to sales and make it a quote report
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)
2017-02-08 17:11:07 +01:00
Christophe Simonis 6a942a9e96 [MERGE] forward port branch 10.0 up to 8a0151b4bc 2017-02-02 12:42:51 +01:00
Christophe Simonis ba8a1c7ec2 [MERGE] forward port branch saas-11 up to e86983112e 2017-01-27 18:20:28 +01:00
Christophe Simonis 047efcbd58 [MERGE] forward port branch 9.0 up to 838beb12de 2017-01-27 16:21:51 +01:00
qdp-odoo 838beb12de [FIX] account: full reconcile sequence has to be shared among companies.
Otherwise, only the main company can make a full reconciliation
2017-01-27 16:05:00 +01:00
Jitendra Prajapati e9e2e0cbb5 [IMP] account: Add a payment receipt report that can be sent by mail
- 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)
2017-01-10 10:38:50 +01:00
fgi-odoo d7bca63e36 [IMP] account: remove space in reference bracket 2017-01-10 08:34:35 +01:00
Fabien Pinckaers 5f5d9a7755 [IMP] account: more explicit email (with the design, it's not obvious that it's in attachment) 2016-12-22 14:47:54 -08:00
Kinjal Mehta b0185e15cc [FIX] all: fix some common typos
Sale Order --> Sales Order
Sale Report --> Sales Report
Sale Team -> Sales Team
Payment Term --> Payment Terms
2016-12-22 13:29:38 +01:00
Fabien Pinckaers 28a912d821 [FIX] account: invoice email, fixing signature style 2016-12-20 20:55:22 +01:00
dut-odoo 78b2aa4ce5 [IMP] account: show send by email button on invoice for pro-forma stage too
- when we send invoice by email, the template shows `False` at invoice number,
we will show `pro-forma` invoice instead of `False`
2016-11-03 11:49:28 +01:00
Christophe Simonis 8847519621 [MERGE] forward port branch 10.0 up to 0acd63d 2016-10-12 17:10:49 +02:00
Thibault Delavallée 8d096af9ea [MOV] account: rename mail template file according to guidelines 2016-10-12 15:09:31 +02:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
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, ...).
2016-10-05 10:29:00 +02:00
Christophe Simonis f4fc3985b6 [MERGE] forward port branch saas-12 up to 10cde43 2016-09-16 11:03:50 +02:00
Olivier Dony 70eb86cbc0 [FIX] account: fix typo in invoice mail template
The link to view the invoice was always missing.

Introduced at 9a51855008
2016-09-14 19:18:37 +02:00
Thibault Delavallée 4a016f6180 [FIX] account, sale: effectively hide internal content in chatter using o_mail_notification summary
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.
2016-09-09 18:17:34 +02:00
Christophe Simonis 1a77d9d02a [MERGE] forward port branch saas-12 up to 476cb5a0 2016-09-03 23:57:57 +02:00
Thibault Delavallée 97425bfe3f [REF] various: make mako mail templates more xml compliant
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.
2016-08-30 15:54:55 +02:00
Yannick Tivisse 4b60d5c1bd [IMP] account,sale,purchase: typo 'Payment Term' -> 'Payment Terms' 2016-08-30 13:20:23 +02:00
Yannick Tivisse 9a51855008 [FIX] account,sale: Correct management of notifications to portal users
[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
2016-08-30 10:17:38 +02:00
Yannick Tivisse d6e1d41128 [MIG] account: Migrate remaining old API chuncks of code 2016-08-08 12:24:40 +02:00
Fabien Pinckaers 8eb63b2f06 [IMP] sale, account: custom email when invoice/quotation, not simple messages 2016-07-18 00:16:32 +02:00
Fabien Pinckaers 8cb4252d44 [IMP] sale: better email template for quotations 2016-07-17 23:49:23 +02:00