Commit Graph
139 Commits
Author SHA1 Message Date
Arnold Moyaux 6cf6131ab0 [FIX] delivery: missing field rename in forward port
In saas-15.1 move_lines on `stock.picking` has been rename in
move_ids.

It was miss during #81595 and it's fixed now

closes odoo/odoo#82397

X-original-commit: fd531c7b0baa742cefb7a09c557617806d8a563a
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-07 19:54:40 +00:00
Adrien Widart 33f8a21155 [FIX] delivery: use tracking number only once
When having a shipper for a DO, if the user creates a backorder, the
information won't be sent to him.

To reproduce the issue:
(Use demo data)
1. Create a sale order SO with 2 products
2. Add Shipping: UPS US
3. Confirm SO
4. In the associated picking, deliver one of the products and create a
backorder
5. Process the backorder

Error: In the chatter, there is a label for the first picking but there
isn't any label for the backorder

When confirming the sale order, the backorder is first created and then
the initial picking is sent to UPS. As a result, considering the current
body of `send_to_shipper`, the field `carrier_tracking_ref` of both the
initial picking and the backorder is defined with the same value (i.e.,
the tracking number of the initial picking)

Therefore, when processing the backorder:
https://github.com/odoo/odoo/blob/f29da79ef64a8166e54544d1787912be5665076a/addons/delivery/models/stock_picking.py#L126-L129
`carrier_tracking_ref` is already defined, so `send_to_shipper` won't be
called

OPW-2678549

closes odoo/odoo#81599

X-original-commit: 89f9281b096e24583ff7780a1bb42f0c4b7b477e
Related: odoo/enterprise#22980
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-12-17 16:58:04 +00:00
William Henrotin 3a1473c75c [REF] *stock*: rename move_lines into move_ids in stock.picking
closes odoo/odoo#78732

Task: 2673000
Related: odoo/enterprise#21815
Related: odoo/upgrade#2956
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-10-27 15:48:51 +00:00
Demesmaeker c5e9e03578 [IMP] delivery: mandate the tracking reference for amazon SO
Added a hook in delivery to check if an Amazon order's delivery is Amazon compliant.

task-2573260

closes odoo/odoo#73494

X-original-commit: eb23d10b22c0cafc935d01effc680aebdbdf0057
Related: odoo/enterprise#19578
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-07-09 11:59:31 +00:00
yhu-odoo 1cd0a138cf [REF] delivery, stock: make delivery product a new model
Currently, delivery packaging and product packaging share the same
model product.packaging. In this commit, we make delivery packaging
a new model stock.package.type. The code is also moved to stock
instead of delivery for compatibility reasons.

Task 2341820
PR #63516
ENT PR odoo/enterprise#15363
UPG PR odoo/upgrade#2040
2021-03-31 08:55:44 +00:00
Pratima Gupta 41f290ae11 [IMP] delivery, stock: allow to print labels in PICK+PACK+SHIP
In this commit -
1) Added new field propagate_carrier_id in stock.rule and propgate
carrier in PICK PACK and SHIP if it is ticked.
2) Allow to print Label at any stage of PICK PACK and SHIP after
validation of picking from chatter.

Task-2363484

closes odoo/odoo#62851

Related: odoo/enterprise#15148
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-01-21 12:24:37 +00:00
Nasreddin (bon) 4d902b9d35 [FIX] delivery: No option of delivery packaging when "Based on Rules"
Issue

	- Ensure that the provider of "The Poste" delivery method is "Based on Rules".
	- Create a quotation with "The Poste" as shipping method.
	- Confirm, then click on "Delivery" stat button.
	- Click on "Put in Pack" and create a "Delivery Packaging".
	- Save, go back to quotation and duplicate it.
	- Confirm, then click on "Delivery" stat button.
	- Click on "Put in Pack".

	The "Delivery Packaging" created previously is not available.

Solution

	If 'current_package_carrier_type' is equal to 'fixed' or 'base_on_rule',
	replace it by 'none' since there are the equivalents in
	'package_carrier_type' for 'delivery_type'.

Related fix : https://github.com/odoo/odoo/pull/37427

opw-2310258

closes odoo/odoo#57444

X-original-commit: 5898d31025eacad3e8c37f7a105e20c81831ed17
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-09-10 14:50:10 +00:00
Martin Trigaux 6156f98288 [FIX] *: adapt action content retrieval
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.

Add sudo for other operations on ir.actions.*
2020-08-17 09:09:02 +00:00
Tiffany Chang (tic) d20467bb6a [IMP] delivery, stock: group delivery slip packages
This commit makes it so if a delivery slip contains 1 or more packages
then move lines will be split by package (and non-package) groups with a
"section line" between them. This only applies to when a stock.picking
is 'State=Done'.

In order to accomodate complexity of splitting by package + grouping by
product unless printing serial numbers/lots + template inheritance,
reoccurring parts of the template are split into their own templates and
called. Relevant inheritance has been updated to match.

Additionally, picking.shipping_weight calculation has been updated so if
a pack.weight = 0 then calculation will default to the calculated
product weight. This prevents inconsistency between the "Total Weight"
at the top of the Delivery Slip and the package sections' displayed
weights. To distinguish which value is being used, package sections that
use the total product weight rather than the pack.weight have
"(estimated)" after it.

This completes subsection 3 of overall Improve delivery slip task.

Task: 2039720
2020-07-03 11:54:08 +00:00
Martin Trigaux 80e97e98ce [IMP] *: use named placeholders in translated message
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
2020-06-18 13:03:34 +02:00
Nicolas Martinelli a210d75f55 [FIX] delivery: multiple tracking links
In case `carrier_tracking_url` is `False`, a `TypeError` is raised and
not catched.

opw-2232268

closes odoo/odoo#49083

X-original-commit: a4b5bd7770bca3f2e4327c65de673e2fcc00e7e5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-06 15:25:07 +00:00
svs-odoo 4f1fa7e24c [FIX] delivery: put in pack package domain
Before this commit, on a picking, when we want to put in pack, we can't
select packages created with no package carrier type as they had a
confusion between `package_carrier_type` and `delivery_type` when we
pass the value in the context (value who is reused to the package
domain, making some package unfindable).

closes odoo/odoo#46992

X-original-commit: 21f054731e8635b9e3681e673a7cbf627ad49cca
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-03-05 14:37:09 +00:00
Rémy Voet (ryv) ef863e812b [REM] delivery: remove unused field/method
- The volume field of stock.picking extended in delivery was unused,
-> remove it.
- The commit 2ff3749064, add
the 'check_packages_are_identical', which is never used.
- Remove useless variable 'res' of print_return_label in stock_picking

task-2201168

closes odoo/odoo#46516

Related: odoo/upgrade#866
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-28 09:23:58 +00:00
jerome hanke (jhk) 0c4d808fd7 [FIX] delivery: handle multiple references in delivery email
Steps to reproduce:
- install sales and easypost shipping
- have a delivery order of multiple packages with easypost
- click "send confirmation email"

previous behavior:
the template does not handle multiple package references
and the associated link is wrong

current behavior:
each reference is set in a separated link

opw-2167037

closes odoo/odoo#45507

X-original-commit: 65eaa3e7daf0b547ae2bb98e335fc5941cb200a6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-17 13:39:48 +00:00
Pierre Masereel 5b4c562fc5 [IMP] delivery: compute sale price of move
closes odoo/odoo#33913

Related: odoo/enterprise#4528
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-02-04 14:37:39 +00:00
Pierre Masereel c89993df67 [IMP] delivery: add estimated price on picking 2020-02-04 12:57:52 +00:00
Pierre Masereel d5fd89df5d [IMP] delivery: better handle package shipping weight
If the shipping weight is changed on a package, we want to update the
shipping weight on the picking to be consistent.

We also want to be able to set a shipping weight on a package that has
no carrier packaging, as we'll use the default one set on the carrier.
2020-02-04 12:57:52 +00:00
Nicolas Martinelli 749d4730a2 [FIX] delivery, product, stock: use 'Volume' decimal precision
Use the 'Volume' decimal precision on all `volume` fields.

Complement of commit c1a5221ba2

opw-2185374

closes odoo/odoo#44473

X-original-commit: dc0111d6cdf4032fa840f9ff95f4fa687d33f77c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-03 11:10:24 +00:00
Goffin Simon 632767d83e [FIX] delivery: Delivery Order Adding Freight Cost W/O Markup
Steps to reproduce the bug:

- Let's consider a delivery method DM with fixed price of 10€ and a margin of 20%
- Let's consider a storable product P
- Create a SO for P and get the rate (12€) but don't add it on the SO
- Confirm the SO and process the delivery

Bug:

A SO line was created for the freight cost without the margin. So it was 10€
instead of 12€.

opw:2144894

closes odoo/odoo#43279

X-original-commit: 621dac802ddddc3a4dd58f7370250386e1031598
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-01-14 12:43:14 +00:00
Pierre Masereel 1a7c21328f [FIX] delivery: return label compute field incomplete
Since new ORM in Odoo, the compute methods should always return values.

In the case of return label in delivery, nothing was returned when there
was no carrier on picking.

So we are now setting the field to False when there are no carrier on
picking.

ISSUE-43270

closes odoo/odoo#43452

X-original-commit: 9bf52959a5afad01970f1ef39a64d6b3694abcc8
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-01-17 08:36:08 +00:00
Joseph Caburnay 5a9cb64414 [FIX] delivery: wrong delivery price for real cost policy
When real cost invoice policy is active in a delivery carrier, the
delivery price is set after validating the delivery. When there is
margin, the estimated price is calculated with margin but when the
delivery is validated, the price set in the delivery line does not
include the margin. This commit fixes this behavior by setting the price
of the delivery line with appropriate margin.

closes odoo/odoo#37178

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-20 08:32:44 +00:00
Christophe Simonis 58a83d1222 [MERGE] forward port branch saas-12.4 up to 4a1321bc99
closes odoo/odoo#37127

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-20 14:33:54 +00:00
Christophe Simonis 080f8b1f96 [MERGE] forward port branch saas-12.3 up to d8ce75466e 2019-09-17 17:49:09 +02:00
fw-bot 183e632c0a [FIX] stock, delivery: put compute fields across companies in compute_sudo
Be in multi-company, with shared products, let P be a product in company C.
Suppose there are stock moves or pickings in company C'.
Suppose a non-admin writes on P: it triggers an access error.

Stock moves are not shared across companies in all cases.
So fields that depend on product_id might trigger a recompute on stock.moves
that are in another company, and thus trigger a spurious ACL error while
simply writing product attributes.
Note that _cal_move_weight depends on product_qty, however it is not sufficient
to only put that field in compute_sudo; the product_qty has already been marked
as todo, and so it is recomputed in the initial environment.

opw 2066691

forward port of 7d4d8fa18aecb3b78c8d359434a165c1de71a9b4

closes odoo/odoo#36838

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-13 10:52:47 +00:00
Pierre Masereel dc2e990aec [FIX] delivery: get correct carrier for invoicing policy
The carrier argument passed to the _create_delivery_line function
can be different to the carrier already existing in the sale order
so we should use the correct setting of carrier where we are calling
the function.

closes odoo/odoo#36424

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-12 05:28:49 +00:00
Simon Lejeune 20692736a9 [REF] delivery: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

task-1985992
2019-09-03 15:05:04 +00:00
jbm-odoo c230cfa0fe [ADD] stock_sms: Integration with stock pickings
The user can already send a confirmation email when the
Stock Picking is done. It'd be great to communicate the
same information by SMS.

In addition, the current mailing tool requires a manual
action. The idea is to automate the process via a
Setting instead.

id=1972567

closes odoo/odoo#35662

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-21 10:04:54 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
Adrian Torres 9e71d57d11 [REM] *: remove calls to api.one and adapt code
Adapt all code that was using `api.one` to recordset-style method and
remove any and all calls to `api.one` in preparation for its removal.
2019-07-05 09:04:45 +00:00
Mitali Patel 9d710df076 [REF] *: use the new decimal precision syntax
Since previous commit moved decimal_precision module's feature into base,
use the new syntax for fields declaration
Remove the imports to the removed module
Remove the module from dependency in manifest

sed -i "s|digits=dp.get_precision('\([A-Z a-z]*\)')|digits='\1'|" **.py
sed -i "/from odoo.tools import decimal_precision as dp/d" **py
2019-07-03 11:16:24 +00:00
Christophe Simonis 60e71302a3 [MERGE] forward port branch saas-12.2 up to 243a4ae5cb 2019-05-13 11:02:27 +02:00
Christophe Simonis 243a4ae5cb [MERGE] forward port branch saas-12.1 up to 330b99f60c 2019-05-10 15:20:01 +02:00
Christophe Simonis cc3a2c1bf3 [MERGE] forward port branch 12.0 up to e11bacfe51 2019-05-09 21:07:44 +02:00
Christophe Simonis f1d6a6108e [MERGE] forward port branch saas-11.3 up to 825fee2626 2019-05-09 11:12:22 +02:00
Christophe Simonis 825fee2626 [MERGE] forward port branch 11.0 up to d01db48087 2019-05-08 18:29:32 +02:00
Hiral Bhavsar 3cd7ed07a2 [IMP] *: remove 'view_type' on window actions.
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.

Task 1937686

closes odoo/odoo#31243

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-17 11:34:17 +00:00
Pierre Masereel 0f532c3dbf [FIX] delivery: picking weight computation
The depends value on picking weight and package_ids of picking are only
set on the move_line_ids, which lead to compute the value of the picking
weight only when move lines are created or deleted and not when a
package is set on a line, quantity done changed and/or unit of measure
changed.

To fix this issue, we've changed the depends, of thos computed fields.

closes odoo/odoo#33114

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-02 13:07:33 +00:00
Christophe Simonis 8dd5a85267 [MERGE] forward port branch saas-12.3 up to 60e71302a3 2019-05-13 15:26:12 +02:00
Yannick Tivisse a5b6f31cf2 [IMP] base: Contextualize the multi company
Purpose
=======

Allow the user to select the allowed companies for which he wants to see records
on top of selecting his current company.

It is confusing for users to see the records from the company he is connected to
and the records of the children companies.

Instead of using the hierarchy of companies to access records across companies,
the user can now select (from his set of allowed companies) the companies for
which he wants to access records.

/!\ This means that the user will interact with records from company A when in
company B.
Example: a SO has been created and confirmed in A. When in B, I create the
invoice from it.

Specifications
==============

1/ Deprecate the parent/children hierarchy on the res.company model. The fields are
kept on the res.company model to ensure the retro-compatibility, but won't be used
accross the standard code anymore. The only functional usage for this mechanism
was to allow to see records from several companies by creating a virtual parent
company, which will be possible with the new mechanism.

2/ By default, a user will only see the records of the company he is connected
to (or records without a company). (It is still editable by the user if needed).
For that, put this information in the user context, to allow having different
configurations on different browser tabs. Instead of having domains like
['|',
('company_id', '=', False),
('company_id', 'child_of', user.company_id.id)]
you'll have something like
['|',
('company_id', '=', False),
('company_id', 'in', company_ids)]
Note that the 'company_ids' is a value that is passed in the evaluation
context on the record rule, as we already have user, or time.
company_ids is a list of the ids of all the enabled companies in the
user's context.

3/ Out of the generic improvements brought by this task, this will illustrate
issues that could exist since several versions. For example, it should not be
possible to create a scrap order for the company A with a package of the company
B, or it should not be possible to create an invoice on the company A with
payment terms from the company B. Before the version 12.0, it was easy to
encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side
effect of the fact that the SUPERUSER_ID has become an inactive user was to
make it more difficult to introduce mismatch on the records, but haven't solved
the issue, as it was still possible to do it with parent companies
configuration. Some of these issues have been fixed in this commit, but all the
business flows should be re-tested to check if an ir.rule should be introduced
(eg: a multi company rule for stock.quand.package), if the company of a record
is correctly transfered to another record created from the first record (eg:
From a SO, create an invoice and a payment, the company of the sales order
should be transfered on the invoice and the payment, even if the company of the
sales order is A and I'm logged into the company B with the company A enabled.

4/ Currently, if I click on a button on a notification email (example 'View
Task'), I face a traceback if I'm not logged into the company of the record.
Now, if you click on a button and if you have access to the record, the correct
company will be automatically set.

5/ If I display a kanban view with several records from several companies (and
an image), all the images should be displayed.

6/ Currently if you copy paste an url, this will crash if you're not in the
correct company. This won't be fixed because it's quite impossible to do it in
a clean way. This task brings a workaround. Copy/Paste -> Traceback -> Log into
the correct company, re-copy/paste -> Ok.

7/ 2 property methods have been added on the environment to retrieve the company
on which the user is logged in and the companies the user enabled, on a specific
tab.
That way, when creating a record, instead of doing
default=lambda self: self.env.user.company_id
do
default=lambda self: self.env.company_id
On the other hand, to retrieve the enabled companies, do
companies = self.env.company_ids

8/ Modify the Company Switcher widget to allow to log into another company
WITHOUT writing on the res.users (and thus bringing cache invalidation issues
and so on). Also allow to enable several companies and see records from several
companies, and independantly of the other browser's tabs.

9/ When focusing on a tab, save the current company configuration on the local
storage. That way, when doing 'CTRL+T' or a middle click, the context is
propagated to the new tab.

10/ Improve the error message in case of multi company access errors. Now, when
the user is in debug mode, display the related names of the records and the name
of the user who brings the issue.

11/ Remove the context erasing when writing on a res.users
This is probably coming from the migration to new API of the base module.
The context was not propagated at this moment, which was a common mistake at
that time. When migrating the module, probably by using the 'black box' method,
as the context was not propagated, it was erased on the new version. This is
now an issue because the context (i.e. the enabled companies) was erased when
writing on a res.users, leading to tracebacks.
See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624

12/ Fix the crash manager on redirect warnings. The issue is the following
- Create an invoice on a company without a configured CoA.
- Set a partner
- On the onchange_partner_id, a redirect warning is raised to propose you
to configure a CoA
- Click on 'Go to the configuration panel'
- A generic warning says something like 'Do you want to discard your changes?'
- Click on yes, the page refreshes, but not on the redirect action.
Now, set correctly the action on the hash, and reload instead. The breadcrumb is
lost for example, but you reach the correct action at least.

13/ Introduce a res.group to enable/disable the multi company per tab
feature.

14/ To help the users to know which tab is in which company, add the
possibility to have a favicon per company. When creating a company,
the classical 'O' icon is colored by default in a random color.

15/ Remove the company switcher on the frontend. This was mainly there
to allow a user to swicth to the company linked to the website.
This behavior is now transparent to the user. If the website A is
activated, then the company set on the context is the company of the
website.

16/ Deprecated the _company_default_get method on the res.company
model. Remove the method _get_company on the res.users model.

17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval
context. You can now use those variables on domains in the views to
access directly to the activated company.ies on the current tab.

TaskID: 1960971

closes odoo/odoo#32341

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-05-13 08:57:49 +00:00
Christophe Simonis c0cf4049b2 Revert "[FIX] delivery: picking weight not updated sometime"
This commit is not needed (and not wanted) in saas~12.1 due to
07bef887af that convert field
`move_ids_without_package` to a computed field with an invert method.

The invert method writes on `move_lines`, which will recompute the value
of `weight` field correctly.

This reverts commit b2b395467f.
2019-03-29 19:02:51 +01:00
Christophe Simonis 2a06f4dcf3 [MERGE] forward port branch 12.0 up to 09fb2469b4 2019-03-29 18:10:57 +01:00
Nicolas Lempereur b2b395467f [FIX] delivery: picking weight not updated sometime
The delivery lines (move_lines) have two way to be displayed in a view:

- with move_lines (all move line of a stock.picking)
- with move_ids_without_package (same but removing packages)

But so if we write directly on move_ids_without_package we would not
trigger the stock.picking @api.depends('move_lines') _cal_weight method
thus the picking weight was not updated in some instances.

With this changeset, we adds the move_ids_without_package as depends so
on move_ids_without_package onchange the total weight should be set to
the correct weight or 0 (if move_lines is not in the view) and on write
the correct weight should be computed.

opw-1959523
closes #32157

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-27 11:43:51 +00:00
Pierre Masereel 47ee1666bb [IMP] delivery: only add lines on SO when rate_and_ship 2019-04-01 09:23:03 +00:00
Pierre Masereel 1882cd18e9 [IMP] delviery: remove useless field 2019-04-01 09:23:03 +00:00
Pierre Masereel 1f68cb87f0 fixup! [IMP] delivery: manage return label for all carrier
closes odoo/odoo#31347

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-03-15 09:10:44 +00:00
Pierre Masereel 11ece72e24 [IMP] delivery: manage return label for all carrier
Until now, only fedex was providing return label printing, and as we
want to integrate it with other carriers, we have mande a generc
mecanism to easily implement it with new ones.

We've also added an option that allow to print return label from portal
if one has been generated on delivery.
2019-03-15 09:10:44 +00:00
Arnaud Baes 1d388450e5 [FIX] delivery: Package creation and default shipping weight in 'put in_pack`
The package creation was done even before the call of the 'choose.delivery.package' wizard, so the 'Discard' button of the wizard was useless.
This commit fix this behaviour by creating the package only when the "put_in_pack" action is called from the wizard.
The default weight is thus no more based on the default package but on the picking related to the package.
The method 'manage_package', 'default_stock_quant_package_id', 'self._default_delivery_packaging_id' were removed since they are no more relevant.
The method 'check_destinations' was refactored to '_pre_put_in_pack_hook' to avoid confusion related to its misleading name

TaskID: 1924875

closes odoo/odoo#30324

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-05 09:04:55 +00:00
Pierre Masereel 4a857060e1 [IMP] delivery: print return label
We want to allow to print return labels on picking that contains retrun
moves and having a carrier that support return labels.

closes odoo/odoo#30886
2019-02-12 09:29:51 +00:00
William Henrotin 8938afa3f6 [IMP] delivery: invoicing policy of delivery price
The delivery carriers get a new field to specify the invoicing
policy. The two cases are :
  - Estimated cost: the delivery price is charged directly on
the sale order based on the estimated fee
  - Real cost: the delivery price is estimated from the sale order
but not added in the delivery line (we get a line with quantity=1 and price = 0).
Once the delivery is validated, the delivery price is recomputed.
The new price depends on the integration level. If it's 'rate', the price is
the estimated one (carrier.rate_shipment()). If it's 'rate_and_ship, the price
is the one given by the carrier at the delivery

The bases carriers (fixed_on_rule and base) always use 'Estimated Cost'
as their price should not be changed between the sale order creation
and delivery validation

Task : 1908654
2019-02-11 13:55:55 +00:00
Christophe Simonis 3cbc9dd6c0 [MERGE] forward port branch 12.0 up to 6a0675d36d 2019-01-14 10:34:50 +01:00