Commit Graph
217 Commits
Author SHA1 Message Date
Christophe Simonis 4b8bd36219 [MERGE] forward port branch saas-11.3 up to bab2a191d2 2018-11-16 15:39:02 +01:00
Christophe Simonis 15f686eef6 [MERGE] forward port branch 11.0 up to 468dab6748 2018-11-15 20:39:10 +01:00
Julien (juc) Castiaux 1767f2186d [FIX] delivery: useless conversion to company currency when no company
After removing the company from a delivery method, every checkout done
in website fails due to odoo trying to convert the price to the
company currency.

This PR fix the bug by doing the conversion only when there is a
company set on the delivery method.

opw-1905466

closes odoo/odoo#28626
2018-11-13 12:57:52 +00:00
Adrian Torres 3f4f77fd9d [REF] *: adapt code to new related default behaviour
This commit adapts the business code to changes introduced by
the parent commit in order to keep the same behaviour as before.

All readonly=False fields will have to be checked afterwards to confirm
that the business case requires write access to the source field.
2018-09-27 12:10:23 +02:00
Nimesh Jethva e13efbd8b4 [IMP]stock_*: Improvement in model description
Purpose of this commit is to give description more "business oriented"
because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers.

Related Task ID : 37311
2018-09-21 11:45:15 +02:00
William Henrotin ff7df19bd3 [IMP] stock: choose destination wizard
Purpose : during a transfer, if some move lines have different
destination locations and the user click on 'put in pack' button, an
warning is triggered. This message, saying : 'You cannot put in the same
pack move lines having different destination location', is replaced by a
wizard allowing the user to choose a unique destination location. This
location will be set as location_dest_id on all transfer's stock move
lines. After that, the wizard calls again the _put_in_pack() method
where all the logic remains the same.

Task : 1872345
2018-09-20 14:47:06 +02:00
William Henrotin 55327729df [FIX] delivery: pass full context
In a picking of type 'delivery', hitting the Put in pack button load a wizard
to choose package information. This action that load the package wizard overide
the environement context. the issue is we need 'active_id' later. In a full
python flow, the ORM fill the context with standard values like lang,
timezone, ... and active_id. In a flow using RPCs from JS. The context is
not magically rebuild so we lose the active_id.
2018-09-20 14:47:06 +02:00
Christophe Simonis 68d36512ef [MERGE] forward port branch saas-11.4 up to d78f23df84 2018-09-07 20:20:45 +02:00
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
Prakash Prajapati 86d10380a1 [REF] barcodes, delivery, mrp, product, stock: Changing labels
Task: 1879617
2018-08-30 17:24:24 +02:00
RomainLibert 2d738f8563 [FIX] product_form: remove hs code and duplicate internal note
The hs code was only used in a single view, hence it was decided that we
wouldn't keep it
2018-08-17 11:47:28 +02:00
Christophe Simonis 0ac7f8fbe6 [MERGE] forward port branch saas-11.4 up to dabe59df9c 2018-08-14 20:16:03 +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
jem-odoo 80ef7146d2 [REF] sale_*: '_action_confirm' implementation
Impacted modules: sale, sale_timsheet, sale_stock, delivery and
event_sale

The commit ee2b9fae35 split the
implementation and the api of the `action_confirm` method of
a Sales Order.

This commit tries to go further:
1/ change this API: the private method is the implementation that
should be extended when the confirmation should generated other
documents. The state change is extract to be sure that in all
override of `_action_confirm` the SO state will be 'sale' (and
not 'done', in case of activating the options).

2/ adapt other module to this new API. Some of them does not required
the change to correctly work, but it can introduce future bugs.
Doing it now is better ;-)

3/ With this new implementation, we can prioritize SO line treatment
on confirmation. We want the stockable lines to be processed before the
service ones. Indeed, the line (service and stockable) that should
create a purchase order (future dev for services) will search for an
existing PO, but stock has more precise criteria than services. So,
service SO line will find the existing PO from stock while the opposite
is not true.
So, this is why we are now calling `_action_launch_procurement_rule`
before the `super`.
The rest of the treatments (event, delivery, ...) depends on the module
loading order.

Task #39340.
2018-08-10 16:30:19 +02:00
Martin Trigaux cd3230c1d3 [FIX] delivery: translate delivery line
Fixes #26289
2018-08-10 15:27:16 +02:00
Mitali Patel 752a6843d1 [IMP] delivery: Improve the SO invoice status
Purpose
=======

If a SO is only containing lines for which the product is invoiced on
the delivered quantity, the sales order is marked as 'Nothing to Invoice'.

If I add a delivery line, the SO becomes 'To Invoice'. There is not really
a use case in the real life where you will invoice the delivery fees before
invoicing what has been really delivered.

Specification
=============

If an order:
- contains delivery lines or downpayment lines
- If the product on the other lines are invoiced on the delivered quantity
- Nothing has been delivery or can be invoiced for theses lines

Set the invoice status of the sales order to 'Nothing to invoice' instead
of 'To Invoice'

Task ID : 33126
2018-07-30 14:57:04 +02:00
Mitali Patel b26679ce16 [IMP] delivery: make templates more modern and updated with Odoo guidelines
In this commit we improve templates used in delivery. Purpose of this commit
is to have templates that embed or use standard Odoo email layouts to make
them look modern and have a common style across all emails.

Main guidelines

 * better use of div / p / br to try to lessen layout issues, especially
   when updating templates using the editor;
 * correctly sequence the templates fields definition;
 * correctly set templates values notably auto_delete and user_signature
   fields to avoid confusion;
 * correctly layout the email content using light notification email. It
   can either propagate the layout choice through various send mail methods
   or directly embed the styling in the templates for more technical or
   complex templates;
 * use email_formatted computed field when possible to avoid having hand-made
   from / to addresses;
 * fix various typos and improve subjects when necessary;

Content of emails is not necessarily updated as the purpose of this task is
about styling, not content itself.

This commit is linked to task ID 1843376 (and 1868112) and closes PR #25349
(and #25889).
2018-07-24 15:33:22 +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