Commit Graph
2232 Commits
Author SHA1 Message Date
Victor Feyens 4e2d7b800d [CLN] sale: rename _get_invoice_status
follow code guidelines and use _compute_invoice_status instead.

Part-of: odoo/odoo#98068
2022-09-01 19:16:48 +02:00
Denis Ledoux 0501bbd62e [IMP] base: uniform "groups" in back-end view
This revision is to make uniform the behavior of the `groups` attribute
on the Python model fields
and on the node in the view architecture.
In both cases, remove the node from the view completely.

Before this revision,

in a back-end view:
 - In the Python model, if a field has the `groups` attribute set
   and the user is not part of
   the groups, the field is removed, completely, from the view.
 - In the view architecture, if a node has the `groups` attribute set
   and the user is not part of
   the groups, the node is made invisible (not completely removed, just
   made invisible).

in a front-end view:
 - if a node has a "groups" or "t-groups" set and the user
   is not part of the groups, the node is removed from the view.

So it's 2/3 cases removing nodes restricted to a group.
and 1/3 case making invisible nodes restricted to a group.
It's simpler to have a uniform behavior for the 3 cases,
simpler to understandard for developers.

In addition, this will help for the goal to cache back-end views.
It makes possible to convert views using the `groups_id` field
by moving the content of these views directly
in the view to which they add content which is suppose to be completely
removed when the user has not the according group.
By getting rid of the `groups_id` many2many field on `ir.ui.view`,
it makes possible to cache the view architecture without
requiring to use the groups in the cache key.
Currently, if we want to cache the view architecture,
it would be required to use the intersection of the user
groups with the `groups_id` groups of the view,
making it costly to compute the cache key,
therefore altering the performance point to cache the view
architectures.

closes odoo/odoo#95729

Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-08-19 19:10:39 +02:00
Julien Van Roy 5cb18d286e [FIX] delivery: avoid invisible product_uom_id
Since commit 5ccc32fcf7, it's no longer
possible to write on invisible fields.

Make sure the field product_uom_id is visible to avoid a traceback.

closes odoo/odoo#97313

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-02 18:43:50 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
momegahed c004067287 [FIX] delivery: tax calculations are wrong on delivery products
Steps to reproduce:

1- install sale, accounting
2- create a fiscal position fp that maps
tax inc t1 to any other tax t2
3- create a delivery product dp with t1 and mark it "can be sold"
4- create a new delivery method with dp
5- in a new sales order, choose fp, click on add delivery
6- the unit_price is wrong, it hasn't mapped t1 to t2
7- try adding the delivery as a product in a new sales order line
8- the unit_price is correct and the taxes are correctly calculated

Bug:

 `_create_delivery_line` is not using the same logic used
 when normally adding a sales order line although technically
 delivery product is still a product

Fix:

use `_get_tax_included_unit_price` to get the correct unit_price

OPW-2806965

closes odoo/odoo#96874

X-original-commit: 03bb18d12606447faaed0de04bb83dde5de53b96
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2022-08-01 10:55:34 +02:00
Miquel Raïch 02c541a73b [FIX] delivery: assure stock user can validate pickings
Steps to reproduce:

- Delivery module is installed.
- User_1 is stock_manager and sale_manager.
- User_1 creates sale_order with set carrier_id and confirms it
  (Automatically is created a picking P).
- User_2 is stock user/manager but in sale is "Own documents only".
- User_2 open picking P and validates it.
  => Error: cannot validate due to access rules.

closes odoo/odoo#94684

X-original-commit: 465bb47b89e34609b34a647a5a4ba4db8a0ffc8a
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-07-11 23:43:41 +02:00
aliya 26b2472f49 [IMP] account: refactor account types
Task: 2856281

- Remove user_type_id, account.account.type model, internal_type
- Add account_type that is a simple selection field
- Move internal_group and include_initial_balance to account.account
- Because of these changes, type_control_ids on account.journal is also removed

closes odoo/odoo#93212

Related: odoo/documentation#2223
Related: odoo/upgrade#3595
Related: odoo/enterprise#28205
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-07-08 19:52:15 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Raphael ColletandVincent Schippefilt eb67feb590 [FIX] *: cache consistency
In module mail, invalidating 'message_ids' on a mail thread also
invalidates its inverse field 'res_id' on messages.  If you haven't
flushed it before, your cache will be inconsistent, as shown by the test
/mail:TestMailgateway.test_message_process_bounce_records_channel.

In module purchase_stock, add depends on report.stock.quantity.  This
ensures that when the model is queried after changes in other models,
the data on which the SQL view depends is flushed to the database before
querying that model's table.

closes odoo/odoo#66938

Related: odoo/enterprise#16722
Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2022-07-05 11:35:01 +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
Victor Feyens 775c113382 [IMP] delivery,sale_*: sale portal template cleanup
* Use div name/id instead of dummy classes for xpath references
* Use clear variable name (picking instead of i in the t-foreach)
* Use t-elif/t-else when useful to reduce python evaluations of
exclusive boolean values
* clean xml indentation

closes odoo/odoo#94704

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-28 11:41:12 +02:00
Victor Feyens d6c887f791 [FIX] delivery: settings user doesn't have access to delivery carrier
Since #87636, delivery carrier model is referenced in the settings when
website_sale_picking is installed.

Because of that, users with only settings access are not able to
open the settings anymore.

This commit adds read rights on delivery carriers so that base settings
users are able to update settings.

Part-of: odoo/odoo#91909
2022-06-23 23:48:30 +02:00
Ahmed Khalaf (ahkh) 0a6f0bb760 [FIX] delivery: commodity product country code
Commodity now uses product county of origin code instead of
country of origin field directly since its a res.country model
and breaks the request if set on a product

closes odoo/odoo#93195

X-original-commit: 980d103050fee552a9f68421cf119c119397bbe2
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-06-17 14:14:06 +02:00
Ahmed Khalaf(ahkh) 42714e2202 [IMP] delivery,stock: added pack type weight
Base Weight field added to Package type to be added to shipping weight

Task: 2764771
Part-of: odoo/odoo#91640
2022-06-03 12:02:05 +02:00
Raphael Collet 6cf8db906f [REF] *: adapt code to new flush API
closes odoo/odoo#87527

Related: odoo/upgrade#3497
Related: odoo/enterprise#26939
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-25 18:00:47 +02:00
Yolann Sabaux f9d6bda792 [FIX] delivery: wrong invoice status for partially delivered orders
Steps to reproduce:
- Select any two storable product that has invoicing policy set on 'Delivery'
- Create a sales order lines with these two products and make sure that one of the lines should have a quantity set to 0
- Add shipping

Issue:
- The Invoice Status has changed to 'To Invoice'

Solution:
Add en extra filter to consider only lines that have not been invoiced.

opw-2750861

closes odoo/odoo#89548

X-original-commit: bfeb5f6317786edfd0fa464fe5798c7f7bc65ac9
Signed-off-by: yosa-odoo <yosa@odoo.com>
2022-04-25 18:15:06 +02:00
Martin Trigaux 158b537c28 [I18N] *: export saas-15.2 source terms
closes odoo/odoo#89225

X-original-commit: 5925a83d87fa4702f4c0f22346304dc2da47c728
Related: odoo/enterprise#26435
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-04-23 08:33:43 +02:00
anhe-odoo c225996bb0 [FIX] delivery: remove wrong currency conversion for delivery carrier price
Observed Behaviour

When using a pricelist with a fixed price for all products with a different
currency than the one of the company, adding shipping cost in a sale order
using this pricelist will give a wrong value of the shipping cost

Expect Behaviour

The computed shipping cost added in the sale order should be the same as the
fixed price defined in the pricelist

Reproducibility

This issue can be reproduced using the following steps :
1. Define a pricelist PL1 with a fixed price for all products and a different
currency than the one used in the company (eg fixed price to 15KR)
2. Create a sale order and select PL1 as pricelist
3. Add a product and add a shipping cost

The shipping cost should be the defined fixed price (15KR) but it gives
another value, depending of the company currency

Fix Description

This fix remove a useless currency conversion coming from the fact that since
https://github.com/odoo/odoo/pull/86484 we get the delivery price from the SO
priceliste (using  pricelist.get_product_price) giving us a price that  is
already converted to the correct currency

Related issue/PR

opw-2810506

closes odoo/odoo#88861

X-original-commit: 25e2f403e88172d67ea6ce382ac1e3f5e0e37835
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2022-04-15 11:31:59 +02:00
Goffin Simon a110ddc509 [FIX] delivery: Terms not translated in the partner lang
Missing translation

opw:2782254

closes odoo/odoo#87891

X-original-commit: 863537b927d3fa502385e03c58741efccd9e2545
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Simon Goffin <sig@odoo.com>
2022-04-14 12:01:47 +02:00
anhe-odoo bc27fffb27 [FIX] delivery: use pricelist to compute shipping cost
Expected Behaviour

When adding a shipping cost in a SO, with the shipping method being
associated to a product, the price should be calculated according to
the price of the product in the order's pricelist if available

Observed Behaviour

When adding a shipping cost related to a product, with a fixed price,
the public price of the product is used instead of the price defined
in the SO pricelist

Reproducibility

1. Create a product "Test Shipping" with a public price of 10
2. Create a shipping method "Test Shipping" associated with the
"Test Shipping" product
3. Create a pricelist "Test Pricelist", where the product "Test
Product" has a cost of 15
4. Create a contact "Test Contact" associated with "Test Pricelist"
5. Create a So for the "Test Contact" with "Test Shipping" as shipping
method -> Shipping cost will be 10 instead of 15.

Fix Description

The issue here was that the price computed by the delivery carrier didn't
took into account the selected pricelist. We tried to then change it in
the delivery chooser wizard, but some issue with particular case (i.e.
when the shipping cost should be 0 if the SO total is bigger than X)
appeared, leading us to add the fix directly in the delivery_carrier
classe.

Related Issues/PR

- opw-2754482

closes odoo/odoo#87028

X-original-commit: bb778cd7be835706f54e9e0f342eecf3e5e4e904
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2022-03-23 07:06:06 +01:00
boan-odoo 33114b9007 [IMP] stock: resize prod. form view fields
Some fields in the inventory tab of the product
form view had their input widget needlessly stretched
to the maximum available size.

closes odoo/odoo#84056

Task: 2654703-9
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-03-21 11:12:00 +01:00
boan-odoo 800501e679 [IMP] delivery: group product moves by carrier
In the "Reporting -> Product Moves" view,
allow grouping of products by carrier names.

Task: 2654703-2-2
Part-of: odoo/odoo#84056
2022-03-21 11:11:59 +01:00
Goffin Simon acc9313d2e [FIX] delivery: Do not show HS code when state != done
Steps to reproduce:

- Let's consider a storable product P with HS code
- Create a SO with P and confirm it
- Print the delivery slip

Bug:

The header HS CODE was displayed even if the column doesn't exist in the table

opw:2744000

closes odoo/odoo#83834

X-original-commit: 7f8a6b0accea9ef0d95e4cd613aa7cabdff936d6
Signed-off-by: Simon Goffin <sig@odoo.com>
2022-03-16 11:17:15 +01:00
Wolfgang TafernerandAndreas Perhab 2060efdcad [IMP] delivery: ease to inherit delivery currency computation
closes odoo/odoo#85946

X-original-commit: f4f833bb74ef0a73376d0e86e7350041b9074f36
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
Co-authored-by: Andreas Perhab <andreas.perhab@wt-io-it.at>
2022-03-08 07:00:48 +00:00
Martin Trigaux 9fbf706ba8 [I18N] *: export saas-15.2 translations
closes odoo/odoo#84475

X-original-commit: 8ea2605fbfec6277d7a01b6e73548a9585866c61
Related: odoo/enterprise#24289
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-02-14 10:44:50 +00:00
pedrambiria 55e98db012 [FIX] delivery: send the expected carrier name to Amazon
A modification made by Amazon on October 1st restricts the allowed
values for the carrier name. Since it now expects it in a formatted
state, this commit will allow Odoo to send the delivery type of the
carrier rather than its name, which can be customized by the user.

opw-2665099

closes odoo/odoo#84291

X-original-commit: 0b4530b124d4ac86dad34907c6d6b6e9ea69c7b6
Related: odoo/enterprise#24204
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2022-02-11 09:47:50 +00:00
Ivàn Todorovich f4a417b124 [IMP] delivery: use the orm cache on _remove_delivery_line
closes odoo/odoo#79110

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-04 14:03:41 +00:00
Arthur Gossuin (goa) d624b4fbec [IMP] delivery: add shipping insurance
Shipping insurance is a service which may reimburse senders whose parcels are
lost, stolen, and/or damaged in transit. Since most shipping connectors
provide it, it makes sense to put it in the base directory.

task-2701459

closes odoo/odoo#83896

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-03 15:21:43 +00:00
Christophe Monniez e34430c822 [IMP] various: implement _neutralize method
As an overridable _neutralize model method was added in a previous
commit, the method is now implemented for various models.

closes odoo/odoo#67825

Related: odoo/enterprise#19042
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-02-01 09:54:08 +00:00
Tiffany Chang (tic) 59e480439e [IMP] delivery, stock: print SSCC datamatrix for packages
When a package name is a valid SSCC number, we prefer to auto-print the
datamatrix to be used by shippers, which includes:
  - the SSCC number
  - the pack date (i.e. when it was put in pack)
  - the weight of the package (only when less or equal to 6 digits)

Pack date field was added to accomodate this and defaults to when
package is created (e.g. when buying packaged meat at the supermarket,
it's assumed the pack date is when the package of meat was created).

SSCC datamatrix will auto-print now in 3 package reports:
  - Package with contents
  - Package Barcode (PDF)
  - Package Barcode (ZPL)

Note if ability to create datamatrix appears to not work (only in PDF
versions) then standard 1D barcode will be used.

Part of Task: 2494740
Related ENT PR: odoo/enterprise#23323
Upgrade PR: odoo/upgrade#3202

Part-of: odoo/odoo#82389
2022-01-31 12:06:05 +00:00
Arthur Gossuin (goa) 04bee306bb [IMP] delivery: picking/order ref in DeliveryPackage
Before this commit, to aaccess some values of the DeliveryPackage
objects, we needed to take the value from the related picking. for
example, for the `payment country code` linked to the package, we need
to retrieve the value from the related picking or order.

To avoid passing too much data to the request objects, it is convenient
to be able to access to the order/picking related to the package
directly from the package.

Because these objects are not children of odoo.models.Model, I do not
need to follow the convention for the names, however, calling the
picking > picking_id in the DeliveryPackage suggests that the picking is
actually a odoo.models.Model child, which should be the case if it
exists.

reference-branch= https://github.com/odoo-dev/enterprise/tree/master-dhl_add_commercial_invoice-goa

closes odoo/odoo#83404

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-26 13:11:21 +00:00
Arthur Gossuin (goa) 6b0ab28791 [REF] delivery: Packages and Commodities in base
Each delivery provider, requires some information about the packages
that need to be sent as well as about the commodities (for commecial
invoices). Since this is needed by each provider, and the required
values are very similar, these packages and commodities can be done one
step ahead: in the base delivery module.

These new `_get` functions return a list of custom objects containing
the most important values concerning packages and commodities, and can
be called directly from the child classes.

closes odoo/odoo#82891

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-18 13:40:37 +00:00
Arthur Gossuin (goa) a8ac9c674e [IMP] delivery: add bool function for CI
Usually we want to create commercial invoices in case the warehouse is in a
different country than the recipient. However, some countries like India
need those documents for internal shipping as well.

The added function can easily be overriden in a dedicated module for the
countries that require such a commercial invoice.

Part-of: odoo/odoo#82084
2022-01-18 11:02:02 +00:00
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
Andrea Grazioso (agr-odoo) 4719adbd21 [FIX] delivery: sale price for serial products
Have a [TEST] product tracked by serial number
Create a SO with [TEST], quantity N (at least 2)
Add FEDEX int. delivery to the order
Validate and confirm delivery

On the shipping invoice the product is reported on N lines, one for each
serial number, but the price is not splitted accordingly so the total of
the invoice will be the original price multiplied by N

This commit revert f3488749eed3c4e96f1cc50a2bb2cf87b423c890
not needed anymore after
e13f048a78b41d81602e868a3b0c7ded24ce992b

opw-2703581

closes odoo/odoo#81130

X-original-commit: 1ad0e4580814bc5ef76f352ed3ed366654ce69bd
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2021-12-09 17:52:58 +00:00
William Henrotin 56e7bcf0cb [REF] *{stock,mrp}*: rename reserved fields
This commit rename product_uom_qty into reserved_uom_qty and product_qty
into reserved_qty on stock move line to stop mistake them with the stock
move quantities fields.

Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
Vishal Thacker 202ee3a6c7 [IMP] stock, delivery: move fields to delivery
Before this commit, `print_label` and `propogate_carrier` fields were
visible despite the delivery methods setting is off.
This commit moved these two fields into delivery module so now these
fields will be visible once the user installed the delivery module.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:23 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +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
wan 9b0baa3aa4 [FIX] *: product back2basics post-freeze fixes
This should have been a fixup of 37eb0dfbb54db1c062276cd8c172bf8dac9e557b but we needed
to freeze 🤷‍♂️

closes odoo/odoo#77344

closes odoo/odoo#77876

Related: odoo/enterprise#21425
Related: odoo/enterprise#21467
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-11 10:15:49 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +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