Commit Graph
192 Commits
Author SHA1 Message Date
Florian Charlier 77f9ff50db [REF] *: use onboarding module
* = account{_payment}, base, onboarding, payment{_stripe},
sale{_management}, web, website_sale

Use the dedicated onboarding module introduced in 16.0 instead of
the res.company model to store onboarding progress.

It allows
 * onboarding steps to be reused across panels
 * to support steps that should be completed per-database or per-company
 * to clean the res.company model from many fields and methods,
 * to remove many views, controllers, actions

Module-specific notes:
* account: We also clean the remaining two steps that are not
part of an accounting panel but make the most sense to be kept here.
* account_payment: Following 8e4e8eb8, the payment provider step is
added to the invoicing onboarding panel. We apply this change here too.
Also impacts the website_sale_dashboard panel (see related ENT PR).
(The "sale tax" one is currently used for to the website sale dashboard).
* payment: Note that the step was already not part of an onboarding
panel within this module.
* website_sale: We clean
  * a field not used (The website_sale dashboard onboarding panel used
  the payment_provider_onboarding_state field).
  * a method that was only called from website_sale_dashboard, so it is
  moved there. See related ENT PR.

Includes a few tests.

Moving views/templates/styling, as well as cleaning residual onboarding-related fields and methods in base, including populate.

This also includes restoring the "onboarding_complete" overlay panel
animating it to disappear after a few seconds so that it doesn't hide
text and block buttons to re-open steps.

Task-3025136

Part-of: odoo/odoo#104223
2023-06-30 23:37:50 +02:00
Thibault Delavallée be398b428a [FIX] auth_*, sale: improve 'from' of templates by adding company fallback
Emails on Sale Order, Invoice, Recovery cart. When no sales on sale.order
use "COMPANY" <email of company> as fallback before the current user.
Reason is that odoobot is often used in automatized actions and having
it as email_from is not really user friendly.

Also add company fallback in auth modules email templates (if not already
using it) for the same reason.

Task-3346388

closes odoo/odoo#124472

X-original-commit: 597fc004148bf39e8f56e36e840aa6788872f237
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-09 18:30:31 +02:00
Horacio TellezandMorgane Demesmaeker aa03d3380a [IMP] payment,sale: also confirm quotation after multiple partial payments
When creating payment links for the customer, the user can now decide on a partial amount to be
paid at the time.

Use case: when the customer cannot pay the SO amount with one payment, e.g. limit on the credit
card, the user will now have the possibility to set a partial amount on the payment links.
The order will be automatically confirmed when the amount chosen is equal to the remaining amount
to be paid.
Additionally, the customer will be notified by email for each payment done instead of only at the
confirmation of the order, which will happens only once the total amount is paid.

Task - 2672713

closes odoo/odoo#109661

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Horacio Tellez <hote@odoo.com>
Co-authored-by: Morgane Demesmaeker <edm@odoo.com>
2023-05-16 20:33:07 +02:00
Horacio Tellez 2b1e2abda3 [IMP] payment,*: restrict access to payment.transaction records
Since 15.0, it is no longer possible to have partnerless transactions.
Nonetheless, migrated databases could contain transactions without a
`partner_id` set.
This commit cleans existing rules to make those transactions are not
accessible to unwanted users.

We take the opportunity to clean the security of payment.transaction
records globally.
Now only admin and accounting users have access to payment.transaction
records. The code of different applications has been adapted accordingly.

Task - 3102824

closes odoo/odoo#113515

Related: odoo/upgrade#4564
Related: odoo/enterprise#40939
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-15 15:07:13 +02:00
Victor Feyens e275f0968d [IMP] website_(*)sale: configure tax display by website
task-3221549

closes odoo/odoo#120813

Related: odoo/upgrade#4643
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-15 09:37:51 +02:00
bve-odoo a1b1e54e66 [REM] sale: unused use_quotations field
task-1962182 introduce the field back in 12.5
but did not added any logic with it.

The tooltip suggested the need for it tho:
"Check this box if you send quotations to your customers
  rather than confirming orders straight away."

related to 0d2be38333
opw-3198202

closes odoo/odoo#115031

Related: odoo/upgrade#4449
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-13 15:25:55 +02:00
maximilien(malb) ee2c82700e [IMP] account,sale,repair,website,purchase: remove setting and display correction
Before this commit, the accounting module had a setting on the selection of taxes used by the sales, purchase, website_sale, ... modules. In addition, the website_sale module had the same setting related to the accounting one.
This PR isolates the tax selection parameter in the website_sale module, and instead of using the tax selection, the accounting module will use rounding method (round per line, round globally).
Selecting one of the two will change the display of all account_move or other view using the tax selection setting.

Display changes:
In round per line, a column tax excluded will always be displayed while a column tax included will be in optional hide.
On the other hand, in the round globally, only the tax excluded columns will be available.

closes odoo/odoo#99209

Task-id: 2954332
Related: odoo/upgrade#3826
Related: odoo/enterprise#30853
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-02 19:24:45 +01:00
Victor Feyens 7d077c8579 [IMP] sale: split data file
task-2880950

Part-of: odoo/odoo#97565
2023-02-03 11:45:18 +01:00
Demesmaeker 83c52575d0 [REF] product,repair,(*_)sale(_*): unrequired pricelist
Removes the constraint of using a pricelist and makes all sales flows
rely on the currency of the sale order (or repair order)

task-2735672

closes odoo/odoo#84920

Related: odoo/enterprise#24716
Related: odoo/upgrade#3642
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-01-18 21:08:52 +01:00
Thibault Delavallée 28b4ba4049 [IMP] mail, various: allow to link multiple reports to templates
RATIONALE

Improve usage of composer in comment or email mode: support batch-posting in
comment, support more configuration from templates, improve global model.

SPECIFICATIONS

Update report_template field on template model to be a many2many field instead
of a many2one. It allows to attach multiple dynamic reports to a given template
instead of being limited to a single one.

Name should now come from the report itself, which should be considered as
complete by itself. Template cannot override report naming anymore.

Task-2868153 (Mail: Allow multi reports in mail templates)

Part-of: odoo/odoo#99482
2023-01-17 20:58:40 +01:00
Denis Ledoux 3752b3166e [REF] base: set USD as default currency for the main company
There are three rationales behind this change to set USD as default
currency and to enable it in the demo data, from the beginning.
With a demo database, before this revision:
1. On runbot, with all modules installed, it's already USD the default
   company currency. It's only when you install a module not depending
   on account that it's EUR the company currency by default (e.g. CRM)
2. in the base demo data,
   the company is set in the United States but with the currency EUR,
3. before installing account, the company currency is EUR,
   after installing account, the company currency is USD,
   this is due to the fact as the company is in the United States,
   the US Chart Of Account is installed, switching the company currency
   to USD.
4. when you install a demo database with a module not depending on
   account, you are left with a database without any active currency,
   and the monetary fields therefore do not show any currency.
   For instance, install only CRM with demo,
   you have no currency symbol before or after the expected revenue,
   which is not the best user friendly experience.
   On runbot you do not feel it because all modules are installed,
   therefore with account installed, which activated the USD currency.

Additional weird thing with point 2.:
- Unit tests in modules not dependent on account with the
  post-install tag had to handle this sudden change of currency change
  before and after installing account.
  For instance, when running their unit tests with only their module,
  but not account, the company currency is EUR,
  but when executing the same unit test with all modules installed,
  the company currency is USD.
  The unit tests had to handle this sudden change within the unit test,
  for instance by setting a 1.0 rate for their own company currency,
  which shouldn't be the case: the rate of your own currency should
  always be 1.0.

closes odoo/odoo#107113

Related: odoo/enterprise#34613
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-12-13 11:47:49 +01:00
Victor Piryns (pivi) 282945a5a5 [IMP] product, sale: define product exclusions with their products
Following recent changes in stable deleting/archiving product variants forbidden by
attributes exclusions, installing some modules after the sale app failed because
the product `product_product_4d` specified in `product` was deleted by the attributes
exclusions of the `sale` module.

This has been fixed in stable by removing all references to this xml_id.

Nevertheless, this bug showed us that the definition of attributes exclusion
for a product in another module than the one creating it is a bad idea, as it
modifies what's allowed or not with that product, leading to potential database inconsistencies.

This commit moves the exclusions targeting products from the `product`
module to the `product` module, to reduce the risks of other modules using/referencing
the deleted/modified products in a way conflicting with the exclusions.

opw-3040916

closes odoo/odoo#104020

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-04 17:56:43 +01:00
Victor Piryns (pivi) 6778fb177c [FIX] product, sale, stock: remove deleted product from demo data
Current behaviour:
When installing Sales, then PoS, we get an error when loading the modules.

Expected behaviour:
No error should be present when installing PoS just after the Sales app.

Steps to reproduce:
(With demo data)
- Install Sales
- Install PoS
- Get Error

Reason for the problem:
When installing Sales, there is the Product dependency that creates a product variant,
named product_product_4d.
Then in the Sales demo data there is the addition of an "exclude_for"
record (basically an exclusivity rule for variant attributes, for ex: A AND B cannot be together).
In our case it happens to be the attributes which product_product_4d was based of. Therefor the ORM
deletes said record (from the database).
Then when installing PoS, it installs Stock as a dependency, which demo data references product_product_4d,
which is not present anymore in the database.

Fix:
Remove the creation of product_product_4d and all the records that reference it.

Affected versions:
- 14.0 (separate PR)
- 15.0
- saas-15.2
- saas-15.3
- 16.0
- master

opw-2999180

closes odoo/odoo#104184

X-original-commit: 3e49e533892f94eeb094a436fa34cbac3ed7ad6d
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2022-10-27 08:44:49 +02:00
Dossogne Bertrand 7c4da16b59 [IMP] mail, various: improve mail template usability
Allow our users to modify mail template more easily

- make the list accessible from the settings
- give them a link to update relevant views to update header/footer
- make the list and form of templates more readable
- add a description on templates, allowing to describe their usage

In order to better filter templates, a new category field is added that
is computed based on active flag, description being set and the template
having an xml ID. Master templates are active, with a description and an
xml ID.

Update master data to add description on some templates.

task-2944770

closes odoo/odoo#101730

X-original-commit: dfa867343ee8842f3f127ac62584fd471b41dde1
Related: odoo/enterprise#32079
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-04 09:55:46 +02:00
Florian Damhaut 6c0d0cedc7 [FIX] sale: change name to display_name
small change forgotten in c1b41bcd08

closes odoo/odoo#100401

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-09-19 11:29:02 +02:00
Horacio Tellez f7b8f07501 [IMP] payment: rename of acquirer to provider
Changing the name of model payment.acquirer to payment.provider
and everything that it touches. It is technically incorrect to
use the term "acquirer" for systems that only provide a service
of payment.
After this commit the model payment.acquirer and all related to
it will be renamed to payment.provider.

Task - 2842088

closes odoo/odoo#90899

Related: odoo/upgrade#3542
Related: odoo/documentation#1981
Related: odoo/enterprise#27131
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-09 13:38:08 +02:00
Thibault Delavallée d13d251a2f [MOV] various: move and split mail data
Just doing the summer file cleaning. Move mail data into files named based on
their model, easing maintenance and searching for those data.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
Tiffany Chang (tic) 22fa7f90e4 [IMP] {website_}sale, delivery: add local delivery option
This commit does a couple of small related improvements:

- adds new delivery options: "Local Delivery".
  We replace the existing "Normal Delivery Charges" with the new "Local
  Delivery" since it is now redundant.
- Originally a "Local Pickup" demo option was going to be added, but
  this appeared redundant with the "[On Site Pick]" added in
  odoo/odoo#87636 . Regardless, an additional `carrier_description`
  field has been added so users can include extra instructions (e.g.
  address to pick up from, when pickup can occur, etc) to sales orders/
  confirmation emails (emails only via ecommerce sales).
- adds option to filter based on zip prefix rather than the previous zip
  "range" option, which was too restrictive in some cases (e.g. in the
  UK where zips can have letters in them). Note that users can view/edit
  zip prefixes in menu under settings when debug mode is active. Note:
  - prefixes are ordered by name so its easier to read large numbers
    prefixes
  - prefixes are always capitalized to avoid duplicate prefixes that
    differ by case + avoid capitalizing all prefixes every time the
    `_match_address` logic is called

Task: 2706451
Upgrade PR: odoo/upgrade#3384

closes odoo/odoo#84620

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-06-29 14:44:19 +02:00
Jinjiu Liu 782e3983e9 [FIX] sale: email template shows free shipping over an amount
Reason: this fix is a patch for previous PR: https://github.com/odoo/odoo/pull/91009
As it should only depends on amount_delivery instead of fixed_price

Fix: clean the redundant condition and modify the delivery price
rendering in the else part

closes odoo/odoo#92965

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-06-08 17:58:54 +02:00
Trinh Duc Do 945e409bf4 [FIX] sale: remove duplicate product records
closes odoo/odoo#92384

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-30 19:41:00 +02:00
Jinjiu Liu 2bcb6fd9d1 [FIX] sale: email template shows free shipping over an amount
Reproduction:
1. Install Sales and eCommerce, check “Delivery Methods” in Settings ->
Sales
2. Go to Sales->Configuration->Shipping Methods, create a Fixed Price
shipping method with “Free if order amount is above” checked, and set
amount 500. Make this delivery method the only published one
3. Go to the webshop, order something with a price above 500, and
checkout
4. At the backend, check the Sales->Quotations, click the order and
check the confirmation message (or click “SEND BY EMAIL ”, choose the
confirmation email)
5. The Shipping Method still shows the fixed price instead of “Free”

Reason: The confirmation email template doesn’t show the delivery price
based on the actual cost of this order

Fix: Add another condition to the “Free” case. If the amount_delivery is
0, we show the price behind the delivery method as “Free”

opw-2834505

Related PR: https://github.com/odoo/odoo/pull/90880
Related commit: bb032d4e9e535b40692578512c4b37ac9cccedff

closes odoo/odoo#91009

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-05-23 11:59:56 +02:00
Demesmaeker 27a6d5dfcc [IMP] sale: ask confirmation for SO cancellation
Before this commit, when cancelling a SO, the wizard opened only when
there were draft invoices or delivered picking in the order.

In order to complete the notification flow of the SO and avoid
unexpected  cancellation of orders, the user must now confirm
cancellation and gets to possibility to send an email notification.

task-2660895

Part-of: odoo/odoo#81569
2022-05-09 19:05:40 +02:00
Nicolas Bayet b995a777ac [FIX] sale: properly cycle through style
Before this commit
At each iteration, the `loop_cycle_number` was reset to 0.
This caused the cycle condition to always be the same.

After this commit
The cycle condition will properly make the style cycle.

closes odoo/odoo#88686

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-04-13 17:55:53 +02:00
Arnaud Joset 9ac53b07db [IMP] sale,sale_management: adaption for subscription override of SO
Before this commit, the sale module could not be used to manage subscriptions in an override.
This commit adapts the sale module to https://github.com/odoo/enterprise/pull/21825

taskid: 2568007
2022-04-07 10:57:49 +02:00
Florian Charlier 332bfade6e [FIX] mail: adjust emails design
Improve the design of SO/PO/INV mails together with the other changes of the
release, i.e. fixes a few imprecisions introduced by odoo/odoo#82167.

In particular, these changes enforce
* a responsive, mobile friendly layout tested on many devices and OS
* more generally, a consistent styling. Note that some redundancy in directives
 is required for compatibility across email clients.

Translation files are included.

Task-2751139
Follow-up of Task-2712450
See odoo/enterprise#25154

closes odoo/odoo#86494

X-original-commit: 4914127b428802d2ff2e15351238a3ffef24b9cc
Related: odoo/enterprise#25306
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 13:16:46 +01:00
Ivàn Todorovich f561d2a95c [FIX] sale: Impossible to unset invoice_mail_template_id
Steps to reproduce:

1. Go to Configuration > Website
2. Enable Automatic Invoice and Save
3. Remove the value from Invoice Email Template and Save

Result:

* The field shows as set by the default value.
* The ir.config_parameter doesn't exist.

Excepted:

* The field should be shown as unset.

closes odoo/odoo#84901

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-21 10:28:22 +00:00
Victor Feyens 15440457b1 [IMP] sale: confirm demo orders in batch.
Minor setup performance improvement.

closes odoo/odoo#84055

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-07 15:24:50 +00:00
Thibault Delavallée 75979fccdf [REF] mail, *: improve 'pay now' notification template
* = sale, purchase

PURPOSE

Purpose of this commit is to improve the 'Pay Now' notification template
used notably when using the "Send by email" button on

  * invoices
  * sale orders
  * RFQ and purchase orders

SPECIFICATIONS

Global specifications

  * remove gray background that is around the white content (aka have an
    email with an uniform white background);
  * move button on top of email like other notification templates (top-left
    and company logo is top-right);
  * fix various small wording issues;
  * fix signature usage;

Technical specifications

Remove custom definition of access links and labels in 'Pay Now' notification
template (``mail_notification_paynow``). It is now done at model level through
the ``_notify_get_groups`` that is generic to notification emails. This allows
to remove QWeb override in purchase and sale notably. Displaying access links
is now controller by the ``has_button_access`` value. Model computes links,
access and labels while view only displays what is requested. That way any
template can use those values instead of being defined in a template subject
to user changes.

Sale / Purchase

Overrides of those modules is not necessary anymore since button labelling
and URLs are managed at model level.

Purchase "specific" buttons for Accept / Update dates are now email layout
actions, like used in other modules like HR or Project.

Continuation of odoo/odoo#76418 .

Task-2712450 (Mail/Sale: Improve 'Pay Now' notification template)

Part-of: odoo/odoo#82167
2022-01-31 17:47:33 +00:00
Thibault Delavallée bf6c805b66 [FIX] mail, *: add signature in email layouts only if requested and set
* = account, purchase, sale

Purpose of this commit is to add signature only if really asked. A variable
is available for that purpose (``email_add_signature``, recently renamed from
``add_sign``). We also correctly check signature is not void or pseudo-void
using tool ``is_html_empty``. Indeed editor may generates pseudo-void content
like ``<p><br /></p>``.

As signature is not added when a template is used (see composer code) we ensure
it is defined in mail templates used in "Send by email" flows. Indeed we cannot
know if a template already has a signature or not. To avoid having twice a
signature no signature is added in email notification layout when a template
is involved.

Continuation of odoo/odoo#76418 .

Task-2712450 (Mail/Sale: Improve 'Pay Now' notification template)

Part-of: odoo/odoo#82167
2022-01-31 17:47:33 +00:00
Victor Feyens d71eb19fb4 [IMP] sale: clean data/demo files
* indentation
* group all product demo data in the same file
* move one action to the views folder
* ...

Part-of: odoo/odoo#82719
2022-01-13 15:30:02 +00:00
Thibault Francois 2daa9a1673 [FIX] sale: send invoice only when ready to be send
Issues
------

In the module sale, with the automatic invoicing configured.
Payment transaction generate, post and send the invoice when
they are post process.

In some country the invoice is not directly ready to be sent
due to some edi document

Solution
--------

use the mechanism introduce with https://github.com/odoo/odoo/commit/3a29371eb70309f46e3b8938434287fefc23b351
to delay the sending. Introduce a cron that check invoice to send

closes odoo/odoo#81526

X-original-commit: 97b74d8304337d901d9422418cbd0dcdcc46fcf5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2021-12-22 14:02:37 +00:00
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
Victor Feyens 92d4987acb [FIX] sale: enable demo SO's currency
Needed for demo flow of payment links.

closes odoo/odoo#77874

X-original-commit: 7b51d4e0ae5a9a10cfd548bc6307dac180be280f
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Valentin Chevalier <chevalierv@users.noreply.github.com>
2021-10-05 15:41:34 +00:00
Nicolas Bayet 4813f42997 [IMP] mail,*: replace jinja with qweb
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment

By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).

There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).

We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.

To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.

This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
  (for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
  in order to see only one at once
- a floating select input to switch visibility of a particular logical
  branching

Task-27033

X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
2021-09-28 23:42:54 +00:00
Martin Trigaux d9e3aab69b [FIX] mail: convert res_model_id to selection
Following the removal of read access on ir.model (odoo/odoo#69120),
the mail.activity.type model was not accessible to non-admin users due
to the res_model_id many2one field.

Before this commit, a project user could not access the Activity Type
menu.

Convert it to a selection field with the selection values being
computed in sudo.

closes odoo/odoo#74981

Related: odoo/enterprise#20214
Related: odoo/upgrade#2734
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-23 06:56:00 +00:00
Benjamin Vray 81f0f0840c [IMP] website_sale, *: review prices to be more realistic
*: product, purchase, purchase_stock, sale, sale_stock, web

PR-69971

task-2501400

closes odoo/odoo#69971

Related: odoo/enterprise#19974
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-30 10:39:44 +00:00
bbh-odoo f0c44897c9 [IMP] sale: change default invoicing policy to 'ordered'
Currently, the default invoicing policy is based in `delivered`
quantity since commit: https://github.com/odoo/odoo/commit/3ad4abe171e8e7e86ed0e7b7f000e734d8a2ad92
but due to that onboarding flow is often broken/very complex.
hopefully the statement 'in countries with anglosaxon accounting, that's mandatory' is exagerated.

So in this commit, Default invoice policy is set (back) to
'Ordered quantity'

closes odoo/odoo#69825

Taskid: 2443371
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-04-27 10:53:42 +00:00
Antoine Vandevenne (anv)andVictor Feyens 573ed74c12 [REF] payment, *: refactor online payments API
This commit replaces the old online payments API of the `payment`
module with the new one and adapts to it all the implementing modules.

See the merge commit for more details.

task-2085989
task-2119838
task-2165982
task-2289255

Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-03-30 09:25:51 +02:00
Jairo Llopis 7b62480bef [IMP] sale: change template mail button text
Some customers are scared of clicking on a button that says "Accept &
pay" directly from an email.

So, instead of using the online features, they download the PDF, sign it
and return it.

It seems legit, due to the text that you can read, so as an UX
enhancement, I propose to change that button's text.

@Tecnativa TT27664

closes odoo/odoo#65597

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-03-17 11:22:20 +00:00
fw-bot 0a8f4b6cda Purpose
=======

This PR is in the continuity of odoo#62360.

- Display remaining hours in task sales_line_id (name_get + task form view)
- Remove internal reference from services demo data
- Display sol in project timesheets list if project is billable
- Remove use of non_allow_billable in timesheets as it has been removed from project and task in previous PR (see above)
- Only recompute planned_hours for service product
- Determine the correct SOL for timesheet
- Set the last SOL of customer on timesheet if none is set on task or project
- Allow edition of so_line in timesheet
- Restrict SOL on project to sale lines with a service product
- Use same widget on partner_id many2One than in sale.order (using ranking)
- Remove timesheets table in SO and invoice portal.They were added in previous PR (see above). This introduces the use of links to /my/timesheets/.
- Review portal timesheets (my/timesheets/ and link from orders and invoices)
- Activate group_uom "Units of Measure" on sale_timesheet install
- Hide partner phone number in task form view
- Only determine SOL of task and timesheet if allow_billable=True
- Filter SOL in task so that it matches the SOL of the project SO
- Display red label if remaining hours is negative
- Change SO compute behavior
- Only open SO for salesman on project overview

task-2409761

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#63695

Forward-port-of: #62900
X-original-commit: b1985773f3a67e28049f9e2bb635bcab059ad9c0
Related: odoo/enterprise#15427
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-12-22 13:40:28 +00:00
Thibault Delavallée e3fd1cd91e [MOV][IMP] sale(_coupon), pos_coupon: reorganize qweb / jinja templates used for mailing
PURPOSE

Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.

SPECIFICATIONS

  * move those templates in their own file to ease their discovering and
    maintenance;
  * put them into data (as those are not views even if it contains qweb)
  * guidelines are now :

    -> Qweb templates should be in data/mail_templates.xml;
    -> mail.template records should be in data/mail_template_data.xml;

  * put their declaration in no update when not done if template has no
    technical code or complex dependency on underlying code;
  * move found mail data (mail.message.subtype or mail.activity.type) records
    in a mail_data file that should contain only "core" records linked to mail;

LINKS

Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
2020-11-25 12:31:09 +00:00
Florent de Labarre 95d58c75e9 [FIX] sale: wrong object mail if proforma
closes odoo/odoo#61874

X-original-commit: 304ebe3d930ca8deab71c6b8109cb73166fe7648
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-17 15:22:46 +00:00
Vishnu Thuletiya d24758db56 [IMP] sale: Change the label in SO mail while transaction is pending
Currently, when the payment is done by the wire transfer or by sepa
then the transaction is going to be in the 'pending' state and due
to that confirmation mail will display the button as
'Sign and Pay Quotation' but is should be the 'view quotation'.

So in this commit we check for the last transaction and if transaction
status is 'pending' then display the 'View Quatation' instead of
'Sign and Pay Quatation'.

We have not modified method has_to_be_paid because it's used to display
the button on portal so still it will display the 'Sign and Pay' on portal.

closes odoo/odoo#49389

Taskid: 2210990
Closes: #49389
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-15 08:46:04 +00:00
Hardik Prajapati b5806ea355 [IMP] various : Update the demo data of SO/PO/invoice with activities
Purpose of the task is, we have added the activities on various
listviews, the goal of this task is to update SO/PO/invoice demo data
with activities and also set tags on sales orders.

So in this commit, We added the activity on several SO/PO/Invoices and
also added the some tags one sales order and set the user as False
where the user is set as 'Odoobot'.

closes odoo/odoo#51799

Taskid: 2254708
Closes: #51799
Related: odoo/enterprise#10743
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-27 10:10:40 +00:00
Nasreddin (bon) 8adaaf5074 [FIX] sale: Alter sale order confirmation mail display
Issue

	- Install "Sales" and "eCommerce"
	- Activate debug mode
	- Go to Settings->Technical->Email->Templates
	- Search and open "Sales Order: Confirmation Email" record
	- Click on stat-button "Preview"
	- Select a "Sale Order" sample  with product(s)

	The quantity column label is not in the right place/column.

Cause

	Each row of the table is a table.

Solution

	Add same fixed column size css on each table.

opw-2242914

closes odoo/odoo#51380

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-18 14:43:34 +00:00
fw-bot e00ce93a77 [FIX] sale: fix uneditable "Confirmation Email" template body
Website sale order confirmation email is broken by design. Indeed it has
jinja markers between html elements that do not allow them, like between
table and tr, between tr, ...

In this commit we completely rewrite the structure to correctly include
jinja markers where they are not moved or stripped by standard browsers
and editors.

Translations are updated accordingly as changing a mail template content
imply updating the whole body translation.

Followup of 74c5c00

website_sale: add website on some demo orders

Purpose is to showcase orders using website field, used notably for some
template rendering.

Forward port of afd173652214000ed and f74c86d448246b796d

closes odoo/odoo#48228

X-original-commit: d3bdb0a42eb052281b4652bf78e82b1c6c1c1d24
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-24 08:25:21 +00:00
Lucas Lefèvre 3ad4abe171 [IMP] sale: Change default invoicing policy
Purpose
=======
The default invoicing policy should be based on the delivered quantities
by default because:
- In countries with anglosaxon accounting, that's mandatory
- Even for other countries, it's probably as frequent as the "based on ordered"
  quantities

Task 2159161

closes odoo/odoo#47526

Related: odoo/enterprise#9355
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-19 07:44:40 +00:00
Helly kapatel 01497474d7 [IMP] sale: rename mail notification template 'oezirhgoi'
In Sale, there is a view called oezirhgoi which adds the sign and pay
online buttons (xml id sale.mail_notification_paynow_online)

So rename it with the 'Quotation: Sign and Pay mail notification template'

closes odoo/odoo#46954

Taskid: 2196751
Closes: #46954
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-05 12:39:32 +00:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
RATIONALE

Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case

  * using the template in the composer on a single record: it is displayed
    in the rendered template in the composer, meaning people could change it.
    This behavior is interesting as it allows to see the email content;
  * using the template in the composer in mass mail mode: it is not displayed
    as only the raw jinja is displayed. It is therefore not obvious that it
    will be appended to the body of the mail. People could add it manually and
    have 2 signatures as a result;

A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.

Behavior will therefore be

  * use a template -> specify signature usage in it manually through jinja;
  * do not use a template -> signature added in sent emails;

SPECIFICATIONS

Remove user_signature.

Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.

Quickly clean some signature integration.

LINKS

Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761

Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-02-11 14:01:13 +00:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00