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
closesodoo/odoo#28626
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.
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
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
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.
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
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.
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
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).
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.
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
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.
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.
- Create a picking, set as 'Carrier': 'Free delivery charges'
- Enter a 'Tracking Reference'
- Validate the picking
The tracking reference is removed.
opw-1849279
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
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
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