Commit Graph
98 Commits
Author SHA1 Message Date
Walid a35be7b0dd [FIX] purchase_stock: replenishment correct vendor from wizard
Steps to reproduce:
- Create a product with 2 vendors
- Click replenish on the product page and select the second vendor
- The PO is created for the first vendor

Bug:
the replenishment will create a move which will create/edit a PO
the selected supplier is discarded

Fix:
set the partner on the procurement group to keep track of it

note:
'supplierinfo_name' no longer used, will be removed in master
related test ("test_procure_not_default_partner") is now irrelevant

opw-3776680

closes odoo/odoo#161974

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-04-25 11:21:46 +00:00
Walid 1882d8f89f [FIX] mrp: prevent kit product quant update
using sudo().is_kits to account for user not having access
to the bom module and boms in different companies

closes odoo/odoo#162830

X-original-commit: badd0a6dce90cc103ebc2c193e47da3f753f80a6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-04-22 17:04:39 +00:00
Walid 1648ee1abf [FIX] stock_landed_costs: skip display lines in reconciliation
Steps to reproduce:
- Create a vendor bill with landed costs
- Add section and note lines
- Try posting the bill (ERROR)

Bug:
display lines should be skipped

opw-3715660

closes odoo/odoo#161791

X-original-commit: 3174c4a793f24782d835a15d96376e45b5f333e4
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-04-15 09:10:20 +00:00
Walid d17290425e [FIX] mrp: prevent kit product quant update
Steps to reproduce:
- Create a storable kit product
- Update on hand quantity:
only the components are displayed(correct behavior)
- In Inventory tab open Inventory Adjustement
- Possible to edit kit quantity

Bug:
In the product tab when trying to update qty the kit product is
replaced with its components instead but it is still Possible to
edit kit quantity directly in the inventory app

Fix:
introduced python constraint to prevent user from directly editing
the kit product qty in master
in standard just display a warning

opw-3681703

closes odoo/odoo#160978

X-original-commit: ba81d4ef64933dc025c7a473456c5c056ed69aac
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-04-08 18:42:48 +00:00
Walid eb4f5fc929 [FIX] stock_barcode: set procurement group on new moves
Steps to reproduce:
- Confirm an SO with a storable product
- in barcode app open the created picking
- Scan a different product confirm the picking and create a backorder

Bug:
the new product is not added to the SO and the original picking isn't
linked the SO anymore

Root cause:
when new moves are created in the inventory app default_picking_id
is set in the context and is used in _default_group_id to set the group

Fix:
explicitly set the group_id when creating the move instead of relying
on the defaults from the context when possible
test: https://github.com/odoo/enterprise/pull/57408

opw-3644773

closes odoo/odoo#160812

X-original-commit: adb072ce198454801d306df90f30a14a79e3dd3d
Related: odoo/enterprise#60200
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-04-08 14:37:53 +00:00
Walid 2eeb837913 [FIX] website_sale: Terms and conditions keep button disabled
Steps to reproduce:
- Setup sendcloud shipping (shipping product 10-30KG)
- Enable demo payment
- On the website proceed to checkout (customizable desk)
- Select sendcloud (Pay button is disabled)
- Edit website and add terms and conditions
- Now if you uncheck and recheck terms and conditions
- Pay button is enabled although carrier is in error

Fix:
when reenabling the pay button we check that the
carrier is ready but we only check if there's pickup point
ensure that the shipping method is avialable before enabling
the pay button

opw-3698804

closes odoo/odoo#159539

X-original-commit: 7682c4bfc7a15b27e95905a2a0d909278bec9eb6
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-03-31 14:01:54 +00:00
Walid c6f3ab2d41 [FIX] purchase: fallback to standard price if no pricelist
Steps to reproduce:
- Create pricelist with an end date in the past for a stored product
- Click on manual replenishement
- The created PO will have a price of 0

Bug:
if no valid pricelist is found unit price is set to 0
product standard price is a better fallback

opw-3692985

closes odoo/odoo#158650

X-original-commit: ed106e70f908deda819007fc68feaa44074c0472
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-03-22 13:02:03 +00:00
Walid 3d5d5cc041 [FIX] stock: multistep reciept update quantity
Steps to reproduce:
- Enable 2 step reciept in warehaouse settings

Bug1:
- Create and confirm a PO qty = 1
- Open reciept update qty to 4 and validate
- The internal transfer qty is updated to 3 (the difference)

Bug2:
- In inventory overview create a new reciept and mark it as todo
- Update quantity and validate
- Internal transfer is not updated

Root cause:
Initially in version 17 product_uom_qty was changed to indicate the demand
before the move is done and it indicates the acutual done qty when
the move is done.
After https://github.com/odoo/odoo/pull/130342
product_uom_qty will always indicate the demand qty,
and qty_done will always indicate actually done quantity.

Fix:
updating the quantity will create a new move for the difference that is
used to trigger new push rule and then merged back in the original
when merging product_uom_qty is not updated to keep track of the intial
demand but pending linked moves should be updated to reflect the new quantity

opw-3708740

closes odoo/odoo#156331

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-03-15 13:04:47 +00:00
Walid 24e88bec4f [FIX] delivery: ignore margins on fixed price carriers
Steps to reproduce:
- Create a shiping method based on rule
- Set margins and then swith back to fixed price

Bug:
since this PR https://github.com/odoo/odoo/pull/108794
margins aren't displayed on the form anymore for fixed price
but they are still set on the model if we edit the delivery type

opw-3759128

closes odoo/odoo#157452

X-original-commit: 79bc772c8d48f64e0bd41fa0f5a40b1cd853293f
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2024-03-13 10:54:05 +00:00
Walid 08195849ad [FIX] stock_landed_costs: correct move qty
Steps to reproduce:
- Create an MO qty = 1000
- Only produce 900
- Create a landed cost for that MO

Bug:
landed cost is applied on 1000 units instead of 900
starting V17 definition of the field (product_ty) has been changed
to reflect the intial demand
https://github.com/odoo/odoo/commit/f9867a5fa572a15fb89c49c61e569427d6388cbc

apply same fix as in:
https://github.com/odoo/odoo/pull/137864/files#diff-d41327f63c4c3d8d369a3f8622f794aa03f79f5f93d9ec01dfa5c179fd8f31eaR159-R162

opw-3696385

closes odoo/odoo#156366

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2024-03-08 09:42:53 +00:00
Walid 3f4e15bb4c [FIX] sale_mrp: inherit MO analytic account from SO
Steps to reproduce:
- Enable MTO
- Create a manufactured product (no analytic distribution on the bom)
- Create an SO for that product and set an analytic account on it
- Confirm the SO

Bug:
no analytic account on the created MO

Fix:
inherit MO analytic account from SO if none is set on the BOM

opw-3708134

closes odoo/odoo#156535

X-original-commit: cd72327ff3fb3633e353b7f9443ca973c358fc01
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-03-06 14:30:42 +00:00
Walid deae7b7247 [FIX] point_of_sale: ignore consumable products fors COGS
Steps to reproduce:
- Open POS session
- Sell a consumable product in POS (no invoice)
- Close session

Bug:
an expense entry is added to the Account move

opw-3705156

closes odoo/odoo#153657

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2024-03-01 10:29:37 +00:00
Walid b40bd15c9c [FIX] purchase_stock: merge allocated moves
Steps to reproduce:
- In User settings add 'allocation reports' group to the admin User
- In Inventory settings enable allocation reports
- Create a stored product with 0/0 reordering rules and set a vendor
- Create an SO for that product
- Confirm the generated PO and click assign all on its receipt's allocation report
- Reduce the quantity on the SO and save

Bug:
a return is created instead of adjusting the quantity to deliver
the stock moves were not merged because their procurement method do not
match ('make_to_stock' / 'make_to_order')

Fix:
ignore procurement method when merging the moves
(introducing new config parameter)

opw-3621316

closes odoo/odoo#154942

X-original-commit: 337d4c79bf51f0d1705a80341fa83a88c5297128
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-02-24 19:33:46 +00:00
Walid f6f170c483 [FIX] stock: removal strategy name
Steps to reproduce:
- Switch to a language where removal strategy name is translated
(FR in 17.0)
- Edit product category and set a translated removal strategy
- Update on hand quantity

Bug:
User error removal strategy not implemented
the removal strategy name is used in the code to identify them
when changing the name through translation it is not recognized anymore

Fix:
use the untranslated term when checking the strategy type

opw-3697462

closes odoo/odoo#153970

X-original-commit: 210f0d1c56dab45b2a00f86e1c7d836f558e6feb
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-02-14 18:32:12 +00:00
Walid 0978401fab [FIX] purchase: do not apply archived taxes
Steps to reproduce:
- Create a new purchase tax and archive it
- Create a new PO

Bug:
the archived tax is still sugested on the PO Line

Fix:
apply same logic as for sales

opw-3701429

closes odoo/odoo#153156

X-original-commit: 79e0c4383fe72b5d04af8a81b57a65044a91d273
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-02-08 16:57:42 +00:00
Walid 3c87077d12 [FIX] account: Cash rounding
Steps to reproduce:
- Enable Automated Valuation.
- Set the cost of Acoustic Bloc Screens to 287.33.
- Set the Product Category on the product to have AVCO automated valuation.
- Enable Cash Rounding.
- Create a Cash Rounding (see tests).
- Make an invoice selling one Acoustic Bloc Screen and remove the tax.
- Set the Cash Rounding on the invoice under "Other Info".
- Confirm the invoice.

Bug:
when summing the ammount of all the lines the result is slightly off
(float accuracy) this will create an unnecessary cash rounding to
compensate

Fix:
round the sum to the currency precision before checking for the cash rounding

opw-3681307

closes odoo/odoo#152112

X-original-commit: 4a6ec1a667ee3d2fba00d277b4c7e8a730a45ecd
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-02-01 12:56:27 +00:00
Walid 944f959e74 [FIX] stock: print non unit UoM products labels
Steps to reproduces:
- Create two products one with UoM units and the other grams
- Create and confirm an SO with these two products
- Set quantities and validate the transfer
- Click "Print labels"

Bug:
only products with UoM units are printed because "quantity_by_product"
is overwritten with only those products

opw-3658993

closes odoo/odoo#151236

X-original-commit: d3c3e2013bd3ef2fe78c8f27b15daeb633c4d9a0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-01-29 10:20:05 +00:00
Walid e1316a425c [FIX] stock: update SO line (reserved package)
Steps to Reproduce:
- Activate packaging
- Create a storable product update on hand qty 1 package: "PACK6"
- Create a sale order with the product qty 1
- Confirm the order, picking will have a package already assigned
- Edit the sale order and set the product quantity to 0

Bug:
a new move will be created with negtaive quantity and merged with original
(correct behaviour)
but when the picking is confirmed an extra move will be created due to the
picking still having a package level set

Fix:
unlink the package level when its last linked SML is unlinked

opw-3597188

closes odoo/odoo#150939

X-original-commit: 4983923973bacbff84d67cdd442d4b6985f33577
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-01-25 11:50:08 +00:00
Walid d7fc350ecd [FIX] pos_mrp: subkits cost
Steps to reproduce:
- Create the following subkits boms
F-> SK1 -> A
        -> B
    SK2 -> C
        -> D
- Set all these products to be available in pos and have AVCO automated
valuation with A,B,C and D having a cost of 5$
- Sell F in pos creaing an invoice
- In accounting check the expense account (cost of goods) wrong cost

Bug:
´comp[1]['product']´ referrs to the kit product of the last children boms
(SK1 and SK2 in this case) which would then each be counted twice
instead use ´comp[0].product_id´ (the components of the child boms)

also fixed total_cost computation for pos lines which would filter out
all the subkits moves

opw-3538285

closes odoo/odoo#150937

X-original-commit: d6a513355ee0ae4b02e38baacdde760cc35fb873
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-01-25 09:46:47 +00:00
Walid 541b082d84 [FIX] website_sale_delivery: do not check delivery for only services
Steps to reproduce:
- Setup easypost delivery
- Create a service product and publish it on the website
- Add that product alone to the cart and proceed to payment

Bug:
Error raised because total weight of the order is null

Fix:
no delivery will be created so we should skip the check if no deliverable
product is present on the order
note: on "_get_shop_payment_errors" switched the order to short circuit
"_get_delivery_methods"

opw-3647420

closes odoo/odoo#150735

X-original-commit: 3108339921dd7af65daacf60dc0104713116557b
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2024-01-24 10:44:45 +00:00
Walid 2be5206720 [FIX] mrp_subcontracting_purchase: svl component unit price
Steps to reproduce:
- Create product FNS, storable, avco
- Create product CMP, storable, avco, cost=$100, add 10 unit in stock
- Set resply subcontractor route in inventory tab
- Create BoM for FNS: subcontracted, cmp=1 unit of CMP, vendor=Azure Interior
- Add "Azure Interior" to the vendor list of FNS (under Purchase tab) with a price of $20
- Create purchase for 1 unit of FNS to "Azure Interior"
- Confirm: Receipt should show subcontracted
- Validate Receipt: Valuation of FNS should be $120
- Create vendor Bill, Validate
=> Product Valuation is overwritten, cost become $-80.0

Bug:
when checking price difference unit component price is suvtracted but
since they are out moves their valuation is already negtaive

opw-3618767

closes odoo/odoo#146538

Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-12-28 18:03:58 +00:00
Walid a9ff983d8f [FIX] purchase_stock: bill before reciept
Steps to reproduce:
- Create a product with AVCO that you invoice on Ordered quantities in the Vendor tab.
- Create a PO with a value of 200
- Create an invoice and change the price to 100. Then cancel the Invoice.
- Create a new invoice and confirm it without changing anything (so price is 200)
- Receive the product
- The valuation will be 150, the average of the 2 invoices.

Bug:
all linked invoices are taken into account

Fix:
only consider posted ones

opw-3633051

closes odoo/odoo#147485

X-original-commit: b899edd5b9c2f5e813fc0a83ea5506672785f47b
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-12-26 17:00:35 +00:00
Walid 4bddcb8c92 [FIX] purchase: Average cost report rounding
Steps to reproduce:
- Decimal Accuracy for Product Price > 4 digits
- Purchase a product using a price (1.2345 in my example)
- Go to Purchase > Reporting
- Enable the List View
- Add the field Average Cost (price_average)
- This displays as just two decimals

Note:
can be edited with studio but you can just add the field "price_average"
to the "purchase_report_view_tree" view xml

Fix:
round using product price Accuracy

opw-3560792

closes odoo/odoo#145667

X-original-commit: d5a3430cecb673a06057673d0671228449fa3f60
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-12-11 17:21:15 +00:00
Walid c4ab9711f5 [FIX] stock_picking_batch: use lots id/name depending on picking type
Steps to reproduce:
- Create a Batch transfer and create two reciept in it
each with a serial tracked product in them
- Confirm the batch transfer

Bug:
in the detailed operation tab of the batch transfer (use existing lots/
create lots) options of the picking type are not respected and lot id is
displayed instead of lot name (many2one instead of char field)

Fix:
keep the same batch transfer as in the pickings that constitute it

opw-3541324

closes odoo/odoo#144582

X-original-commit: 53498d92f1f4de516f4452dd44d3a2c12fd5eb02
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-12-01 19:25:33 +00:00
Walid 2219e0dd39 [FIX] purchase_requisition: Create purchase order
Steps to reproduce (V 17.0):
- Create a new blanket order with agreement type "Call for bids":
    - Select only one RFQ
    - Use line of agreement
    - use quantities of agreement
- Add a product and confirm
- Create a New quotation
- Traceback!

Bug:
typo in the onchange makes it so instead of setting payment_term_id to
false it's a False, which is actually a tupple (False,) meaning payment terms
will be a record set containg one value with Id False instead of an empty
record set (it's wrong but it doesn't really make a difference in this case)
until commit[1] in web_read clean up is used to get the Id from origin Id
for inherited fields ´not vals['id']´ is expected to be true if the value
has an origin Id but in this case it is true because Id is false
(co_records wasn't expected to contains values with Id False if Id is False
it should be empty)

commit[1]:https://github.com/odoo/odoo/pull/128878

closes odoo/odoo#144111

X-original-commit: 7c5106a46bc269f2ed4cbeb18f2172b274dd27a5
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-30 17:30:22 +00:00
Walid 390807c494 [FIX] project: check company
Steps to reproduce:
- Install Stock and Project
- Create a new proect with current company as customer
(3 dots menu on project overview to the customer)
- Create a new warehouse for the current company
- Error pops

Bug:
since commit[1] check company is enforced on the project_id field of
partners in bothways
when creating a new warehouse CheckCompany fields are editted on the
partner if set (property_stock_customer/supplier) the issue is if
the partner's company_id is False while project belongs to company
"_check_company" fails

Fix:
Remove check company on project_ids from the partner's side and
implement it as python constraint

opw-3507952
[1]:https://github.com/odoo/odoo/pull/109464

closes odoo/odoo#143679

X-original-commit: 3741557dc4b5e84876247db851e9d2c862fcb93b
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-27 21:39:18 +00:00
Walid 650a47ab5a [FIX] stock: picking type russian transtlation
Steps to reproduce:
- New DB
- Switch to russian
- Install stock app

Bug:
throw back is raised when setting up the data caused by a duplicate
operation type (Sequence Packing/Picking)

Fix:
apply the correct translation

note:
manual PR created since there's no russian translation on transifex
after 16.0

opw-3589539

closes odoo/odoo#143007

X-original-commit: 1486a08fd18fceba8c632141511354e9610f6dcc
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-22 00:46:24 +00:00
Walid 374aa015d6 [FIX] stock: picking apply default procurement group
Steps to reproduce:
- Enable show detailed operation in delivery setting on Invetory overview
- Create an SO and validate the delivery order
- Create a return -> Click on the smart button on the SO for transfers
- Click "New" from the list to create a new delivery order
- Add a product on the detailed operation and return to the SO
- The new picking isn't linked to the SO

Bug:
when adding a Product on the operation tab the move is created first
with the correct procurement group and then sets the correct group on the
picking however when adding to the detailed operation (SML) the picking
is created first (no group_id) and sets its group_id(False) the move

Fix:
apply the default group_id to the picking in both cases

opw-3470090

closes odoo/odoo#142424

X-original-commit: 2add5b4020b63a1018ddbf10a55854beffadf532
Related: odoo/enterprise#50871
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-17 12:36:08 +00:00
Walid 1229c13c12 [FIX] mrp: delivery slip with kit and non kit component
Steps to reproduce:
- Enable multi steps route for manufacturing (in Inventory settings)
- Crete and confirm an MO with a kit and a non kit manufactured components
(eg: table kit and desk combination)
- Validate the created transfer
- Print the delivery slip

Bug:
the manufactured product is absent from the delivery slip

Fix:
apply the correct filter on the move lines

opw-3502881

closes odoo/odoo#142380

X-original-commit: 8c57a4f039549f4bb02a6794eda90de66c74ad28
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-17 09:02:08 +00:00
Walid b7eaf02706 [FIX] stock: propagate package in multistep delivery
Steps to reproduce:
- Enable 3 step delivery (pick,pack,ship) in inventory settings
- Create and confirm an SO with a consumable product
- Put the first transfer (PICK) in pack
(check show detailed operation will make it easier to see the bug)
- Result package is correctly set and will be correctly set as source
package for the following transfer (PACK)

Bug:
result package is not set on the following transfers

Fix:
propagate the package by default (if it's disposable) since consumable
product do not have a stock.quant _check_move_lines_map_quant_package
will fail and package_level will not be created and result will not be
assigned

opw-3513870

closes odoo/odoo#141914

X-original-commit: 83996db3adaf44f5d4428d602071224095cd4790
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-15 11:26:02 +00:00
Walid 361a5835aa [FIX] stock_picking_batch, delivery: put delivered batch in pack
Steps to reproduce:
- Install DHL delivery and enable batch transfers
- Create 2 SO with adding shipping
- Select the 2 delivery orders and add them to the same batch
- Put the batch in a pack
- Only movelines of the first delivery are put in the pack

Bug:
when delivery is Installed a Delivery Package Type has to be chosen
this will in turn put the active picking mls in pack
the case of batch picking was disregarded
https://github.com/odoo/odoo/pull/55096/files#r469780148

Fix:
implementing a method to get the movelines to pack will allow to simply
make an override in stock_picking_batch instaed of creating a new module
this has also the added benefit of unifiying the behavior accross the
different methods

opw-3357423

closes odoo/odoo#141473

X-original-commit: 2d2bfe7f01379beb695b1c8756be393e17faf7de
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-14 16:35:02 +00:00
Walid 9548218445 [FIX] purchase: wrong list price UoM
Steps to reproduce:
- Install Sale and Purchase and enable UoM
- Change 'Acoustic bloc screen' purchase UoM to dozen
- Create a PO for that product
- Access the product page from PO line
- Wrong Sales price

Bug:
the jsonrpc to read product data needlesslt sends the UoM in the context
which leads to the sales price being updated by _compute_product_lst_price

Fix:
remove UoM from procut context as it is not necessary

opw-3434574

closes odoo/odoo#140957

X-original-commit: fe04d61a886fa7b461ebf9bda2d7479fb69281cd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-11-04 06:43:17 +00:00
Walid f949af22ce [FIX] stock: use existing lots when importing lots
Steps to reproduce:
1. Install Inventory app.
2. Enable "Storage Locations" in Inventory settings.
3. Create a new product known as "X". Set it's tracking to "By Unique Serial Number".
4. In Inventory -> Configuration -> Operation Types -> Receipts, set "Use Existing Ones" to true.
5. Create a new Receipt, add a new line of product X.
6. In the "Details" page of the X line, click "Import Serials/Lots".
7. Enter at least two lines of two serial numbers and import.

Bug:
Notice that the "Lot/Serial Number" column on each row are blank.
This is happening because the view used for stock move lines here will
display either the lot_id field of a sml, or the lot_name field,
based on varying conditions. In this case, setting "Use Existing Ones"
to true will cause the lot_id field to be displayed (and the lot_name
field to be invisible). When importing lots, only the lot_name  is set
with the user's input but the lot_id is left blank. So because lot_id
is empty, the column is empty. But this works as expected
when "Use Existing Ones" is false because it displays the correctly
set lot_name. When the receipt is validated,
the lot is created and lot_id for each of the smls is set,
so now it displays properly.

Fix:
when "Use Existing Ones" is set first check if lot exists and set it in
that case, otherwise create and set a new lot at that moment

opw-3498812

closes odoo/odoo#140400

X-original-commit: c5a35a1c2a7e16adbd3f2b1e37509003bcfac957
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-31 14:40:57 +00:00
Walid 63d5b7cc36 [FIX] stock: take into account default return locations
Steps to reproduce:
- Enable locations in Inventory settings
- Edit Delivery on operation types
- Set a default return location
- Create and confirm an SO and it's delivery
- Create a return
- default return location is ignored

Bug:
since commit[1] returns have been redesigned and the default location
was not considered

Fix:
set location when creating the return and
prevent compute from editing the returns

opw-3517921
[1]: https://github.com/odoo/odoo/pull/118568

closes odoo/odoo#140154

X-original-commit: 68a7fe2cc15bb58402256b533c8e9b598b0838bf
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-27 23:44:53 +00:00
Walid fc1ee847dc [FIX] website_sale_delivery: disable pay button durring update
Steps to reproduce:
refer to ticket

Bug:
if there's no available pickup points on the selected delivery method
the pay button is disabled but clicking on a payment option reanbles the
button
eventhough "_onClickPaymentMethod" doesn't enable the button since
_isPayable is false,
"_onClickPaymentOption" already enabled the button.

Fix:
disable the button before updating the payment method
also disable the button at the start when changing shipping method
(to avoid client clicking pay while carrier data is loading)

opw-3432905

closes odoo/odoo#139522

X-original-commit: 6a91e63504cb45d2f80162d2a91b76e733c0facf
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-10-24 15:23:23 +00:00
Walid 74497136cc [FIX] purchase_requisition: correct sequence according to company
Step to reproduce:
- Create company specific sequences for purchase agreements.
- Create a purchase agreement for Chicago company
- Select both comapanies for current user and switch to San francisco
- Confirm the call for tender

Bug:
sequence from San francisco is applied since ir.sequence takes current
company by default

Fix:
for company specific purchase agreements apply their own companies sequence

opw-3505571

closes odoo/odoo#139310

X-original-commit: 1e7625bb132909b892311a0da3bac9585217bd8c
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-20 18:06:40 +00:00
Walid ad0555abbe [FIX] mrp: End date with lead time
Steps to reproduce:
- Enable manufacturing lead times in settings
- Create a BOM for product P with lead time 5 days
- Create and process an MO for product P
- End date is wrong
(add date_finished to the MO list view to check)

Bug:
when marking MO as done the end date is correctly set as today
but during the write the compute is triggered which delays it by
the lead time

Fix:
do not modify the end date of done MOs

opw-3536069

closes odoo/odoo#138431

X-original-commit: baa769a56a1236ec75a6042c56643464c2aabd3d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-11 18:03:35 +00:00
Walid HANNICHE (waha) 52653a9d05 [FIX] sale_purchase: service product preserve variant
Steps to reproduce:
-Install sale_purchase_stock and sale_product_matrix
-Have a Service product that is subcontracted.
-Set a variant with a Specification Attribute that has a custom value.
-Create a sales order with the Service product,
add anything for the specification in the variant.
-Confirm the order, this generates a PO.

Bug:
The PO line only says the name of the product,
and doesn't include the specification in the variant.

Fix:
propagate the description same as:
"_prepare_procurement_values" and "_prepare_purchase_order_line_from_procurement"

opw-3438125

closes odoo/odoo#138310

X-original-commit: 5b3bcee8f7308621608d91e33bac808586e8c17f
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-10-11 08:18:55 +00:00
Walid 055b8d2153 [FIX] website_sale_comparison: restore compare button
Exact steps (or video) to reproduce the issue (on runbot):
1. Go to Website > Shop > Open a product with specifications table (Customizable Desk).
2. Open Editor > Set Specification to None > Compare button is removed from Product page

Fix:
display the compare button under add to cart if spec disabled

opw-3329219

closes odoo/odoo#137775

X-original-commit: 95e0be822fab3596b2baa8b19e0a9c1728096047
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-06 07:12:14 +00:00
Walid 5cf635f55f [FIX] mrp: SN sequence
Since commit[1] Serial number sequence rule takes priority over already
existing Serial numbers

Bug:
when disabling default Serial number sequence rule a validation error
is thrown since lot name is now empty

Fix:
fall back on the previous behaviour (get next SerialNumber) if sequence
is not set
(also added a clearer user error if neither is set)
note also updated the .pot file

opw-3514794
[1]:https://github.com/odoo/odoo/pull/134187

closes odoo/odoo#137756

X-original-commit: 68d670a27be7baaaf53b0cf491234f8e0453d7f2
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-06 07:12:11 +00:00
Walid 3f8a891eac [FIX] l10n_it_stock_ddt: report language
Steps to reproduce:
- Set up an Italian language company with Italian localisation.
- Set up an English language customer.
- Set up an Italian language supplier.
- Set up a product with dropshipping options.
- Set up a sales order for the product to be dropshipped direct
 from the Italian supplier to the English customer.
- Print the DDT report.

Bug:
The report will be printed in Italian.

Fix:
same as delivery slip reuse _get_report_lang

opw-3526633

closes odoo/odoo#137638

X-original-commit: 10283d926f8e4d542ca0ae8b0d25710e650c9574
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-04 20:52:49 +00:00
Walid 7a1c7870a9 [FIX] mrp_account: correct component price unbuild
Steps to reproduce:
- Create a component C (automated/FIFO)
- Create and confirm two PO for C
qty: 1, price: 10
qty: 1, price: 20
- Make an MO with C as a component
- Unbuild that MO

Bug:
The valuation of the new component C is wrong, the new move in is valued
at the current product cost instead of its original value.

Fix:
create moves as a return to get the correct value

opw-3379457

closes odoo/odoo#137353

X-original-commit: d42238cc75fe6621c1eb893395856870c8bfbafb
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-03 20:17:49 +00:00
Walid f55824ce17 [FIX] delivery: long trackingRef form view
Steps to reproduce:
- Create a transfer with a delivery method.
- Add a lot of characters in the tracking reference field.

Bug:
after saving the field overflows in the view

opw-3370813

closes odoo/odoo#137176

X-original-commit: 707ae95d32836296e57540cdbdf78a2b3a7c7117
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-29 20:48:45 +00:00
Walid 929bf923c6 [FIX] stock: forecast button color
adress both use cases in :
https://github.com/odoo/odoo/commit/ed2849a55c1463689cbc201a782b0200207bfd37
and
https://github.com/odoo/odoo/commit/4248aac2d224363a6ac4a59881bdb7c321623e4b

button should be red if there's no qty in stock but still be green if
the qty was reserved for the move

closes odoo/odoo#136078

X-original-commit: 92f3c53c2c29e3820b39a93d8745af794b0d58a9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-22 11:55:56 +00:00
Walid HANNICHE (waha) ad9c8e31e1 [FIX] mrp: update MO qty reserves components
Steps to reproduce:
- Create and confirm an MO with extra components in stock
- Update the quantity to produce

Bug:
the reserved qty is not updated (it actually is but to the previous
value if you update MO quantity multiple times)
since this commit[1] moves are now assigned during the write
before the new product_uom_qty is written on them

opw-3489226
[1]:https://github.com/odoo/odoo/pull/93712

closes odoo/odoo#135548

X-original-commit: cc23ebefb4a15d163ec508cd535bf757cf626fa5
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-14 18:09:52 +00:00
Walid 56a4f4beb2 [FIX] purchase_mrp: split cost in bom line
Steps to reproduce:
- Create Storable Product "Super Test" with Cost of $1.
- Create Storable Product "Pack of Super Test" with Cost of $10.
- Create a Kit BoM that produces 1 "Pack of Super Test" from 10 "Super Test".
- Ensure product category on both products is set to Automated FIFO Inventory Valuation.
- Create a PO for 20 "Pack of Super Test" and confirm.
- Process the Delivery and look at inventory valuation.
- See that "Super Test" has moved quantity at 200 with Unit Value of 10 each (taken from kit product!).

Bug:
cost isn't split on the qty of the bom line

Fix:
take product quantities of the bom into consideration

opw-3453703

closes odoo/odoo#134909

X-original-commit: 8e516dccac4ced7e48adfabe756a899784bac9ca
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-08 16:48:07 +00:00
Walid 1d33b7a9b8 [FIX] stock: SN sequence
Steps to reproduce:
- Create a serial tracked product
- Update quantity add random SN
- Edit "ir.sequence" for serial numbers
(search sequence with dev mode enabled)
- Add a prefix for exemple "xx%(doy)sxx"
- Manufacture the product and generate new serial

Bug:
if a serial already exist next number in the sequence will be generated
instead of using the sequence

Fix:
apply same logic than for lots i.e. first generate from sequence then
take next number if it already exists

opw-3291532

closes odoo/odoo#134879

X-original-commit: df96d9ca10c576981f6af79e330b5b46cdeea377
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-08 15:26:11 +00:00
Walid 585c2d806a [FIX] stock_landed_costs: reconcile LC after posting the bill
Steps to reproduce:
- Create a PO (fifo automated product)
- Recieve product
- Create the bill and add the landed cost product to it
- Create the landed cost before posting the bill
- Post the bill

Bug:
when creating the landed costs if the bill is already posted
the created amls are reconciled otherwise they aren't

Fix:
reconcile the landed costs amls after posting the bill

opw-3377088

closes odoo/odoo#134349

X-original-commit: 233699522c48dce9b541a79db756cc478ed71592
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-06 05:53:50 +00:00
Walid HANNICHE (waha) 7fc150e26d [FIX] mrp_account: reconcile AVCO kits amls
Steps to reproduce:
- Create a product in KIT
- The product and components must be AVCO rated.
- Sell product, confirm delivery and post the invoice

Bug:
the journal entries are not reconciled.
the lines are gouped by product but in this case the products don't match
on the stock side it's the components and on the invoice it's the kit

Fix:
match components stock moves of kits to the kit product

opw-3208169

closes odoo/odoo#133683

X-original-commit: 376e3cd31427a6715dd86af91755baca733d94ef
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-08-31 10:37:07 +00:00
Walid 139ff18221 [FIX] delivery: unique tracking reference on the picking
Bug:
bug introduced by previous fix
https://github.com/odoo/odoo/pull/130252
tracking number is set twice on the delivery

Fix:
only set the tracking number on the related picking where it hasn't been
set yet.

closes odoo/odoo#133004

X-original-commit: 09842a47c08a4cd9da3f5f4da1d7870d9ced9d02
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-08-24 20:59:00 +02:00
Walid d9e31fbb51 [FIX] delivery: apply tracking to all pickings in multistep delivery
Steps to reproduce:
- Install DHL carrier
- Enable multistep routes
- On warehouse config set 3 steps(pick,pack,ship) on outgoing shippments
- Create an SO  and add DHL shipping
- Validate the first picking and send to shipper

Bug:
only the first picking has a tracking ref
this causes an issue because this an in internal picking and only the
last is shown to the customer on sales portal so the customer doesn't
have acces to the tracking ref

Fix:
set the referrence on all the pickings of the so

opw-3269257

closes odoo/odoo#132142

X-original-commit: fd19ba5483dc4312e4459100582f417a38b52b3b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-08-16 22:22:46 +02:00
Walid f60e9b07b6 [FIX] stock: return packages
Steps to reproduce:
- Deliver an SN-tracked product with the Destination Package set (put in pack button also sets this).
- Return that product without setting the Source Package (you can also click "put in pack" which will put the product in yet another pack).
- This already results in two lines with the same SN in the same location, one with +1.00 and one with -1.00 quantity.
- Deliver that product again and put in pack.
- Now there's three lines with the same SN in the same location, two with +1.00 and one with -1.00 quantity.

Bug:
source Package isn't set bydefault when confirming the move_line
we update the stock quantity for that lot_id and Package set to False
the existing quantity has a Package set so it is filtered out and a new
negative quantity is created

Fix:
set the source Package on the return

opw-3179388

closes odoo/odoo#132056

X-original-commit: 9d2d3911a3ac6711d3040d22e146f9eb18de2197
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-16 19:04:49 +02:00
Walid 1fb4d356b5 [FIX] mrp_account: AVCO product valuation with component cost 0
Steps to reproduce:
- Create a manufactured product P with AVCO valuation
- On the bom of the previous product add a component C with unit cost 5$
- Manufacture product P (Unit cost correct so far 5$)
- Change component cost to 0 and manufacture again
- Unit cost of P is still 5$ were it should be 2.5$

Bug:
since the move unit price is 0 the standard price of the product P is
used insted for the valuation of the newly created qty

Fix:
force unit price to 0 in the case of manufacturing

opw-3374462

closes odoo/odoo#132047

X-original-commit: f6c2b5368e3abdc292e66dc04efc4031eb12f742
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-08-16 17:48:19 +02:00
Walid HANNICHE (waha) d49f1a05e6 [FIX] mrp: backorder reservation correct UoM
Steps to reproduce:
-Create a product in kg as storable.
-Add it into the BOM of another as grams.
-Create an MO with the BOM with more than 1 quantity to be produced.
-Set the quantity to be produced to 1, validate and create backorder.

Bug:
Error message: "It is not possible to reserve more products of test kg
than you have in stock."

Fix:
correct conversion of units during backorder reservation of component

closes odoo/odoo#129152

X-original-commit: 8f26839998f21e521ecaeba38a2bcc6c72894f41
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-07-20 15:45:08 +02:00
Walid HANNICHE (waha) 21e1a2eac8 [FIX] stock: return packages
Steps to reproduce:
- Deliver an SN-tracked product with the Destination Package set (put in pack button also sets this).
- Return that product without setting the Source Package (you can also click "put in pack" which will put the product in yet another pack).
- This already results in two lines with the same SN in the same location, one with +1.00 and one with -1.00 quantity.
- Deliver that product again and put in pack.
- Now there's three lines with the same SN in the same location, two with +1.00 and one with -1.00 quantity.

Bug:
source Package isn't set bydefault when confirming the move_line
we update the stock quantity for that lot_id and Package set to False
the existing quantity has a Package set so it is filtered out and a new
negative quantity is created

Fix:
set the source Package on the return

opw-3179388

closes odoo/odoo#128874

X-original-commit: ca168f7fbcbb8a300a8fa0b46f79a6c116b5aa93
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-07-18 18:18:28 +02:00
Walid HANNICHE (waha) cd93450aa7 [FIX] loyalty_delivery: ignore discounts for free delivery
Steps to reproduce:
- Create a delivery free over 100$
- Create a discount that apply on all products for 90%
- Create an SO for 200 $

Bug:
the delivery is free although total amount is under 100$

Fix:
Gift cards and eWallets should be taken into account because they are
different way of payment the rest of discounts should be ignored

opw-3382153

closes odoo/odoo#128795

X-original-commit: 22f5b5ce245a5ebdda0f39f291401fe5bd19e4dc
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-07-17 20:36:09 +02:00
Walid 0fe78c01d9 [FIX] website_sale_delivery: correct adress states
Steps to reproduce:
- set shipping methods country to mexico (empty states)
- fill an order on website on check out select seprate shipping/billing
- on billing set country as US
- on shipping the only country avialable is mexico
- avialable states are the ones from the US not mexico

Bug:
the states are set from the country of the customer even though it isn't
an option on any carrier.
bug was introduced by this commit[1]

Fix:
revert the mentioned commit(1) since a new commit[2] was introduced that
correctly handles that use case too

[1]:https://github.com/odoo/odoo/commit/d59fe9c58c2dcc2bf6613adb7ac3662597b50496
[2]:https://github.com/odoo/odoo/commit/297641da69982d6c76bd591296636b479cabf657

opw-3230361

closes odoo/odoo#128349

X-original-commit: c59bc765f186858bffb642987cd88fcb80fe262a
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-13 18:17:55 +02:00
Walid a1deba1186 [FIX] mrp: keep reserved tracked products on Backorders
Steps to reproduce:
- Create a subcontracted product with components tracked by lots
- make a PO for 35 the product and send components from multiple lots
- login as subcontractor on the portal
- record uncomplete production and change the default consumed lots

Bug:
split production ignores the done quantities on the initial move
on the Backorders components are considered to be consumed in the
default order

Fix:
Consume components on the initial move as indicated by the user
reserve the remaining components for the Backorders as usual

opw-3186773

closes odoo/odoo#127467

X-original-commit: c39256ba6df257ee79fb66eab61617f5fec166b9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-07-05 17:34:13 +02:00
Walid 56227b9049 [FIX] delivery: Backorder shipping cost with invoice policy in real
port of this fix
https://github.com/odoo/odoo/pull/70454

Steps to reproduce the bug:

- Let's consider a delivery carrier DC with invoice policy = 'real'
- Let's consider a consumable product P with a weight = 1kg and sales price = 10€
- Create a sale order SO with 2 P and add DC as shipping cost
- Process the shipment for 1 P and create a backorder
- Process the second shipment with the last P

Bug:

Two lines L1, L2 with DC were created on SO but only L1 as a price unit and a description.
L2 had a price unit = 0€ and no description.

opw-3219711

closes odoo/odoo#125573

X-original-commit: 79dad0a7599584f14e4ab3e96c393983e95aa519
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-06-19 16:40:04 +02:00
Walid fbcc33f3d3 [FIX] point_of_sale: apply quantity bracode nomenclature
Steps to reproduce:
1) Have Barcode Installed and have Barcode Nomenclature set
2) edit 1st rule(Price Barcodes 2 Decimals) to type Quantity
3) Create a product with barcode 2380201000008
4) Open POS and scan barcode 2380201010007

Bug:
error popup product not found because the callback for this rule
is not set

Fix:
apply same callback as weight (set product quantity)

opw-3213595

closes odoo/odoo#124886

X-original-commit: cd727b13b4ead39cd2b79ad0527e2912c8cf769b
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-06-13 18:21:10 +02:00
Walid 35d84b0c27 [FIX] mrp_account: remove related analytic line when WO is deleted
Steps to reproduce:
* Create an analytic account
* Create MO with Analytic Account
* Create WO on MO
* Create Time Tracking on WO
* Delete the WO

Bug:
The analytic line related to the work duration remains on the Account

Fix:
Remove the lines when the WorkOrder is deleted

opw-3174736

closes odoo/odoo#124014

X-original-commit: 59ebf21d126d9d5c93e97e6b404b23270050aa6f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-06-07 12:02:12 +02:00
Walid 2714a25621 [FIX] stock: dropshiping delivery slip in client's language
Steps to reprodue:
- Create a dropshipped product
- Sell the product to a client with a different language set
- Print the delivery slip

Bug:
delivery slip is currently being printed in the vendor's language

Fix:
Print the delivery slip in the client language when possible

opw-3193015

closes odoo/odoo#123047

X-original-commit: 0ad04a80b1f99feda2fdefbf24cbc3c494110a8d
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-05-31 14:23:40 +02:00
Walid fa66af2c47 [FIX] base: wkhtml2pdf multiple documents
Steps to reproduce:
- set up a header with company logo
- print 20 sale orders in arabic

Bug:
header disapears on most pages

Fix:
add a setting to allow users to increase the delay before printing

opw-3217155

closes odoo/odoo#122983

X-original-commit: 68f7cbd15df7839aab146023399da1570b12b441
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-05-31 02:27:50 +02:00
Walid HANNICHE (waha) 82787d2b98 [FIX] purchase_stock: units rounding
Steps to reproduce:
1-create a weight unit 'jm' bigger than reference
    ratio 2.47541 rounding 0.001
2-create a stored product uom:'jm' / purchase_uom: 'kg'
3-set valuation method to automated (fifo)
4-create a replenishement for 200 (jm)
5-confirm and recieve the products
6-valuation for that stock move is null

Bug:
computations in the stock module are done with rounding method (half-up)
when computing the unit price the recieved quantity is computed with up
rounding which leads to a mismatch

Fix:
applied the same rounding method on all the Steps

opw-3213997

closes odoo/odoo#118251

X-original-commit: c305942958c73414def47ebd299227999841c6ed
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-04-11 18:49:46 +02:00
Walid HANNICHE (waha) bbddb40789 [FIX] stock: use default lang when no partner in deliveryslip
Step to reproduce:

1. create a product
2. duplicate it and change its translation (but DO NOT change the product name)
3. create a transfer for that new product without a contact
4. print delivery slip

Bug:
the db's product name is used instead of the translated name
(i.e. "original product name (copy)")

FIX:
when partner id is not set in picking, then default to the user's language

opw-3141202

closes odoo/odoo#116610

X-original-commit: e56b955fbd7963709b9547eb50d97cf105f9d430
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-03-25 02:47:11 +01:00
Walid HANNICHE (waha) 5e54ac4ecc [FIX] stock: refresh forecast page
Steps to reproduce:
1. Inventory / Configuration / Warehouse Management / Warehouses
2. Need at least 2 warehouses
3. Inventory / Products / Products
4. Click forecasted quantity on a product that has some on hand
5. Click warehouse and select any option
6. Refresh the page
7. Error

Bug:
when refreshing the page the context gets cleared and productID lost
which leads to an error when looking for its bomIDS

Fix:
when refreshing the page get the productID from the url
also set the default title to "Forcasted Report"

opw-3217987

closes odoo/odoo#116198

X-original-commit: d49c73f95033472f1417ee05793d5f100f641dd0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-03-22 14:52:47 +01:00
Walid HANNICHE (waha) c0d5908c6a [FIX] stock: set correct return quantity
Steps to reproduce:
-Enable multistep routes for manufacturing
-create a MO for 50 products
-In internal transfers from Stock to Pre-production validate
part of the tansfer (20 units) and create a back order
for the remaining qty (30 units)
-create and validate another pertail transfer (3 units)with a back order
for the remaining quantity (27 units)
-create a return for the last validated transfers

Bug:
the default qty for the return is set to -20 where it should be 3
this commit[1] deducts the previous transfers from the returned amount

Fix:
only deduct returns from current transfer

opw-3104699
[1]:https://github.com/odoo/odoo/commit/7b08f0ae0a39e8f575b21e744de16264b6365704

closes odoo/odoo#115929

X-original-commit: 0278a4a7ba5cdd7a722e5d576d22820a3ee64308
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-03-20 19:15:22 +01:00
Walid HANNICHE (waha) b803522ef5 [FIX] stock: label printed twice
Steps to reproduce:
- enable PICK + PACK + SHIP
- in Inventory/Configuration/Operations Types
- check print label in PACK

Bug:
print label is already enabled by default in the SHIP Operation
and it's not possible for the user to edit it.

Fix:
allow the user to disable print label on the SHIP Operation

opw-3085428

closes odoo/odoo#115572

X-original-commit: 0e26baa8881e44edc85f553559f9c572008a921c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-16 18:32:59 +01:00
Walid HANNICHE (waha) 27d4a74724 [FIX] mail: set correct reply_to company
Steps to reproduce:
- select a different company from the main one
- under settings/discuss enable External Email Servers
- set up an alias domain
- create an SO and send it by email
(you can catch the sent email using mailhog)
- reply to that email
(you can use the support-tools[1] and set In-Reply-To: "previous message_id")

Bug:
the reply_to field of incoming message defaults to the first company

Fix:
set the reply_to field to the company asociated to the record
(there's already a fallback to self.env.company  in
"_notify_get_reply_to_formatted_email")

opw-3060214
[1]: https://github.com/odoo/support-tools/tree/master/scripts/mail

closes odoo/odoo#115090

X-original-commit: d86e57404d540762fa51afeabeddd3a0fc45d4d5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-03-13 18:45:11 +01:00
Walid HANNICHE (waha) 615aa00daa [FIX] stock: unit price rounding
Steps to reproduce the issue:
. Change the decimal accuracy of the product price to 0
. Create a storable product and set the Vendor Tax
. Create a purchase order with that item.
. Set the unit price to have 0 decimal places. E.g: 20
. Change the demand quantities to 10
. Confirm the purchase order -> Traceback

Bug:
wrong key word arg used for _float_compare for this PR [1]

Also this PR, remove the rounding on `total_void` in `_compute_all()` to
ensure the price unit have the maximum precision. Usually, the price
unit is rounded following the 'Product Price' accuracy rather than the
currency one.

opw-3136160
[1]:https://github.com/odoo/odoo/pull/105080

closes odoo/odoo#114356

X-original-commit: 6906c32626cb222246a895ba2ba5d15b3263935d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-08 11:36:56 +01:00
Walid HANNICHE (waha) 7b71480c19 [FIX] base: wkhtml2pdf large documents load
Step to reproduce:

    Edit documents layout in general setting to add logo and background
    select multiple documents (more than 5) e.g. Inventory> delivery slips
    print all documents.

Bug:
background and logo missing on the last documents because the pages
were printed before the browser had time to render them

Fix:
wkhtml2pdf has a default delay of 200 ms (--javascript-delay)
increasing the value will allow large document to load

opw-2951594

closes odoo/odoo#114512

X-original-commit: ac2df93eb3f08696189d010bdfa4187e02a94576
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-03-07 03:53:49 +01:00
Walid HANNICHE (waha) 360ec46b16 [FIX] purchase: unit price order line price_precision
Steps to reproduce:
- increase price_precision in decimal accuracy (in debug mode)
- create a product with multiple digits
- create a PO with that product
- unit price is rounded to 2 digits (currency pricision)

Bug:
in previous versions conversion was only done if currency
was different

Fix:
do not round during conversion and round to the highest digits
(alternatively we could revert to only converting if currecy is
different and accept the loss of precission in that case)

the wrong currency was used also for the conversion

opw-3050044

closes odoo/odoo#111223

X-original-commit: 2e46bf073c2251ce3d3ab5d5184feceb741df6db
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-27 15:11:18 +01:00
Walid HANNICHE (waha) 7e0e711e31 [FIX] stock_account: SVL unit price precision
Steps to reproduce:
- Increase decimal accuracy of product price (eg: to 4)
- Create a product with fifo automated valuation and price of 280.8475
- Confirm a sale order of that product and Confirm stock picking
- Create a return on the stock picking

Bug:
rounding error on the stock valuation

Fix:
do not round unit price on currency rounding

opw-2988071

closes odoo/odoo#110112

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-26 10:16:55 +01:00
Walid HANNICHE (waha) 765f653af3 [FIX] purchase_stock: stock valuation foreign currency Journal Entry
Steps to reproduce:
- Setup product (
    cost 10$
    Storeable Product
    Standard Price Accounting
    automated valuation
    add account for price difference
)

- Purchase product in foreign currency (set a different price)
- Receive the product
- Create and validate Bill

Bug:
The reception JE is for the cost amount set on the product ($10)
debit and credit value are correct but the amount in currency
is wrong (purchase cost)

After creating the bill the Journal items are not correctly matched
since reconciliation is done on currency amount in the case fo foreign
currency transaction

Fix:
Set the correct amount (cost configured on product page)
in currency amount if costing method is standard

opw-2822366

closes odoo/odoo#110628

X-original-commit: 9f5025d99ec490eb2a45b9dbf1a8a43e8fc3162b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-20 21:57:26 +01:00
Walid HANNICHE (waha) 823abebe83 [FIX] stock: Serial number attribution
Steps to reproduce:
- create a storable product with serial_number tracking
- create an confirm a PO that porduct
- recieve the product
- add serial_numbers to the list view and enter a number
- validate the reciept
- an error pops up (You need to supply a Lot/Serial Number for product)

Bug:
entering a serial_number creates a new stock_move_line with qty_done
while also setting qty_done of the already exising line

Fix:
If a stock move line already exists to reserve the product
use the existing line instead of creating a new one

opw-3060668

closes odoo/odoo#110407

X-original-commit: f1541c62b099ab40c295c60e86094232f5c51a2c
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-19 17:49:09 +01:00
Walid HANNICHE (waha) 7f3a4fbb2d [FIX] board: dashboard darkmode
Steps to reproduce:
- add elements to dashboard
- enter dashboard and enable darkmode

Bug:
titles are unreadable because background is white

Fix:
remove CSS property

closes odoo/odoo#110201

X-original-commit: 5b56f1891d618008678d70ad125ad1393abe352b
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-18 13:25:51 +01:00
Walid HANNICHE (waha) a7f08f0b4c [FIX] purchase_stock: product price accuracy higher than currency accuracy
Steps to reproduce:
. Change the decimal accuracy of the product price to 6
. Create a storable product and set the Vendor Tax
. Create a purchase order with that item.
. Set the unit price to have 6 decimal places. E.g: 9.406250
. Change the demand quantities to 10
. Confirm the purchase order.
. Edit the purchase order and change the demand quantities to 7 (<10)
. When you save, a new return order will be created

Bug:
Merging the two stock moves fail because the unit price is different
and the unit price is different because in the case of taxes we recompute
the unit price from untaxed amount which is rounded using the currency price_precision

Fix:
removed the unit_price from the keys used in matching which require an
exact equality and added a comparaison on the lowest precision

opw-3011342

closes odoo/odoo#110206

X-original-commit: f9ee1a22eb94e7ffcefd0023fc89150f8de73006
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-18 00:02:00 +01:00
Walid HANNICHE (waha) 8704ebf5f9 [FIX] auth_signup: fix password reset
Steps to reproduce:
- generate password reset link
- access the link
- the page redirects to login

Bug:
password reset and new account creation share the same path
this commit [1] made it so when you click on the new account link after
it was activated you are redirected to login

Fix:
the distinction between both scenarios is made using the presence of
'signup_email' in the query.
only add signup_email when creating a new account

opw-3068790
[1]:https://github.com/odoo/odoo/commit/97658791306349456761ba4c18d504f861e3bb98

closes odoo/odoo#108093

X-original-commit: 3ba02fbeb54afc0ebd5ab434cdf921159646e9d0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-12-16 13:48:28 +01:00
Walid HANNICHE (waha) e99772d834 [FIX] web_editor: editor overwrites hotkeys
Steps to reproduce:
- edit some text on the website
- select a part of the text then press (alt+s)

Bug:
the selected text is deleted before the save

Fix:
if "alt" key is pressed don't execute the editor listener
(except for Mac OS)

opw-2996264

closes odoo/odoo#108103

X-original-commit: 1cd0b4396699513c80bafc2f052d373f9ef9f55e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-12-15 21:18:54 +01:00
Walid HANNICHE (waha) a7f855f789 [FIX] account: tax included in subsequent taxes
Steps to reproduce:

1. Create a new tax (TAX1) with a lower sequence than VAT(15%).
2. Check Affect Base of subsequent taxes.
3. Create an invoice, add a line with a product and both taxes.
4. Remove the invoice line.
5. Check Journal Items tab: a VAT line is still there with an amount

Bug:

When we create an invoice line with (affecting + affected) taxes,
4 Journal items are created, including the affecting tax line
having the affected tax as tax id.
When we remove the invoice line, the system sync the dynamic lines,
recomputing all the taxes to check what to create/write/delete
As one of the tax entries has a tax it will be left as a needed line
while it should be removed.

FIX:
avoid computing `_compute_all_tax` for tax lines

closes odoo/odoo#108048

X-original-commit: 4fbd639965107fc9363dddb553a70461cd596c0c
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-12-15 13:40:59 +01:00
Walid HANNICHE (waha) 96753cc371 [FIX] l10n_gcc_invoice: arabic invoice product name is displayed twice
Steps to reproduce:
-install l10n_sa_invoice module
-switch to a company in Saudi Arabia (SA company)
-create and print an invoice with a product that has arabic translation

Bug:
When adding a product and the Arabic translation.
If we add an internal reference it is added to the template,
Odoo directly concatenates this with the product name.
The result is the product name being duplicated.

Fix:
display line name and add the translation if it's different

opw-2829934

closes odoo/odoo#107798

X-original-commit: ad585bc41f49d047c150ceb9dc88bd9859fa046b
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-12-13 10:05:17 +01:00
Walid HANNICHE (waha) 7214345b25 [FIX] web: adding toggle to view with studio
Steps to reproduce:
- edit RFQ model with studio
- add a toggle widget to the product list
- activate/deactivate the toggle multiple times on different products

Bug:
sometimes the element on the widget is undefined when trying to rerender

Fix:
check the element is defined before trying to render it

opw-3013024

closes odoo/odoo#106614

X-original-commit: 1b09a6314dbce9363f4785c670033f41846359ad
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-25 19:51:59 +01:00
Walid HANNICHE (waha) 17d3bb220b [FIX] stock_picking_batch: remove create button
Bug:
- enable wave transfers
- Kanban view should not have a create button

Fix:
removed the button

opw-2978078

closes odoo/odoo#106561

X-original-commit: 3bc3631dab671895ae70b531bcf79ef92c39363e
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-25 18:55:10 +01:00
Walid HANNICHE (waha) bcd8081cb4 [FIX] board: prevent add to dashboard with no actionID
Steps to reproduce:
- Go to Purchase -> Reporting -> Dashboard
- click on the "expand" arrows of the pivot view
- favorites - add to dashboard

Bug:
adding a view with no actionID causes the dashboard to crash on load
this [commit] prevents adding a view with no actionID

Fix:
added a default value of False to add_to_dashboard actionId
only display the option to add_to_dashboard for views that have actionId

opw-2965036

[commit]:https://github.com/odoo-dev/odoo/commit/7180d948f084d4f68d1660cb884c95aaf41288fa

closes odoo/odoo#106093

X-original-commit: ff926a5b4390b38db339440c18dd2d5380df7d61
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-18 19:42:14 +01:00
Walid HANNICHE (waha) 49454df4fd [FIX] website_event: display ticket description correctly
Steps to reproduce:
 - create an event with a single ticket that has a description

Bug:
 The default quantity on the website is set to 0 where it should be 1

Cause:
 On this commit[1] adding description to a single ticket was done by
 applying the multiple tickets layout but this also sets qty to 0

Fix:
 removed the condition and added the description to the single ticket

opw-3018139

[1]:https://github.com/odoo/odoo/commit/9c4c953d004acaf916df348b670182b48b85d165

closes odoo/odoo#105819

X-original-commit: e9ab599113125bd55fdfd2e3d95f71f52e001660
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-15 22:06:15 +01:00
Walid HANNICHE (waha) 23c8ee0532 [FIX] sale_coupon: move global coupons to the end of the SO
Steps to reproduce:
 - Install website_sale_coupon
 - Load demo data
 - Create a promotion program that applies on the order
 - Go to the webshop and add 2 different products to the cart

Bug:
The line of promotion is in second place, instead of at the end.

Fix:
move the old sale order line to the end if it applies on all the order

opw-2985632

closes odoo/odoo#105517

X-original-commit: 48d20d44cf08fee411411665013fdaca72bf39c3
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-09 23:33:27 +01:00
Walid HANNICHE (waha) 030a8c8f02 [FIX] web: parse numebr (separator not set)
Steps to reproduce:
- select a language where thousands separator is not (e.g. portugese)
- try editing any number input field

Bug:
 error when parsing the new value when thousands separator is not defined

Fix:
 fixed default value (only fallback to commas if it's not the decimal
Point separator)

opw-3041135

closes odoo/odoo#105312

X-original-commit: 71712acdf259aca7745a8a0b41a022d3abdcb047
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-08 14:40:06 +01:00
Walid HANNICHE (waha) 6839d21f3c [FIX] web: time picker should always be LTR
Steps to reproduce:
1-set language to an LTR language (arabic / hebrew...)
2-select any field with the date-time range widget (eg: planning>add)
3-the hour and the minute selection is reversed.

Bug:
the hours and minutes order depends on the language orientation where
they should always follow this format HH:MM

Fix:
force the time to be displayed Left To Right regardless of language

opw-2953221

closes odoo/odoo#105255

X-original-commit: 8d396fd8800baf29a9242987b610e3bb7b9da265
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-08 08:44:14 +01:00
Walid HANNICHE (waha) a961a52f88 [FIX] website_sale: display error if cart updated before payment
Steps to reproduce:
- on Ecommerce website Add an item to your cart.
- Billing/Shipping info > Stop on Payment page.
- Duplicate tab, On the duplicate, add more products to your cart.
- Go back to the original tab (Payment page) > Check out with Stripe.
- Stripe acquirer page does not reflect the updated cart amount.
- Complete payment > Website will say order is confirmed.
- Go to this SO in backend

Bug:
SO is not confirmed and Stripe status says there is a mismatch
because it did not take updated amount.

Fix:
double check the ammount before processing payment

opw-2978244

closes odoo/odoo#105060

X-original-commit: be9d2a57c4628fc867aefc932aaf8c503e76b60f
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-04 19:47:03 +01:00
Walid HANNICHE (waha) fd17d80efd [FIX] mrp_account: include time effeciency in bom price
Steps to reproduce:
- set time effeciency of a workcenter to less than 100
- on a product page with a BoM using that workcenter
- for the cost click on compute price from BoM

Bug:
workcenter effeciency is not taken into consideration

Fix:
included time_effeciency in computing the expected duration
addepted tests to take it into consideration aswell

opw-3033672

closes odoo/odoo#104566

X-original-commit: 1dcd9dbef0a5e6d9bd2c5e52a42cff9aec98f1d0
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-10-28 22:44:49 +02:00
Walid HANNICHE (waha) d0d7dbb00d [FIX] base_address_extended: enforce city in "Contacts & Addresses"
Steps to reproduce:
-Install "base_address_extended" module ("base_address_city" in 15.0)
-Go to an already existing contact.
-Add a new address to this contact.
-Use a country that enforces cities (contact>configuration>countries).
-No drop menu for cities is displayed.

Bug:
unable to select all the city fields in the inherited XML views

Fix:
selected the correct city fields

opw-2960154

closes odoo/odoo#103775

X-original-commit: 829541fa509f84cf4c8b0e22181770267a3e6e59
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-10-21 17:17:07 +02:00
Walid HANNICHE (waha) bfe5268ba2 [FIX] web_editor: UI freeze on RTL languages
Steps to reprodue:
- enable any rtl language (arabic)
- move to the product page for exemple
- the page is frozen (dependecy loop in css)

Bug:
when the CSS gets minified the missing semicolon error spreads and
produce an invalid file

Fix:
added the missing semicolon

opw-3019173 3032064 3032250 3035077 3034712 3035077 3023730 3022962

closes odoo/odoo#103699

X-original-commit: 8048bdac4cec56edd92c68f7041b802376f9372c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-10-21 00:08:41 +02:00
Walid HANNICHE (waha) 6c903ddf53 [FIX] point_of_sale: group split taxes on product info
Steps to reproduce;
Create a tax with two accounts that take 50% each.

Bug:
In the info tab on the pos of a product with the tax
the tax will show as two lines.

Fix:
group taxes with the same id

opw-3006360

closes odoo/odoo#103365

X-original-commit: 860103130fd5de880d9b179f5e1218107f4be0de
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-18 13:17:16 +02:00
Walid HANNICHE (waha) 82265c52ca [FIX] tools: fix underline and italic in logged notes
Steps to reproduce:
- in any app log a note using full composer
- add styles to the text (underline, strike-through, italic)

Bug:
styles except bold are removed

Fix:
added missing styles to the whitlelist

opw-2956374

closes odoo/odoo#102056

X-original-commit: eb07ab104d5f47574e14db811108a7d0cbbbe4b2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-04 16:01:06 +02:00
Walid HANNICHE (waha) 3d16470717 [FIX] website_sale: prevent adding empty fields
Steps to reproduce:
1- install eComerce app and activate debug mode
2- go to Website > Configuration > Websites
3- on a website product page extra fields tab add an empty line and save
4- visit any product page on the website (500: internal server error)

Bug:
adding an empty field crashes the website server on the product page

Fix:
made the field required

opw-2945621

closes odoo/odoo#100541

X-original-commit: c00fd50ef59030848a7f7dbfff4c0ff90645cc26
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-19 21:58:07 +02:00
Walid HANNICHE (waha) e22925d59e [FIX] account: fix resquence with empty journal name
Steps to reproduce:
- Accounting > journal entries > misc
- add entries (draft) with empty journal name
- resquence those entries with entries that have names

Bug:
calling min or sort on the names fails when some are strings and others
are bools (False for empty strings)

Fix:
replace names that aren't set with an empty strings

opw-2957750

closes odoo/odoo#99772

X-original-commit: 0f90852818a334d66ed8a6781f5abdc022f76ff7
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2022-09-19 10:29:51 +02:00
Walid HANNICHE (waha) b8aca9dc5b [FIX] website: prevent favicon removal to crash
Before this commit, when one would remove the favicon of a website in
the settings it would crash.
This is because since [1] the introduction of `base64.b64encode()` in
the `_handle_favicon()` method make it crash with `False` value.

Steps to reproduce:
- Settings > website
- Delete favicon

[1]: https://github.com/odoo/odoo/commit/6b8752604898bf2b583b7f5334e35f6a1583595e

opw-2958836

closes odoo/odoo#100399

X-original-commit: 35ce152d7e5c50cb363c0fa7adecf174fede9e46
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-17 00:51:59 +02:00
Walid HANNICHE (waha) 0ff9b82ee6 [FIX] website_sale: add to cart (image too large)
Steps to reproduce:
1- enable "add to cart" feature on the website shop page
2- add any product to the cart
3- the image is way too large

Bug:
the animation creates a clone of the original image on which new css
classes has been added (h-100 w-100) that sets the image to full size

Fix:
since the CSS atribute of the new image are set in the function removing
all the classes of the original image solves the issue

Note:
the bug only started on 15.2 where the new classes have been added
merging on 15.0 just to prevent future issues

opw-2952608

closes odoo/odoo#99184

X-original-commit: 90911266403cd6157f61e8123b24dcdf3ecd98f4
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-30 08:19:09 +02:00