Commit Graph
83 Commits
Author SHA1 Message Date
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +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
Tiffany Chang (tic) 11c710d990 [FIX] delivery: add barcode app check into package wizard
Because the barcode app bypasses the detailed operations for receipts
(with default settings set), an error was being thrown when doing "put
in pack" when a carrier is set (saving during the delivery package
wizard) because the picking move lines are incorrectly selected. This
commit adds in a check for when the wizard is accessed via the barcode
app so that the error does not occur and the same behavior as when no
carrier is assigned is followed.

Related Enterprise PR: odoo/enterprise#9808

closes odoo/odoo#59792

Task: 2039720
X-original-commit: 945b5f6791ae890498ef9a34828eaf91dc1457e2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-12 16:17:20 +00:00
Tiffany Chang (tic) 58316d1546 [IMP] delivery, stock(_picking_batch): add "Put In Pack" button
This commit sets up the logic and adds the button for "Put in Pack"
action that already exists in stock.picking. Reuse/extension of logic
from stock.picking reused where possible, including extension of pack
wizard to handle products with different destination.

Note that logic to handle "Delivery Packaging" wizard when "Delivery
Methods" is active was purposely not extended to work correctly in batch
pickings due to complexity of adding in a new module just to handle
conflicting carrier_ids across pickings in the same batch. It is
expected that this use case will not occur except in case of user error.

Additionally, stock.picking implementation of 'put_in_pack' method has
been renamed to 'action_put_in_pack' to have consistent naming (and
support enterprise level code).

Part of "1. Improve Batch Pickings" specification of overall barcode
improvements task.

Task: 1884520
Enterprise PR: odoo/enterprise#12086

Closes: odoo/odoo#55096
2020-08-20 15:06:08 +00:00
Victor Feyens c80f74b004 [FIX] delivery: missing api.model decorator on default_get override
Finetuning of addffca423

closes odoo/odoo#55639

Related: odoo/enterprise#12307
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-07 15:09:18 +00:00
Victor Feyens addffca423 [IMP] delivery: correct default_get behavior
When a fields default value depends on another default, this value 
should be computed in a default_get override, not in a default method 
specified on the field itself.

Furthermore, the management of default_ context keys() should be left to 
the orm level (better code understanding, localizing a behavior in one 
place instead of multiple places).
2020-07-23 16:38:17 +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 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
pha-odoo e7a6b00651 [IMP] delivery: IoT scales for delivery
So far the weight of a delivery package had to be entered manually.
It is now possible to link a number of IoT scales to an operation type,
then select any of those scale in the delivery package wizard
to set weight automatically instead.

closes odoo/odoo#34782

Task: 1883775
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-16 12:45:33 +00:00
Pierre Masereel 6800fcf3c1 [FIX] delivery: set carrier on order when carrier line added
When you are adding a line on your sale order that is a delivery line,
the carrier is not always set on the sale order which means that when
the carrier is not explicitly set on the sale order, the carrier won't
be set on picking created from the sale order.

When you are using the wizard on sale order, it works, but when the
carrier is selected on the e-commerce, it is not set on the sale order.

To avoid such difference in behavior, we are writing the carrier_id of
sale order in the function 'set_delivery_line' insread of the wizard and
e-commerce.

closes odoo/odoo#35855

closes odoo/odoo#38740

Original-signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
X-original-commit: a15f9921fa1ce92c41c263a8a2c6a32342a8cb1b
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-14 16:31:36 +00:00
Simon Lejeune ad31097d8e [FIX] stock, delivery: put in pack and discard
rev[0] writes the qty done on the move lines directly in put_in_pack,
meaning hitting discard in the delivery wizard left the move lines with
a changed qty_done. We fix that by editing the quantities in
_put_in_pack in the stock module and getting the right move lines in the
delivery modules: meaning, get the normal or suggested ones (a fix
missed by rev[1]) then with quantities or 0 quantities.

[0] e03c1a836f
[1] f6d88a2e8d

closes odoo/odoo#37563

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-30 11:58:38 +00:00
Pierre Masereel a96048afcc [FIX] delivery: remove radio button
This commit (https://github.com/odoo/odoo/commit/6173dd21415ab441caaf4404bf812ce2413e29f0) put a radio widget on the carrier selection
which makes no sense, so we removed it.

closes odoo/odoo#36824

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-13 08:41:46 +00:00
Joseph Caburnay 26b692cbe2 [FIX] delivery: warning message in the delivery wizard is not updated
When a warning is generated when rating a delivery method, the warning
message remains when changing to a different delivery method that isn't
supposed to give a warning.
2019-09-12 05:28:49 +00:00
Joseph Caburnay bdb1ce15f2 [FIX] delivery: delivery line is not set to zero cost
If the chosen delivery method has free_over active, and if the cost
of the sale over exceeds the free_over amount, the delivery line
should have price_unit of zero.
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
Pierre Masereel a4a52da121 [FIX] delivery: wrong domain on carrier list
When you try to find a carrier in the wizard that let you add one on
your sale order, you don't see all of them because of a domain that only
show the ones that havethe same company id of the sale order, but it
should also show you the ones that don't have company_id set.

So we removed the domain in the view, and the invisible company_id as it
is not used anymore. Because the domain we need is already applied in
'available_carrier_ids'.

This behavior has been introduced in rev: c058562d73

closes odoo/odoo#35856

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-20 20:06:51 +00:00
Barad Mahendra 684c29f75b [FIX] delivery: display proper error notification instead of dialog
Currently when shipping method is added on the sales order with error message
then on update of shipping method it will display the error message in dialog
but it will be hidden behind the update shipping method wizard

so on update shipping method display notification instead of dialog.

Closes: #35808

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-19 11:44:10 +00:00
Barad Mahendra 07eaedfd27 [FIX] delivery: allow to select delivery method which has no company
On shipping method company is not required field so having blank
company on shipping method will be a shared method.
so while adding shipping method on so also display the company on
which the company is not set.

Closes: #35808
2019-08-19 11:44:03 +00:00
Prakash Prajapati c058562d73 [IMP] various: Add multi company domains on views
When the many2xxx field relates to a model where company_id is required, set
this  domain [('company_id','=',company_id.id)]

When the company_id field of the related model is not required, set this domain
['|',('company_id','=',company_id.id),('company_id','=',False)]

When setting the domain on a field which is in the treeview of a xxx2many field
evaluate against the company_id of the 'parent'.

Some constraints have been added on sereval models. Take a look at the complete
specification for more details.

TaskID: 2024446
Closes: #35266

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 11:17:28 +00:00
Parth Choksi 6173dd2141 [IMP] delivery, sale: improvements in recomputing of shipping cost
The "Recompute shipping cost" button will now reopen the wizard
to be able to change carrier.

When adding to the order, it will replace the current shipping cost.

Relabelled the "Recompute shipping cost" to “Update Shipping Cost”
and moved it to the right.

Shipping method field will have radio widget and cost will be editable
in the wizard.

Also, it was not allowed to delete a delivery line when the order was
confirmed ('sale' state). So here, as we want to allow user to change the
carrier even after the order is confirmed, we have allowed delivery line
to be deleted so that new line is added in place of that.

task-2033229
2019-08-08 07:54:29 +00:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
Denis Ledoux fd0a10026c [MERGE] forward port branch saas-12.1 up to b11930047f 2019-05-02 09:45:14 +02:00
William Henrotin 150d7730f8 [FIX] delivery: free_over management
The commit 9a9cb9e refactored the way delivery carrier price
are added on sale orders. The management of free delivery price
was not taken into account past then.
This commit put the free price message directly on the sale order line
and on the wizard. The carrier price is showed on the wizard but is 0 on
the SO.

Task : 1943480

closes odoo/odoo#31315

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-03-15 14:21:56 +00:00
Christophe Simonis 5df4746c9a [MERGE] forward port branch saas-12.2 up to 230ad8c381
closes odoo/odoo#32088

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-25 11:13:41 +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
William Henrotin de88a727b2 [REF] delivery: new delivery carrier wizard
On a sale order, the delivery carrier choice was done directly
on the form view. To get an estimated delivery price, the user need to
click 'add to order' to create a delivery fee line. To get the exact
delivery price on the sale order, the user needed to leave the sale
order without delivery line in order to get the exact price from the
picking at its validation.
As this flow was not so clear, this commit adds a new wizard to choose
the delivery carrier and check its commition fees. This add a line in
any case.

The wizard will be launched from a new button on the sale order

Task : 1908654
2019-02-11 13:55:55 +00:00
Nicolas Martinelli 3eeb77414b [FIX] delivery: package UOM
Since it is now possible to select the default UOM, do not hardcode `kg`
in the view.

opw-1920809

closes odoo/odoo#30427
2019-01-22 11:19:41 +00: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
qsm-odoo c59380bac5 [REF] *: BS4, rename btn-default to btn-secondary
BS4 "btn-default" class was replaced with "btn-secondary", which makes
more sense.
2018-07-27 12:36:54 +02:00
qsm-odoo 81f359c81c [REF] *: BS4, remove the use of btn-sm
Odoo made the bad choice of using the 'btn-sm' class for every button
instead of configuring the padding for default 'btn' to be smaller.
In BS4, the style of btn-sm is actually more complex, lowering the
font-size too. Also, btn-xs was removed so we would not have the
possibility to display smaller button than our default ones.

This commit removes btn-sm wherever it was used. Unfortunately, this
might remove it at some places where it made sense but this can be
restored in a second time.
2018-07-27 12:36:54 +02:00
Pierre Masereel e97fbf2d6b [IMP] delivery: packaging type max weight limit
When a max weight is set on a packaging type is set, you get a warning
when you put in pack some content that weighs bigger than the max weight
of the packaging type
2018-01-05 11:52:12 +01:00
Martin Trigaux 498bbb3fe7 [I18N] better string labels
Courtesy of the translators
2017-10-31 16:57:24 +01:00
Simon Lejeune ddf2b21bdf [REF] stock: adapt to rename of stock.pack.operation into stock.mode.line 2017-07-14 17:08:22 +02:00
Pierre Masereel 809605bb8f [REF] stock, delivery: adapt packages to new implementation 2017-07-14 17:08:21 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Pierre Masereel 0558d1fb39 [IMP] delivery,product,sale_stock,stock: split packaging views
As the product.packaging model is used for two different business cases,
the views shown when the model is used for product packaging must only
contains a product_id, barcode, and qty because and when it's used for
delivery packages we must show the carrier, barcode, size and wheight.

So for usability purpose, we have made two different views explicitly
called in each use case.
2017-03-14 11:47:15 +01:00
Pierre Masereel d744f8d912 [IMP] delivery: put in pack wizard
We have moved the 'quant.package' view into a wizard, because it's
always used as a wizard, and and there was context trouble with the
'Save' button as a button with nale 'write' (the context was mixed with
the field, and there were two write action whan "Save button was
clicked.
2017-01-03 17:53:37 +01:00
Quentin (OpenERP) f4cfeae2c1 [IMP] sale, delivery: improvements in workflows, buttons and SO form view. (delivery) Replaced the wizard to add delivery cost by a function on the SO directly
bzr revid: qdp-launchpad@openerp.com-20120525102643-60o5761u2mzrooa9
2012-05-25 12:26:43 +02:00
Harry (OpenERP) 24664a21a1 [MERGE] delivery: cleanup yml
bzr revid: hmo@tinyerp.com-20120105171315-u4j0x1ftc2426g1l
2012-01-05 22:43:15 +05:30
Vo Minh Thu 9a21bc6f80 [REF] removed any use of the ir module,
also removed some unused imports.

bzr revid: vmt@openerp.com-20110519121336-zby128e15q9ffhhh
2011-05-19 14:13:36 +02:00
uco (OpenERP) c3098f4f43 [FIX] account..l10n_ch: Pass return {'type': 'ir.actions.act_window_close'} instead of return {} in osv_memory/normal wizards.(lp:691544)
bzr revid: uco@tinyerp.com-20101228104445-h5q9jg8mq7dmdc51
2010-12-28 16:14:45 +05:30
uco (OpenERP) 6dd290e824 [REF]: Replace the condition 'if not context' with 'if context is None'.
bzr revid: uco@tinyerp.com-20101123070505-9i2lrqhgxzaii3zn
2010-11-23 12:35:05 +05:30
uco (OpenERP) 12fcd1be2f [IMP] : Added context=None on methods used for _constraints and replaced context={} with context=None.
bzr revid: uco@tinyerp.com-20101119134801-974ev29j4tu46pq2
2010-11-19 19:18:01 +05:30
Fabien Pinckaers 4b77845710 [FIX] stock_location, logistic, better demo data
bzr revid: fp@tinyerp.com-20101011215706-zu7cl6byilud541o
2010-10-11 23:57:06 +02:00
Harry (Open ERP) d423fe65f4 [MERGE] merged lp:~openerp-dev/openobject-addons/mso-trunk-dev-addons1
bzr revid: hmo@tinyerp.com-20100426064647-6lp8331zdrthktcf
2010-04-26 12:16:47 +05:30
mso 90cd229cbb [FIX] delivery: modifications on delivery cost wizard for task 584
bzr revid: mso@mso-20100426053713-6fms6tta3ogb3gv2
2010-04-26 11:07:13 +05:30
mso dd8501d463 [IMP] delivery,sale: Delivery Cost Improvement on sale, Task id-584
bzr revid: mso@mso-20100423115016-feh97hnjecr03m9p
2010-04-23 17:20:16 +05:30
mso 620fb3c029 [ADD] stock: Task id :596 Postgres view of stock moves with filters & groups
bzr revid: mso@mso-20100423053435-vxut3668xvwn75pz
2010-04-23 11:04:35 +05:30
mso 6f4bf9dd9f [IMP]: auction,delivery: fields_list variable has been changed to fields
bzr revid: mso@mso-20100322130058-3ya7mwxa858cbvfi
2010-03-22 18:30:58 +05:30
sbh (Open ERP) dcd2c147a8 [IMP] delivery : Improve the deafult_get method and clean the code
bzr revid: sbh@tinyerp.com-20100318105942-pupazzylyy138dcs
2010-03-18 16:29:42 +05:30