Commit Graph
354 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
Arthur Gossuin (goa) 7fc9234316 [IMP] delivery: add product_template.country_of_origin field
The origin of goods is required for the commercial invoice generation with
delivery providers. Until then we were using the warehouse country, but the
origin of goods is a different kind of field, as explained in this link:
[https://ec.europa.eu/taxation_customs/customs-4/international-affairs/origin-goods_en]( https://ec.europa.eu/taxation_customs/customs-4/international-affairs/origin-goods_en)

This commit is part of more important upcoming changes brought in Odoo
enterprise, especially with Fedex, Easypost, DHL and UPS commercial
invoices.

task-2701428

closes odoo/odoo#80900

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-14 13:28:53 +00:00
Florian Damhaut 73590380ca [FIX] delivery : translate 'Free Shipping'
Problem : Free Shipping is not translated in delivery
New Behaviour : Free shipping will now be translated

opw-2679727

closes odoo/odoo#79557

X-original-commit: 511bede06788ffb94308dc36d33abadc466a3168
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-11-09 14:46:25 +00:00
Touati Djamel (otd) 61e22065c4 [FIX] delivery: allow validating a SO with several "stock.move"
Steps to reproduce the bug:
- install delivery and sale_management
- Create a product with route "Buy + MTO" and a product with route "Buy"
- Create a SO with both products
- Confirm the SO

Problem:
A traceback is triggered, because in this case, we have two `stock.move`, so two` stock.rule`
therefore, when accessing the `propagate_carrier` field an error will be thrown

opw-2681427

closes odoo/odoo#79539

X-original-commit: 431fc082470df36bc2968f4e51423b41c0c08945
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-09 10:11:14 +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
Florian Damhaut 14f2086ea7 [FIX] delivery : removed service from rule-based delivery quantity
Current behaviour :
Product of type service are accounted for when computing the quantity, weight and volume metrics used in the price computation of rule based delivery.

Planned behaviour :
Service-typed product should be excluded from such computations.

opw-2647067

closes odoo/odoo#78402

X-original-commit: 2993c82db51e16787de72cbb67f04d5ae1928b68
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-15 11:31:49 +00:00
Florent de Labarre 8bf547be1d [FIX] delivery: delivery is not invalidate
- Install delivery and active 'Addresses in Sales Orders' options
- Create a delivery allowed only in France
- Create a partner with two delivery address, one in France, an other in Belgium
- Create SO, select the delivery address in France
- Select the carrier
--> Change the delivery address in Belgium in the partner_shipping_id field,
recompute_delivery_price stay False.

This PR fix this issue, now the delivery is invalidate if you update the field
partner_shipping_id.

closes odoo/odoo#75762

X-original-commit: b53ff03b5cf43c2cd23039b8192f4d90d47e11d2
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-03 14:30:22 +00:00
William Henrotin bf9944c100 [IMP] stock,delivery: quick access to operations
This commit add a quick access to all the move lines of a picking
type (only transfers picking type) ready to be processed from the
Inventory dashboard

Task : 2411102

Part-of: odoo/odoo#63291
2021-09-02 14:14:09 +00:00
Andrea Grazioso (agr-odoo) 334fb8533f [FIX] delivery,sale_mrp,stock: correct delivery slip kit cost valuation
- Create a product with a kit BOM and weight
- kit components should have list price and weight as well
- Create SO with kit product
- Add shipping (fedex int. or bpost will do)
- Delivery product

A custom's form is generated but the value of the product it is not
correct as it take the valuation of the kit in the sale order
for every component of the kit, resulting in higher customs taxes for
the final customer

opw-2628309

closes odoo/odoo#75658

X-original-commit: e13f048a78b41d81602e868a3b0c7ded24ce992b
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-09-02 12:57:47 +00:00
Florent de Labarre 99f6bf96ea [FIX] delivery: is_all_service is False if you have a section line
If you create an sale order with a section line you see the button add delivery.

closes odoo/odoo#75570

X-original-commit: 1db92688d9e7bf0843edfd248ffef89c38bb66f0
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-31 08:47:10 +00:00
Víctor Martínez 045ed49d15 [IMP] delivery: Hook allowing to retrieve dict to be used in _get_price_from_picking() function.
Hook to be overridden when we need to add some field to product and use it in variable factor from price rules.

closes odoo/odoo#74561

X-original-commit: 6ec768d084da6bd7344c45750a2a5037ec366143
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-08-02 12:09:43 +00:00
Wolfgang Taferner 2cb678d4a1 [FIX] delivery: only update not yet processed pickings based on the n…
…ew carrier

closes odoo/odoo#74419

X-original-commit: 3dce2fdea0060b1bc13bb35610b7fe01c71ef054
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Wolfgang Taferner <wtaferner@users.noreply.github.com>
2021-07-29 10:48:22 +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
Victor Feyens 2d43dc2afd [IMP] account,*: clean map_tax definition
product and partner parameters are leftovers of an older definition of
map_tax, and can now be safely removed.
2021-06-17 12:14:36 +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
Oussama MESSAOUDI ae7e1f64f8 [ADD] website_sale_gift_card, gift_card: manage Gift Card in ecommerce
Add suport of gift card for ecommerce.
Split the generic part to allow others modules to us it (e.g. pos)

A customer buy 1 Gift Card, he receive a code by mail and see it into the
sale order.
Another customer can now use this code in the payment step to deduce this
amount.

Product Gift card is sold by default without tax, because we don't know on wich
ecommerce, the shipping address ans sot the tax that will be used.
So the tax is deduce from the sale order that use the gift card.
We considere to be in the MPV case from:
     https://www.vandelanotte.be/fr/actuel/actualites/624-les-bons-soumis-a-un-nouveau-regime-de-tva-a-partir-de-2019

Courtesy of @bvr-odoo for the email and product image

Co-Reviewed by @rde-odoo and @jke-be

task-2428004
pr-64195

closes odoo/odoo#64195

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-10 16:24:36 +00:00
david 9e7c19d3d8 [FIX] delivery: avoid retrospective computation
If we're to change the invoice policy of a product we'd provoke a
chained computation of every sale line and sale order containing such
product. This change goes along with the policy of applying such changes
only to future orders, as stated here: https://github.com/odoo/odoo/pull/61135

closes odoo/odoo#64641

X-original-commit: 806da3d67a5cf9919c6c0f5042b3e00c69825faa
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-15 17:50:01 +00:00
Florent de Labarre bed9b811dd [FIX] delivery : return value for unlink
Was not returning the result of super call (most likely "True")

closes odoo/odoo#62917

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-12-10 14:42:21 +00:00
Adrien Widart 4ad547aeca [FIX] delivery: shipping cost free if above amount
A based on rules shipping method with the "Free if order amount is above" field enabled is not correctly applied.

To reproduce the error:
(Need website_sale)
1. Go to Settings > Website
2. Enable "Shipping Costs"
3. Go to Website > Configuration > eCommerce > Shipping Methods
4. Create a new one
	- Select "Based on Rules"
	- Enable "Free if order amount is above"
	- Set the corresponding amount
	- In pricing, add a line
5. Save & Publish (Click on "Unpublished")
6. Go to website's shop
7. Add the product set in the shipping method to your cart
	- Select an amount sufficient to exceed the threshold amount set in step 4
8. Process Checkout

=> The shipping method is shown, but the associated amount is "No price rule matching this order[...]"

The shipping method price should be 0.

(This error also happens when creating a SO)

OPW-2383258

closes odoo/odoo#62290

X-original-commit: 393b7ad7b7dff1cbf830374c76ef0a681a71be6a
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-11-25 08:06:09 +00:00
Pedro M. Baeza f79af04c98 [FIX] delivery: Fallback to commercial partner's delivery method
Fine-tune of #59524.

If the delivery address doesn't have any delivery method assigned, you get an
undesired change of behavior: no delivery method is populated in that cases.

Note that the delivery method is not a commercial field that is propagated from
parent to children.

With this patch, we get a very similar behavior, which is fallbacking to the
commercial partner's delivery method if there's no delivery method in the delivery
address.

The only different behavior will be if the order partner is different from the
commercial partner of the delivery address.

closes odoo/odoo#60881

X-original-commit: 682b2e6c214b73f67e849df927bd4bda0af31d5a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-28 10:10:11 +00:00
IEL 6aa8e7b51d [FIX] delivery: choose delivery method by partner_shipping_id
Steps:

* Create a delivery method (1) restricted to Spain (any country would do)
* Create a delivery method (2) restricted to Madagascar (same)
* Create a partner, main company, whose country is Spain and the default
delivery method is the first one.
* Create a delivery address for that customer with Madagascar as country and the
default delivery method as the second one.
* Now place a new quotation with such partner and set the delivery address to
the one of Madagascar (multiple addresses setting must be on).

Before:

* The delivery method for the quotation is set to the one restricted to Spain
although we're sending it to Madagascar.

After:

* The delivery method for the quotation is set to the one restricted to
Madagascar.

---

opw-2348336

closes odoo/odoo#59890

X-original-commit: 535d429960a0347d01c528c2440c2b8e9ff2fb51
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-13 15:11:47 +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
Robin Heinz c6d5948c75 [FIX] Delivery: Endless decimal display on list price
When creating a new delivery method with a provider based on rules, if the base list_base_price was equal to x.8, that ended to a float with endless decimal. (eg: 2.8000000000003)
This fix modify the display to show a rounded value.

closes odoo/odoo#54177

Task-id: 2272472
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-22 12:47:37 +00:00
Tiffany Chang (tic) a60527bde7 [IMP] delivery, mrp, stock: group delivery slips by kit
This commit extends the delivery slip so that products added as a kit
component to a stock.picking are grouped together by kit (or non-kit)
when at least 1 kit exists. Kit grouping occurs for products from a kit
without a package assigned. Non-kit section appears only when no
packages are assigned.

Implementation notes:
- Sub-kits (i.e. kits within kits) of kits are purposely not included
- Duplicate product names with different BOMs will be merged into one
  since there is no straightforward way to distinguish them within
  current db structure
- There are some cases where this doesn't work as expected and may lead
  to components being grouped together under the same kit even if they
  are from different kits (e.g. kit1 has bolts and so does kit2 => on
  slip bolts will only show under kit1 section). Two cases where this
  happens is when kits are added before 'Operation Type' is specified
  and 'Operation Type = Manufacturing'

This completes subsection 1 of overall Improve delivery slip task.

Task: 2039720
2020-07-03 11:54:08 +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
Tiffany Chang (tic) 0accbd6e69 [IMP] stock, delivery: aggregate delivery slip product lines
This commit makes it so move_lines with the same product+description+uom
are grouped together ONLY WHEN serial numbers/lots are not to be
printed. This is the case when the setting "Display Lots & Serial
Numbers on Delivery Slips" is not active or when there are no
lots/serial numbers assigned in the picking. This is only applicable for
stock.pickings that are 'state=Done'.

In order to implement this, some clean up of lots/serial numbers printing
was also done.

This completes subsection 2 of overall Improve Delivery Slip task.
Task: 2008609
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
Martin Trigaux ba244cef01 [IMP] *: replace to new _() syntax
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))

Old syntax is still compatible but starts the migration to the new
syntax that catches error.
2020-06-18 13:03:34 +02:00
Julien Castiaux ab4000fb3c [REF] base: Remove deprecated exceptions and osv
TL;DR: remember `osv` and `except_orm` ? You can forget about them.

* Deprecated `except_orm` dropped.
* `UserError` elevated as super type of all user-related
  errors.
* Unused `DeferredException` dropped.
* Unused `QWebException` dropped (real one is in `qweb.py`).
* `MailDeliveryException` made a python exception.
* `name` legacy exception attribute made an alias of the python standard
  `args[0]` attribute and deprecated.
* `value` legacy exception attribute dropped.
* `exception_type` RPC error response key dropped.
* Deprecated `osv` module dropped.
* `--osv-memory-age-limit` cli option made an alias of
  `--transient-age-limit` and deprecated.

The `odoo.exceptions.Warning` have long been a deprecated alias to
`UserError`. It is going to be removed in a future version but first we
explicitly deprecate it with a warning.

The `odoo.exceptions.DeferredException` was a very old internal
exception, it has been removed without deprecation notice as it is never
raised.

The `odoo.exceptions.except_orm` has been a deprecated exception type
with deprecation warning for 5 years, it has been removed in favor of
UserError which becomes the super class of all user-related errors.

The `odoo.base.models.ir_mail_server.MailDeliveryException` was
inheriting `except_orm`. As it is not related to a user error but is
more of a problem an admin much take care of, the exception has been
made a Python error.

The `exception_type` JSON key in RPC error responses was holding an
hardcoded value derived from the exception type. Its usage has been
dropped in favor of the `name` JSON key that holds the precise exception
name. Again as it was hardly used in the source code (beside the crash
manager) it has been dropped without deprecation warning.

Since we are here trying to clean odoo custom exceptions, we are also
deprecating the `name` exception attribute in favor of the more standard
`args[0]` attribute.

The `name` (along with `value`) were two attributes used to raise
`except_orm` exceptions before the introduction of `UserError`,
`AccessError` and related exceptions. The `name` attribute, at the time,
was holding the exception type/title. Nowadays it contains the error
message. The `value` attribute, at the time, was holding the error
message. Nowadays it is no more used.

The `osv` module contains very old deprecated aliases. There is no
simple way to log a deprecation warning for osv, osv_memory and
osv_abstract but as they have not been in use for ages, they have been
removed too. To be consistent, the `--osv-memory-age-limit` cli option
has been made a deprecated alias to the `--transient-age-limit`.

closes odoo/odoo#45723

Task: 2187728
Related: odoo/enterprise#9162
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-04-08 08:41:17 +00: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
Adrian Torres 1daf8eb127 [FIX] *: set ondelete policy of required Selection fields
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.

This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.

closes odoo/odoo#46325

Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-30 13:42:04 +00:00
Victor Feyens 4d1009a275 [FIX] delivery: support multi for delivery_state compute
closes odoo/odoo#47017

X-original-commit: f778cd19be73fb4e6a1ed0d1b9194607578ab1d5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-03-06 10:21:56 +00:00
Victor Feyens 623d6a066b [FIX] delivery, sale: improve invoice_status performance.
* Avoid reading all lines invoice_status when the SO isn't confirmed.
* Do not use _default_product_id to discern down_payment lines, use is_downpayment instead
	(one ref = one query less by compute call)
* Do not consider display_type lines for SO invoice_status.

X-original-commit: 76a6d0475872f9ffa21cb917f13bc553c720eafd
2020-03-06 10:21:56 +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
Pierre Masereel b10841acbe [FIX] delivery: access rights when computing price rules
When a picking is validated with the delivery prices based on rules, you
can face an error, if you are not inventory manager or sales manager.

First, because you don't have access rights to see the sales orders used
to compute the price.

And then you don't don't have access rights on the delivery.price.rule
object to apply the formulas.

As the computation of the price of a delivery should not depends on
access rights other than the ones that let the user validate the
picking, as 'sudo' is called.

OPW-2209148

closes odoo/odoo#46947

X-original-commit: b68139bf2fec8fd2a79e1a578d126f260891c4f6
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-03-05 09:57:32 +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
Victor Feyens e5f1ba0e42 [FIX] delivery: ensure properties are read with the correct company 2020-02-27 12:19:24 +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
Jared Kipe 6d90d20ee9 [FIX] delivery: always assign the value
In order to prevent `CacheMiss` errors.

Closes #45242

closes odoo/odoo#45550

X-original-commit: 6b5c5124c34245ca93716131c6496d1d4dea72a2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-17 17:02:36 +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 2c079fcd10 [IMP] product,delivery: improve unit of measure display 2020-02-04 12:57:52 +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
yhu-odoo 2de4417ccd [FIX] delivery: field name 'length' is reserved in JS
length is a reserved attribute in JavaScript, and may cause problems
when returning the object to the JS framework.
This commit is to rename the field.

PR
Task 2152050

closes odoo/odoo#43222

Related: odoo/enterprise#7686
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-09 12:53:41 +00:00