Commit Graph
203 Commits
Author SHA1 Message Date
Christophe Simonis 49c3264ce0 [MERGE] forward port branch saas-11.3 up to 4850fb0838 2018-09-07 14:43:48 +02:00
Christophe Simonis f19e6ce561 [MERGE] forward port branch 11.0 up to 213759b03e 2018-09-05 18:52:27 +02:00
Goffin Simon d448849ba3 [FIX] delivery: Error message for unavailable delivery methods
With a fixed price delivery method, the error message was not displayed when
the address doesn't match.

Inspired from function base_on_rule_rate_shipment

The error message was not clear enough.

opw:1879204
2018-09-03 11:13:34 +02:00
Christophe Simonis dabe59df9c [MERGE] forward port branch saas-11.3 up to 27d8daf8a7 2018-08-14 19:43:32 +02:00
Christophe Simonis 27d8daf8a7 [MERGE] forward port branch 11.0 up to 51225c9b9f 2018-08-14 18:59:57 +02:00
Christophe Simonis 51225c9b9f [MERGE] forward port branch saas-15 up to 52e88036f2 2018-08-14 18:24:40 +02:00
Christophe Simonis d4ee30b4fa [MERGE] forward port branch 10.0 up to a487d7d397 2018-08-14 17:09:32 +02:00
Martin Trigaux cd3230c1d3 [FIX] delivery: translate delivery line
Fixes #26289
2018-08-10 15:27:16 +02:00
Christophe Simonis c8bb02141d [MERGE] forward port branch saas-11.3 up to 3cdcbce93c 2018-06-28 19:01:52 +02:00
Christophe Simonis 40836194c2 [MERGE] forward port branch saas-11.2 up to 12ddec3a76 2018-06-27 13:41:00 +02:00
Christophe Simonis 12ddec3a76 [MERGE] forward port branch 11.0 up to 152519cd65 2018-06-27 11:37:52 +02:00
Arnold Moyaux 86cb5203a1 [FIX] delivery: traceback on single tracker
When using easypost, it could exist more than one tracking
link. In this case they are stored as a json and the method
open_url try to load it as a list of url. Then it checks if there is
more than one url or not. However in a single case, there is only one
string and the lenght of a string is the number of chracter inside that
is often more than one.
2018-06-26 13:16:27 +02:00
len-odoo d7f5a1b25e [FIX] delivery, sale, sale_order_dates: ignore delivery line in commitment date computation
The commitment date is computed using every line from the sale order.
When the picking policy is set to direct, it takes the earliest date
among the sums of the order date and lead time.
However when the delivery is set, is adds a line with an order date of 'now' and
no lead time.
This date thus necessarily becomes the commitment date, bypassing what was
intended by setting a lead times on products.

We simply ignore delivery lines in this computation.

opw 1855646
2018-06-26 10:35:57 +02:00
Pierre Masereel 76662a0a66 [REF] stock, delivery: entire package manipulation
We added a model to work easily with packages, using the quant packages
was not a good solution to move entire package and plan package moves,
because we always had to give the picking in context, and create some
move lines, so it was only possible when state was assigned (when move
lines exists)

So we created a model package level, linked to picking, move and move
lines allowing to easily plan package transfer and put in pack.
2018-06-11 17:46:19 +02:00
Arnold Moyaux 6892cc8322 [IMP] delivery: handle multiple trackers
Easypost return multiple tracker links for a single
picking. Currently it returns one link per package.

*_get_tracking_link instead of returning a simple string,
it could return a list of list with data
[[tracker number, tracker_puclic_url], ...]
stored as a json dump.

This commit add a check on carrier_tracking_url
in order to check if it has a json format. In this case it
will log a note and will not use the url action.
2018-06-11 16:33:52 +02:00
Christophe Simonis 2ab7ad8361 [MERGE] forward port branch saas-11.3 up to c00df14654 2018-06-07 11:43:07 +02:00
Christophe Simonis 969eb3fa2f [MERGE] forward port branch saas-11.2 up to c834c0f587 2018-06-06 15:46:36 +02:00
Christophe Simonis aba8c2b8fb [MERGE] forward port branch 11.0 up to 1b272a2050 2018-06-05 16:27:49 +02:00
Nicolas Martinelli d2b7be055a [FIX] delivery: tracking reference
- Create a picking, set as 'Carrier': 'Free delivery charges'
- Enter a 'Tracking Reference'
- Validate the picking

The tracking reference is removed.

opw-1849279
2018-06-05 08:38:38 +02:00
Christophe Simonis e008ef302a [MERGE] forward port branch saas-11.3 up to 53300648ed 2018-05-30 12:18:52 +02:00
Christophe Simonis c2c9a60466 [MERGE] forward port branch saas-11.2 up to a2f275dfc4 2018-05-29 21:05:26 +02:00
Christophe Simonis a2f275dfc4 [MERGE] forward port branch 11.0 up to 4ea3838d89 2018-05-29 20:00:31 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Goffin Simon fce72f902e [FIX] delivery: Translate the delivery method on SO line
In this way the name of a delivery method can be translated on a SO line.
Inspired from function 'product_id_change' in model 'sale.order.line' where
the description of a SO line must be in the language of the partner.

opw:1849656
2018-05-29 10:11:00 +02:00
Benjamin Stiens 6383120f3b [IMP] all: Improve error messages
Many error messages are misleading or too "vague"
This task aims to improve all error message.

Task #47042
PR #23321
2018-05-28 16:45:48 +02:00
Christophe Simonis 644f0959d0 [MERGE] forward port branch saas-11.2 up to 1655202924 2018-05-17 14:23:37 +02:00
Christophe Simonis fa8a67ee5f [MERGE] forward port branch 11.0 up to 5a943390f2 2018-05-15 20:18:14 +02:00
Goffin Simon 35c2a74480 [FIX] delivery: Delivery method name not translated
When adding a SO line with a delivery method (e.g. The Post) for a customer
with a different language that the one set on the current language, the description
of the SO line was not translated. Inspired from function 'product_id_change' in
model 'sale.order.line'

opw:1843934
2018-05-15 17:07:44 +02:00
Christophe Simonis bca769a1e8 [MERGE] forward port branch saas-11.2 up to e70e5b6cf3 2018-05-14 17:31:53 +02:00
Christophe Simonis e70e5b6cf3 [MERGE] forward port branch 11.0 up to 2787de8c68 2018-05-14 16:46:11 +02:00
Christophe Simonis 5a751fa200 [MERGE] forward port branch saas-11.2 up to aae54ecc15 2018-05-09 15:45:20 +02:00
Josse Colpaert 0ca60a8d01 [FIX] delivery: delivery with carrier but not linked to so
When a delivery with free_over=True was not linked to a SO, it raised
an error.

opw:1843829
2018-05-09 15:39:34 +02:00
Christophe Simonis 87e21ccdc5 [MERGE] forward port branch 11.0 up to 521414b1c1 2018-05-02 19:36:16 +02:00
Goffin Simon 019c8b9975 [FIX] delivery: Wrong delivery costs on free_over = True
The calculation of the delivery cost for a sale order / invoice was not correct when
free over  a limit had been satisfied.

Steps to reproduce the bug:

- Set a delivery method DM with a fixed price = 10.0 and free when the amount of the order exceeds 100
- Create a SO for an amount of 150 and set on it DM
- Confirm the SO and deliver it

Bug:

A SO line with DM was created with a fixed price of 10.0 instead of 0.0

opw:1838070
2018-04-25 09:17:00 +02:00
Yannick Tivisse 7a282c9965 [IMP] *: Replace all occurences of 'compute' by '_convert' 2018-04-13 16:54:28 +02:00
Christophe Simonis 0f57bdba72 [MERGE] forward port branch saas-11.2 up to 42659dc70c 2018-03-09 16:25:58 +01:00
Christophe Simonis 4aa5ec3fa5 [MERGE] forward port branch 11.0 up to d67b410dfc 2018-03-07 18:46:38 +01:00
Christophe Simonis d67b410dfc [MERGE] forward port branch saas-15 up to cb87388d72 2018-03-07 17:42:02 +01:00
Christophe Simonis ac89023155 [MERGE] forward port branch 10.0 up to 5e6bb745e8 2018-03-06 12:28:30 +01:00
Nicolas Martinelli 037cfc9f67 [FIX] delivery: products not shared
- Define 2 companies A and B. Delivery methods are linked to products in
  company A
- Deactivate 'Share product to all companies'
- Create a user B in Company B only
- As user B, create a SO and open the drop-down list for delivery
  methods

An access error is raised.

Delivery methods should follow the same record rules than the products
they are linked to.

opw-1815490
2018-03-06 10:02:44 +01:00
Christophe Simonis 36945a5853 [MERGE] forward port branch 11.0 up to c2e878e34c 2018-03-01 19:43:25 +01:00
Goffin Simon bb6039369c [FIX] delivery, website_sale_delivery: Delivery Methods and multicurrency
Steps to reproduce the bug:

- Set your company currency to USD
- Set multicurrency on your user
- Create a delivery method with a fixed price to 50$
- Create a SO with a pricelist in EUR
- Set the delivery method and check the price

Bug: It displayed 50€ while this amount should be converted

opw:1817666
2018-03-01 09:37:44 +01:00
XavierDo 2966d4faed [IMP] product: rename product.uom into uom.uom
Also rename product.uom.categ into uom.category to
 give it a decent name.
2018-02-26 14:27:26 +01:00
Christophe Simonis 3a1df2cf22 [MERGE] forward port branch 10.0 up to 1b5ecbb047 2018-02-08 17:30:08 +01:00
Pedro M. Baeza 84b0ec4da3 [FIX] delivery: Get correct carrier price on picking created from SO
Steps to reproduce:

* Create a sales order (SO).
* Assign a carrier.
* Don't press on "Set price" button next to carrier.
* Validate SO.
* Validate picking.
* Delivery line is added to the SO with price 0.

This is because the delivery SO line is added with the value of
picking carrier_price field, but that field hasn't been set.
If you modify on view carrier field, there's an onchange that
fills correct price, so I use that onchange method for getting
same results.
2018-02-08 10:17:06 +01:00
Christophe Simonis eefca5d492 [MERGE] forward port branch saas-11.1 up to 73610ff992 2018-02-05 16:20:48 +01:00
Christophe Simonis 33bf2fe922 [MERGE] forward port branch 11.0 up to aed8f45346 2018-02-05 15:06:55 +01:00
Arnold Moyaux aed8f45346 [FIX] delivery: compatibility with batch_picking.
Use case to reproduce:
- Install delivery/batch picking
- Process 2 pickings in a batch.
-> Traceback due to ensure_one.

It happens because the action_done method in delivery is
not multi and batch_picking launch action_done on multiple
picking.

This commit makes action_done in delivery multi.
2018-02-05 14:03:54 +01:00
Thibault Delavallée 2f7593761c [MERGE][REF] mail, various: move email notification templates from jinja to QWeb
This merge changes the templates used to send notification emails. They
are currently defined as mail.template using jinja. We choose to make
them QWeb views. There are several reasons to do so

 * those are not real mail.template records. Indeed they cannot be used
   outside of the notification process as some values are computed
   and not available on the mail.message record used to render the
   template;
 * we do not really need other fields than body. Indeed fields like
   subject, email_from or email_to are computed from the notification
   process;
 * we do not want people to update the mail.template without knowing
   the consequences, especially for fields like recipients that may
   broke the mail gateway;
 * using the html editor easily break the mail.template as it is very
   custom and very to break without really realizing it.

It also simplifies template management as it lessens number of mail
templates people have in their list view of mail.template. It avoids
mixing technical and functional templates.

We move to QWeb templates as those are not too hard to customize and
allow to perform body rendering which is what we really need when
notifying people of a new message.

This merge also factorize the "custom layout" used in several addons
to use a single secondary template defined directly in mail. Indeed they
are using the same template. Therefore having it defined only once helps
editing or fixing it.

Please see sub commits for more details about the merge.
2018-01-29 17:06:26 +01:00
Thibault Delavallée 885e7fcda9 [REF] various: use secondary notification template
All those templates are basically the same except some bug fixes that
were not propagated about company. Let us use just the one we just
defined in the mail module.
2018-01-29 16:56:04 +01:00