Commit Graph
100 Commits
Author SHA1 Message Date
Florent de Labarre 0f0a9845fc [FIX] mail: bounce incoming email with catchall email and other unroutable emails
How to reproduce
- Send an email to catchall@exemple.com, random@exemple.com
(Note : random@exemple.com is an email witch does not exist)
--> Issue the email is not bounced

To justify the change, this was actually the behavior a while ago, prior to odoo-dev@68a457e
The intent of that commit was to consider other possible routes, so this commit
doesn't contradict the change.

Task-3714565

closes odoo/odoo#161782

X-original-commit: df0c05afbf81ce41c9b1b4cfe93476d4ca397749
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-04-15 14:09:45 +00:00
Florent de LabarreandLaurent Smet 704b5b250f [FIX] account: analytic_distribution is not reversed
Create an invoice with analytic_distribution.
Go to account.move.line, select the line with analytic_distribution, click on action 'Move account'
validate
--> Issue the analytic_distribution is not reversed

closes odoo/odoo#161394

X-original-commit: e7f5bfc6a685ec9809c13290d1432888c3aad47c
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Co-authored-by: Laurent Smet (las) <las@openerp.com>
2024-04-11 09:50:47 +00:00
Florent de Labarre 7f947871f0 [FIX] base: logger show cron done even if it is not done.
The logger show "Job done" before the flush. But if during the flush an
error appear (sql constraint, validation error during computed field,
...), the log contain "Job done", but is not True.

The time to compute the cron is not good because it doesn't contain the
flush time.

closes odoo/odoo#161204

X-original-commit: 0cde9c7238ece225ebd50c50f4a78d16ac6b5226
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2024-04-10 09:44:14 +00:00
Florent de Labarre af096f3ecf [FIX] account: add index
Before this commit the time to unlink an account.move can take lot of time (60s on large database).

closes odoo/odoo#161172

X-original-commit: 73c1fdd192577bba56dcad213d8a22de8b5de06f
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2024-04-10 09:44:13 +00:00
Florent de Labarre 7cb9e96f86 [FIX] stock: in multi company env the product type can be changed.
Without sudo, an user in a company can change the type even if somes not done stock.move.line exists.

closes odoo/odoo#160856

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2024-04-08 09:27:29 +00:00
Florent de Labarre 7ead7f5b66 [FIX] sale: tree view is not available
Before this commit, it is not possible to export sale.report by excel or show the lines.

closes odoo/odoo#159793

X-original-commit: 5d8830cb34f3d34ddc907ad245a4312b18c5c1cf
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2024-03-29 12:38:07 +00:00
Florent de Labarre 8a985113d8 [FIX] base: prevent random ordering
Before this commit, ir.actions.report can be randomed orderer.

closes odoo/odoo#157616

X-original-commit: 1a2b83d8a4fc956e07d6009eb7fc308eb16eedd2
Signed-off-by: Raphael Collet <rco@odoo.com>
2024-03-15 15:28:02 +00:00
Florent de Labarre 7090d14152 [FIX] account_payment : don't copy the journal
During the copy of provider if the journal is set, it create a new account.payment.method.line, and if you change the company of the new provider you have an error when you try to create a new journal.

closes odoo/odoo#157767

X-original-commit: 0357c9ec749d893ba1d7913903fd0c45df400662
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2024-03-15 10:43:55 +00:00
Florent de Labarre 3789a944ac [FIX] website_sale: internal user cannot go to shop page
- Create a company A with a ebsite
- Create a company B without website
- Create user 1 in company B only
--> Issue when user 1 go to /shop --> error 403

Due to security restrictions, you are not allowed to access 'Companies' (res.company) records.

closes odoo/odoo#150529

X-original-commit: be5bf24234955a4f9ccc044482b71ab37a44b8b0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2024-01-23 22:51:59 +00:00
Florent de Labarre 05be66a416 [FIX] mail: time to unlink record is so long
In large database, the time to unlink a sale.order (or any record with mail.thread) can be take 1 seconde.

After it is so fast.

closes odoo/odoo#149296

X-original-commit: 6bd9f408a18c019416b5bd981de50b54432f5690
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2024-01-16 13:15:21 +00:00
Florent de Labarreandvava-odoo 1c91d51445 [FIX] delivery: prevent useless write
Before this commit when you unlink a sale.order.line the field carrier_id of sale.order is set False for each delivery line.

This commit prevent also serialisation failure on ecommerce.

closes odoo/odoo#143533

X-original-commit: c9fe8d113deb8103ad531d999f75f74c5475f46e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: vava-odoo <112173839+vava-odoo@users.noreply.github.com>
2023-11-25 04:36:01 +00:00
Florent de Labarre 0bf36e107a [FIX] mrp: add index
Before this commit in large database, the time to unlink some lot can take lot of time.

closes odoo/odoo#142105

X-original-commit: 654ee5c54db6d2cdf7a9d6797899d25a5b156059
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-15 11:26:13 +00:00
Florent de Labarre 96e3f27424 [FIX] mail: show correctly qweb error
Before this commit it is impossible to find the qweb error when you preview an email template.

closes odoo/odoo#139668

X-original-commit: 1f373de5f218a1f43015f4f80e60d1da0188d6b5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-25 19:37:25 +00:00
Florent de LabarreandMiquel Raïch eee455e799 [FIX] account: fpo map account is not used
Before this commit, the fiscal position is not used to determine account.

closes odoo/odoo#135559

X-original-commit: 57f71fa2666af591a8d3d28af65fcfab8a7d3785
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Co-authored-by: Miquel Raïch <miquel.raich@forgeflow.com>
2023-09-15 09:22:08 +00:00
Florent de Labarre d052fc27af [FIX] account: don't allow unlinking payment method lines used on non-accessible payments
In case of the user have no access to all account.payment, the record can be deleted.

closes odoo/odoo#135415

X-original-commit: 5086b39e44230a14a6c1c65bde4851f062f10e38
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-14 11:22:54 +00:00
Florent de Labarre 52af5b6d0a [FIX] im_livechat: bad coping of chatschript
Before this commit when you copy a chatbot script, the triggering answer are mixing.

- Create a chatbot
- Create a line A - question ligne with one response 1
- Create a line B - type text
- Create a line C - type text
- Save
- Invert line B and C
- on ligne C add response 1 in triggering answer
- Save
- Copy the script
--> Issue the response 1 in triggering answer is now in line B

closes odoo/odoo#134565

X-original-commit: 118a065e38d6fd73a49cfd52ec4693808bfc11d1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-06 22:40:23 +00:00
Florent de Labarre c7ca317d59 [FIX] account: fin tunning of https://github.com/odoo/odoo/pull/128420
Before this commit there are no rollback if raise.

closes odoo/odoo#131490

X-original-commit: 0015662d166f5e07bcbd6c5e9e14f8837ffa58a3
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-10 10:39:38 +02:00
Florent de Labarre 89bbc419f2 [FIX] payment_ogone : cardholder name is not send
In V14, the cardholder name is send, but not in V16.

closes odoo/odoo#130545

X-original-commit: b8d7d1a619c76e3ce0a50e9fc9251a33fc8ca52b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-08-02 17:29:39 +02:00
Florent de Labarre 2855884f8d [FIX] l10n_fr_fec : can be downloaded by unallowed user
By RPC an other user in other company can access to an other fec.

closes odoo/odoo#125435

X-original-commit: 857f2e026dd9e4307adda786e2745aa7cb36a2c3
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-06-19 10:40:54 +02:00
Florent de Labarre 03b37ffc5c [FIX] im_livechat: countries no correctly show
Before this commit in the livechat comfiguration page the countries of rule doesn't appear correctly.

closes odoo/odoo#123511

X-original-commit: 4208da6133d583c47c2e77112dfc7c0c506ad837
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-02 23:38:47 +02:00
Florent de Labarre 4382e003fd [FIX] sale: paylink does'nt work
if partner_id is diff than partner_invoice_id on sale.order.

https://github.com/odoo/odoo/blob/16.0/addons/sale/controllers/portal.py#L346

- go to runbot
- create a sale.order
- set partner_invoice_id != partner_id
- create a link
go to the link --> error

closes odoo/odoo#121905

X-original-commit: 811ed2fb763155abbaba29e8c9193166a9cc34cc
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-22 13:54:13 +02:00
Florent de Labarre c5d583ca35 [FIX] website_livechat: prevent DB usage after migration
In V16 visitor are unlinked after 60 days https://github.com/odoo/odoo/blob/16.0/addons/website/models/website_visitor.py#L351 (in V14 it is archived). After a migration a large database should unlink lot of visitor.
Before this commit the time to unlink are very long (some days).
After some hours.

closes odoo/odoo#120666

X-original-commit: e860db01341a3f4447b5c4cd61fe771e3a224ade
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-08 17:10:50 +02:00
Florent de Labarre ba785f0a2e [FIX] website_sale: show correctly the acquirer name
Like here https://github.com/odoo/odoo/blob/14.0/addons/payment/views/payment_templates.xml#L69, if the acquirer have display_as, it is more logical to shpw everywhere this field.

closes odoo/odoo#119526

X-original-commit: 2b80e84d29346b7d672e42ffb1dd7a3804388f04
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-04-25 07:37:51 +02:00
Florent de Labarreandvfe-odoo c7f4f907f8 [FIX] website_sale: redirection to shop if no transaction doesn't work
In V14 this case is managed : https://github.com/odoo/odoo/blob/14.0/addons/website_sale/controllers/main.py#L1075

closes odoo/odoo#119503

X-original-commit: 01fe517010ff33d9e5665bd9633d0365b2c3e6d5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: vfe-odoo <Feyensv@users.noreply.github.com>
2023-04-25 06:39:44 +02:00
Florent de Labarre dc13a614c4 [FIX] stock: add index
Before this commit, in large database, openning a sale.order can take 3s.
Because in module sale_purchase_stock, _get_purchase_order use a On2many field : stock_move_ids, with inverse field group_id.

Now it takes 200 ms.

closes odoo/odoo#117738

X-original-commit: 5fc448e7f6dcce94fb89b23be29c4d38a525dd97
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-05 16:26:23 +02:00
Florent de Labarre 4c8b8347a1 [FIX] point_of_sale : add index
In large database, to compute picking_count on orders and sessions, can take lot of time.

closes odoo/odoo#115469

X-original-commit: 59d3377e0631810d01e8637f56d52258f7cb87cc
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-20 16:51:12 +01:00
Florent de Labarre 1e48332176 [FIX] account: portal user can show not finished invoice
- Create an Order, send to customer
- Create an invoice from this sale
--> Issue the customer can show the invoice in draft mode
This prevent customer to print a draft invoice with wrong value.

Only show send invoice.

closes odoo/odoo#114765

X-original-commit: 687f479297fcaa047cd26a34883e7de11b3d3dea
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-03-09 15:54:55 +01:00
Florent de LabarreandJohn Laterre 50cf4a75ce [FIX] account: prevent wrong hash result
In case of the user have no access to all account.move, the hash result can be wrong.

Before this PR a user with limited access can print this report.

closes odoo/odoo#112970

X-original-commit: 8263b210ea980539941ce10f5c102c9056959b72
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Co-authored-by: John Laterre (jol) <jol@odoo.com>
2023-02-17 14:09:54 +01:00
Florent de Labarre caea280566 [FIX] account: can't get previous move
In case of a user have no access to all account.move (restrict by ir.rules). An exception can raise during move posting.

Add an index to speed up this function in large database.

OPW #3159258

closes odoo/odoo#112081

X-original-commit: 5b95336470efc7b92289936c29cf561ba5fb7f66
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-02-07 13:34:55 +01:00
Florent de Labarre fdaae9f101 [FIX] account: prevent change restrict mode hash
In case of an user can edit account.journal and have no access of all account.move of this journal, the user can set to false this field : restrict_mode_hash_table.

closes odoo/odoo#112028

X-original-commit: c1bcf20a4c58516e484417885f47e32a8c192dc1
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-02-07 08:40:49 +01:00
Florent de Labarre e2a4df4bfb [FIX] website: don't translate exemple of rule
- Install website and set in French
- in the robot wizard you see:
Exemple de règle :
Refuser : /web/login
Autoriser : *

closes odoo/odoo#110911

X-original-commit: 10e50eeeb4c3c83da2c671bd600561679fdacd44
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-01-25 11:16:46 +01:00
Florent de Labarre c2adc51cd9 [FIX] sale_purchase: raise if currency are not the same
- Create un SO in EUR with a product with service_to_purchase, with supplier A
- Supplier A work in USD
--> Confirm order
Issue fields.datetime.now() doesn't exist.

closes odoo/odoo#110795

X-original-commit: 02813802a429570a05cf5ad1402408b2e3d01e99
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-24 10:21:01 +01:00
Florent de LabarreandWilliam Braeckman e8a3e9319a [FIX] website_sale : don't hide Send quotation
A customer start an order on website
A few days later the back office call the customer to finalize the order. And try to send the quotation.
--> Issue the button "Send Quotation" is remplaced by "Send a Recovery Email"

closes odoo/odoo#71333

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Co-authored-by: William Braeckman (wbr) <williambraeckman@yahoo.fr>
2023-01-20 20:57:53 +01:00
Florent de Labarre 29d4179c71 [FIX] l10_fr_fec : multicompany error when fetching unaffected earnings account
- create a company A
- create a company B with French accounting
- Select A and B in the company selector, with B being the active company
At export, the A's unaffected earnings account can be used instead of B's.

closes odoo/odoo#109421

X-original-commit: 17a7390ad8cd0b09ccad609febc9ccb0bea1aa3a
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-09 14:24:26 +01:00
Florent de Labarre 4e98f9902c [FIX] stock_account: method doesn't wok with a recordset
If you try to get show_reset_to_draft_button for more than one account.move, it can raise.

closes odoo/odoo#107169

X-original-commit: a5b985e8449a1e858c3fb9a0a90a6d203e16f739
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-12-05 10:07:58 +01:00
Florent de Labarre ab1e076224 [FIX] purchase, stock : datetime is not correctly converted in date
With this commit datetime of stock move are correctly converted with the current timezone.

closes odoo/odoo#106886

X-original-commit: 242da76b2763d5add36da6e23d4b1f7e640c72aa
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-30 19:05:53 +01:00
Florent de Labarre 44c407da3c [FIX] stock: impossible to search correctly location
Before this PR Odoo don't pre-search on location.

closes odoo/odoo#106680

X-original-commit: 55729e2bfb402e5af6569c8dd19ee8495fa244a9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-28 15:53:20 +01:00
Florent de Labarre 45b2017004 [FIX] website_crm : impossible to add a crm form
In large database with lot of user, the browser don't respond.

closes odoo/odoo#106640

X-original-commit: 0f597b3a9c4110d2984000c21564cc95e61491c4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-11-28 00:25:44 +01:00
Florent de Labarre ebc118ee19 [FIX] loyalty : don't raise if user have not access to all reward
Before this commit it is possible to archive a product if the current user have no access to all reward (multi company rules).

closes odoo/odoo#106574

X-original-commit: 5bafee8d0479367fd25b2fa2daefd4374ab38211
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-25 18:55:49 +01:00
Florent de Labarre 38ff430f20 [FIX] mrp_subcontracting: sql crach
In large database, if you try to get all subcontrat quant you can crach postgres with a big query.

closes odoo/odoo#106543

X-original-commit: aa104980d483efef087198dc5bb70ec63a47ed7e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-25 17:56:57 +01:00
Florent de Labarre 1f3cda12bd [IMP] base: remove unused index
On database with 5 million attachaments, the index of checksum is 250 Mo, but this field is never used to search.

closes odoo/odoo#106253

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-11-24 13:28:44 +01:00
Florent de Labarre e2fe70495a [FIX] point_of_sale : wrong api
Before this PR when you select a pos.payment in custom, it raise.
It doesn't make sens to use api.model here

closes odoo/odoo#104615

X-original-commit: 2abeb8cc5b015263ce49d765315712f92ec25c25
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-31 14:34:02 +01:00
Florent de Labarre e8c3d9f0c0 [FIX] website_sale: time to unlink order.line
Before this commit, in large database the time to unlink is very long.
Before 500 ms after a few ms

closes odoo/odoo#96236

X-original-commit: c17e0a6702e58ba784c70bdb04f6a455e6d5b727
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-07-18 19:56:04 +02:00
Florent de Labarre ff018c674e [FIX] sale: button are executed with active_test = False
Partial Rev of https://github.com/odoo/odoo/pull/83669/commits/75979217d23a47e8484f95e3ee4721e501edfd10

Open a contact
Click on sale
Create an order
Click Confirm

--> active_test = False is in the context

closes odoo/odoo#85533

X-original-commit: 4235d4b96cf8f4c10bbbf24f104a555638109f56
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-02-28 19:35:38 +00:00
Florent de Labarre 395d150fc7 [FIX] website_sale: copied line is linked with the original order
- Create a sale.order with a product with an optional product
- Confirm order A
- Copy this order A, a new order B is created
--> Issue: the new line of order B are linked with an line of order A

closes odoo/odoo#84523

X-original-commit: 3d987fb55c74ea726a984f3091ff8ac565550172
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-02-14 13:06:39 +00:00
Florent de LabarreandNicolas Lempereur ade02c9b73 [FIX] sale : Show SO with archived customer (reimplementation)
This reverts commit f22364c32ac1438ededd611578b64a69186d7c9c.

- go to a partner
- click on the button "Sale"
- Create a new order
--> Issue you see all product archived (and all the python logique run
    with active_test = False)

Since the original issue would be reintroduced, this commit apply the
active_test:false only if the search field partner_id is used.

closes #83600

closes odoo/odoo#83669

X-original-commit: 825bb5f770f3abccadd3db3c4a57b25c3d9c35ed
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo>
2022-01-31 13:58:14 +00:00
Florent de Labarre 1bfa35d831 [IMP] web: show technical name in export view
Like in debug mode on optional field on tree view, show technical name on export view.

closes odoo/odoo#73898

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-01-27 11:07:04 +00:00
Florent de Labarre eb0c5f2566 [FIX] auth_totp: "Disable TOTP" only available in list view
The action server is only available on view list. It is hard to find this.

closes odoo/odoo#83455

X-original-commit: 2fa29557d048e43bc9ed0a9fc9047de203b0c4f0
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-01-27 07:03:03 +00:00
Florent de Labarre 7088851cad [FIX] sale_purchase: copied purchase is linked with the SO
- create an SO with dropshipping, confirm. It create a PO 1
- copy PO 1
--> Issue PO 2 is linked with the SO

closes odoo/odoo#82902

X-original-commit: d56f94d7db59f1228ec90ab0e8ab1e89f3a663e7
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-18 11:02:06 +00:00
Florent de LabarreandRaphael Collet 09985fd42a [FIX] stock: Exception are not correctly logged
Il during the scheduler an exception append, the error is not correctly logged.
This PR allow to catch the error with logger analyser (like sentry).

closes odoo/odoo#82648

X-original-commit: c68e1d1c13d116bda6b91fcbbcd61a26739a9894
Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2022-01-12 15:49:20 +00:00
Florent de Labarre 29b1ecb416 [FIX] base_automation: impossible to execute an action with unlink
- Create two record with state == 'one' and with activities
- Create an automated action if state == 'two' then record.sudo().activity_ids.action_done()
- Set state == 'two' in same time of two record

In the loop line 261, for the first record self.action_record_id is in cache, but for the second record it is not in cache because of the unlink made by action_done(). When the orm raise during put in cache because he have no access to self.

closes odoo/odoo#82574

X-original-commit: 2207d8adbd37c6758f350cced68f285f8960c3aa
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-12 13:10:57 +00:00
Florent de Labarre 800295a6b8 [FIX] base_automation: error not correctly show
If an error append during an automation made by a standard user, the error is not correctly show.

closes odoo/odoo#82591

X-original-commit: d76d896400016f4ec504b34e113d5f42951970a1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-01-12 08:33:05 +00:00
Florent de Labarre 572a7117b2 [FIX] point_of_sale : impossible to open the pos
- Create a TAX A and TAX B
- Create a fiscal position, and TAX A in scr and TAX B in dest, and add other tax map
- Use this fiscal position in POS
- A month latter unactive TAX B (because the law have change).
--> You have an issue during opening the pos

closes odoo/odoo#81427

X-original-commit: 7471f13264d7002bd5570b5008565d3cc84042e6
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-20 10:49:39 +00:00
Florent de Labarre d8d67f470e [FIX] point_of_sale : allow edit to amount on done payment after reload
When you reload the pos (F5), this.payment_terminal is undefined.
And you can update the amount even if the payment is done.

closes odoo/odoo#81546

X-original-commit: 2e10f33511ced41f296e0f65d2d042f4e041cacb
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-17 09:18:00 +00:00
Florent de Labarre 9136c564e6 [REM] core: remove unused file and prevent spam
Was used at the beginin of the migration to github with commands such
as "git log --use-mailmap" but now, everybody use a proper email
address.

closes odoo/odoo#80431

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-13 07:22:58 +00:00
Florent de Labarre b88e1ee3a3 [FIX] l10n_fr: add missing line 20 for TVA EU
According to https://www.impots.gouv.fr/portail/files/formulaires/3310-ca3-sd/2018/3310-ca3-sd_2076.pdf, for TVA EU you should also add the value of the tax in the line 20.

closes odoo/odoo#80818

X-original-commit: 8406e25ff20224f9d169233d39d2cdf6f85c5507
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-12-03 08:11:50 +00:00
Florent de Labarre a805e0cf53 [FIX] point_of_sale : impossible to reversea paiement after reload
1. add an electronic payment, send it
2. you show "reverse paiement"
3. reload the POS
4. go back on the payment
--> Issue "reverse payment have disappear"

closes odoo/odoo#80283

X-original-commit: 0816dbd99ad8a394542057aab9618a5504c68e64
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-23 18:34:54 +00:00
Florent de LabarreandJoseph Caburnay caf7eb2090 [FIX] point_of_sale: singleton error
Issue 1: fix singleton error if open pos session en batch
Issue 2: in large database to search all pos.session to get just one

closes odoo/odoo#80277

X-original-commit: 63500d6357f6f27724d1cda44db071aba968515a
Signed-off-by: Masereel Pierre <pim@odoo.com>
Co-authored-by: Joseph Caburnay (jcb) <caburnay.joseph@gmail.com>
2021-11-23 18:34:50 +00:00
Florent de Labarre 49a23bb3fa [FIX] base: simplify field dependencies to avoid costly invalidation
Consider upgrading module 'base' on a database with millions of 'res.partner' records.
The upgrade of country and country state data makes a very costly search to reverse
the dependencies of the non-stored computed field 'contact_address', just for the sake
of invalidating its value from cache, which is most probably not present at all.  The
cost of the search is so high that it may prevent from upgrading the module (timeout).

closes odoo/odoo#80251

X-original-commit: b7f9d0b7c3dfbca0f4897a650983a298da811ce1
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-11-23 13:55:01 +00:00
Florent de Labarre c5b72fa895 [FIX] sale: dont't show section/note in report
- Create sale order with section and note
- Go to Sale Analysis
--> Issue : you see count of section and note

closes odoo/odoo#79975

X-original-commit: 42920592028c6a66bab333b8a4a12b8305734dca
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-11-17 18:16:08 +00:00
Florent de Labarre 2997249ff0 [FIX] point_of_sale: impossible to close session
- Open session with cash control
- Set 300 €
- Close session
- Add Cash 50€
- Close session
- Set end Cash at 350 €

--> It raise an error

closes odoo/odoo#79240

X-original-commit: 3be9a02b8824356d97d442b64f2cbd66085254ea
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-02 09:58:58 +00:00
Florent de Labarre d9300962c1 [REF] base: add _is_public on partner
To be use in mail, ... and prevent issue with archived partner

closes odoo/odoo#70665

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-29 14:07:43 +00:00
Florent de Labarre a8ec7ddcb0 [FIX] mrp_subcontracting: clarify which product to specify SN
In case you use products with variants or internal references, display_name is more specific than name.

closes odoo/odoo#79191

X-original-commit: c46328315a8db2f579329a8a44c23fd4769e7d44
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-10-29 11:54:28 +00:00
Florent de Labarre d5f855be9e [FIX] product: same price with different pricelist
- Create a report to show price on each template
--> Issue: The price is the same

closes odoo/odoo#78870

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-10-28 10:51:57 +00:00
Florent de Labarre a6eb536430 [IMP] stock: add index on the serial name
In large database with unique serial number. The index add performance.

closes odoo/odoo#78087

X-original-commit: ccefa18bb2873412e6b0ac9e0f5e61ac82ccc51e
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-08 17:16:15 +00:00
Florent de Labarre fbf5217cb7 [FIX] stock: picking is merge if transit in other addresse
- create Tree warehouses, WH1, WH2, WH3, with three different address
- add route 2-1 to resupply WH2 from WH1, complete partner_address_id on rule with partner_id of WH2
- add route 3-1 to resupply WH3 from WH1, complete partner_address_id on rule with partner_id of WH3
- create a product
- add orderpoint, WH2/Stock with route 2-1 and min_quantity to 1
- add orderpoint, WH3/Stock with route 3-1 and min_quantity to 1

Lauch scheduler.
Issue:
You have 1 out picking of WH1, with qty = 2. It doesn't make sens because WH2 and WH3 have not the same address.

With this PR, 2 out picking are created.

closes odoo/odoo#77151

X-original-commit: 26833a045e48a88bbc41857110f310acd4fa5335
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-28 08:07:46 +00:00
Florent de LabarreandThibault Delavallee a8518ae75d [FIX] mail: handle parsing of void body in incoming emails
When body does not contain any tag or content parsing currently fails
with an ``lxml.etree.ParserError``. To avoid that we can improve condition
about void body: stripping void characters allows to avoid that traceback.

Task-2641572
PR odoo#76159
Closes odoo#75625

X-original-commit: 708fe3e74991c144a05c6bdcafa1931672e36ce9
Part-of: odoo/odoo#77005
Co-authored-by: Thibault Delavallee <tde@odoo.com>
2021-09-22 19:25:54 +00:00
Florent de LabarreandThibault Delavallee 1ca67905b4 [FIX] mail: handle wrong Final-Recipient header in incoming emails
Some emails are wrongly formatted mainly due to old servers. If Final-Recipient
header is void or wrongly encoded it currently crashes. This fix ensure there
is no crash, even if bounce detection could be incomplete.

Task-2641572
PR odoo/odoo#76159
Closes odoo/odoo#75618

X-original-commit: f437967a1fa4fca56c88e1cf79586805101ab712
Part-of: odoo/odoo#77005
Co-authored-by: Thibault Delavallee <tde@odoo.com>
2021-09-22 19:25:54 +00:00
Florent de Labarre 522cb20e77 [FIX] point_of_sale: pos is launched with all companies
- Activate multicompany
- In the company switcher select all company
- Launch a pos session
--> Issue all rpc request are make in all companies (len(self.env.companies) != 1). It create some error with taxes, fiscale position, ...

closes odoo/odoo#76522

X-original-commit: a553f86afc5e9ff3ddd58eb6b68ba7ff9cf936a5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-09-15 09:02:10 +00:00
Florent de Labarre 1e0150fd64 [FIX] stock : wrong quantity with transit location
- create a second warehouse, resupply from the first
- create a product, replenish W2 from W1
- Goto Inventory Forecast

--> Issue value are wrong.

An OUT is when WH source is Set and WH dest is not set.
An IN is when WH dest is Set and WH source is not set.

closes odoo/odoo#76129

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

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

closes odoo/odoo#75762

X-original-commit: b53ff03b5cf43c2cd23039b8192f4d90d47e11d2
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-03 14:30:22 +00:00
Florent de Labarre 99f6bf96ea [FIX] delivery: is_all_service is False if you have a section line
If you create an sale order with a section line you see the button add delivery.

closes odoo/odoo#75570

X-original-commit: 1db92688d9e7bf0843edfd248ffef89c38bb66f0
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-31 08:47:10 +00:00
Florent de Labarre 3d6ebbb55e [FIX] stock: impossible to set procurement group on order point
The field is not present in the view.

closes odoo/odoo#75502

X-original-commit: a392674a302b984b3a1e01a000717b4913403c38
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-08-24 09:46:06 +00:00
Florent de Labarre f21bd27a23 [FIX] point_of_sale : prevent error if you close/open POS
- create a new order
- add payment with payment terminal
- close POS
- Open POS
- Send the payment
When the payment succeed it raise. Because after a refresh this.payment_interface is undefined.

closes odoo/odoo#75373

X-original-commit: 3a822fa56f17e7bb5466507ec57588ab255ccdd6
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-08-20 10:24:14 +00:00
Florent de Labarre 9b3b295d28 [FIX] point_of_sale: impossible to print sale details
If you a user with only group 'group_pos_user' it is not possible to print the sale details.
Because during the compute_all of the taxe, account.account.tag need read access.
This PR allow 'group_pos_user' to print the sale details.

closes odoo/odoo#74749

X-original-commit: 9212ee2a79189802ae9a7cbc7a8446e71b2b215a
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-08-05 10:35:31 +00:00
Florent de Labarre e0f02cf438 [FIX] stock: date and float are not correctly show
In the popover date and float are wrongly formatted. This PR format date and float according to the user language.

closes odoo/odoo#74032

X-original-commit: a46f8d66965cce5759ca4af17c71b0aa18eda9ec
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-28 16:12:49 +00:00
Florent de Labarre a097d3530e [FIX] stock: bypass optionnal delay description
Fine tuning of https://github.com/odoo/odoo/commit/c7b32e0795bc1573d81563f31a75fa44c64b39c2

closes odoo/odoo#74361

X-original-commit: 59ac8d891de6e20604494d6cfc6fc357a88d226c
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-07-28 12:13:12 +00:00
Florent de Labarre a87c89d4ab [FIX] various: respect mail_post_autofollow previous values when adding it
Purpose of this commit is to avoid forcing mail_post_autofollow to True when
it is set to False. It eases inheritance and custom behavior.

Task-2612911
PR odoo/odoo#60792
2021-07-27 13:34:22 +00:00
Florent de Labarre bd9be9f061 [FW][FIX] survey: avoid retrospective computation
- Create a survey with passing score at 80 point
- Some user complete the quizz with 85 point, the quizz is "passed"
- If you update the passing score at 90, the quizz completed by user are now "unpassed".

This PR avoid to recompute quizz_passed.

closes odoo/odoo#74238

X-original-commit: d5355037545fb8366675b792f8cc5ed30ecca1bf
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-26 12:16:20 +00:00
Florent de Labarre 37a344582e [FIX] mail: prevent useless write
In database with frontend and live chat there are lot of bad query error.
bad query: UPDATE "mail_channel_partner" SET "write_uid"=5,"write_date"=(now() at time zone 'UTC') WHERE id IN (328111)

closes odoo/odoo#74193

Error: Could not serialize access due to concurrent update
X-original-commit: f10e04e0a3352acd3af80cb78b192eae17b98280
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-07-23 17:17:13 +00:00
Florent de Labarre 6cf1d464e2 [FIX] point_of_sale : translate error messages
closes odoo/odoo#73955

X-original-commit: 871d80c7631b3a47d2d3770cbe374b94731d25d0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-19 11:00:08 +00:00
Florent de Labarre 6fe1eaaa56 [FIX] point_of_sale : ticket is save in DB
If you use electronic terminal, electronic ticket is not save in database.
I you want reprint the ticket, electronic ticket is not present in the reprint ticket.

closes odoo/odoo#73919

X-original-commit: 08583840604e71f18f3b98b6dc8d4fa04f502689
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-16 16:51:29 +00:00
Florent de Labarreandvfe-odoo 002cac0701 [FIX] product: restrict deletion of used pricelists
Currently, pricelists can be deleted even if a pricelist rule uses this pricelist as base.
This leads to an error when the rule is used because it tries to access a deleted record.

This commit restricts the deletion of such pricelists, avoiding later tracebacks.

closes odoo/odoo#73907

X-original-commit: 8c3c7d9e85ca4353d3b8501cc5c484a3bd955754
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: vfe-odoo <Feyensv@users.noreply.github.com>
2021-07-16 15:59:33 +00:00
Florent de Labarre 9e1e0ebb02 [FIX] core: better error message on wrong related path definitions
Before this commit, if a related field's path definition contained a
non-existing field (either because of a typo or field removal) the ORM
would simply send a generic Python KeyError that didn't really help in
debugging.

With this commit, we raise our own KeyError stating which related field
has the wrong path definition and exactly which field within the path is
incorrect.

See test for an example.

closes odoo/odoo#31889

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2021-07-16 10:17:30 +00:00
Florent de Labarre d580c93aa3 [FIX] website_sale: remove always falsy condition
This code can't be reached, the condition can't be true anymore, as
`partner_shipping_id` is a required field.

closes odoo/odoo#72794

X-original-commit: 3857d27d54b3dc839376abf08de535626e3af850
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-06-25 13:14:27 +00:00
Florent de Labarre d6217a86a7 [FIX] point_of_sale : show reversed payment
- In POS with pos_six installed
- create an order
- add a payment with SIX, paid
- Click on reversed
- Pay in cash

--> Issue on the receipt the payment and refund by SIX doesn't appear on the ticket

closes odoo/odoo#73498

X-original-commit: 3e8d921318e86631b73c8c92c2e462fd0d761582
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-09 11:49:25 +00:00
Florent de Labarre d1a8dfeaec [FIX] sale: impossible to generate link if there are an cancel invoice
closes odoo/odoo#72449

X-original-commit: ea08c5a5f077ea991dfe6026f348434873b47bcd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-06-21 14:20:07 +00:00
Florent de Labarre 4a66f8059b [FIX] uom : hard to edit factor
In some screen it is very hard to edit the factor.

closes odoo/odoo#72309

X-original-commit: 2e2e588ec5bc1563312415eda75947d10902f060
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-06-17 15:44:06 +00:00
Florent de Labarre 43de70124c [FW][FIX] crm_livechat: do not set public user partner as lead customer usign /lead command
Before this commit, when you create a lead from livechat with the command /lead, the public user is used inside the lead.
Because the public user is archived, and self.env.ref('base.public_partner').user_ids return an empty recordset.

closes odoo/odoo#71792

X-original-commit: 04ff97e40e3869b1350dca325251747629443e69
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-07 08:17:22 +00:00
Florent de Labarre ee2ee1ee6d [FIX] l10n_fr_pos_cert: hash doesn't appear in ticket during reprint
- Create a pos order, pay and valide
- Close Pos
- reopen pos
- search this order
- click print ticket

--> Issue the hash doesn't appear on the ticket

closes odoo/odoo#71217

X-original-commit: 40adcce221ab882d034b2f4ed2987a234ba434f5
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-05-25 12:14:53 +00:00
Florent de Labarre 72a929d30b [FIX] mail: prevent useless write
In database with frontend and live chat there are lot of bad query error.
bad query: UPDATE "mail_channel_partner" SET "write_uid"=5,"write_date"=(now() at time zone 'UTC') WHERE id IN (328111)

closes odoo/odoo#71207

Error: Could not serialize access due to concurrent update
X-original-commit: 36a9e761c8d6c1c6e9611cc410ecca82ff2b1659
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-25 09:23:10 +00:00
Florent de Labarre c93dffc39a [FIX] mail: impossible to update image of partner on large database
On large database with million of messages made by one partner.
When you try to update the image of partner, it take lot of time (CPU time limit).

closes odoo/odoo#70786

X-original-commit: b44272a662468d164277b265d33ba6f46e631118
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-12 17:21:05 +00:00
Florent de Labarre 1e764eb2b2 [FIX] website : prevent bad query
In database with front end, there are lot of bad query like this:
bad query: UPDATE "website_visitor" SET "timezone"='Europe/Paris',"write_uid"=116,"write_date"=(now() at time zone 'UTC') WHERE id IN (15414)

closes odoo/odoo#70709

Error: Could not serialize access due to concurrent update
X-original-commit: d0db984990679a63714ca62e6b605d94af7d5c28
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-12 07:25:22 +00:00
Florent de Labarre 16a0427bc4 [FIX] website_livechat: error during closing livechat
During closing a livechat session an error occur :
_get_visitor_leave_message() got an unexpected keyword argument 'speaking_with'
Because argument 'speaking_with' is pass in this method https://github.com/odoo/odoo/blob/14.0/addons/im_livechat/models/mail_channel.py#L182, it should be operator.

closes odoo/odoo#70697

X-original-commit: 36866412483af80da812a38842e6df35b232190a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-11 15:41:19 +00:00
Florent de Labarre b6ad74e956 [FIX] stock : wrong float_compare
add the name of argument, if not precision_digits is used.

closes odoo/odoo#70242

X-original-commit: 2e7dfec50e9104adf8efbc64e0342359dc8947a7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-03 10:24:45 +00:00
Florent de Labarre a39db65c8c [FIX] website_sale : check mandatory fields
If a partner have two delivery address, one full filled, an other with missing
fields.

During the shopping (the first delivery address is auto selected), if the
partner go back in /shop/address to select the second address.

Then go to /shop/confirm_order, there no checks.

closes odoo/odoo#69901

X-original-commit: f8c8418bdd5b9d27b33fea3c63511297a231aa93
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-04-27 09:47:44 +00:00
Florent de Labarre d2202da97e [FIX] purchase: allow to archive cron
closes odoo/odoo#69862

X-original-commit: 1604f23afdb5c18d00147e25d0bc40cd0b57620c
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-04-26 16:14:57 +00:00
Florent de Labarre 5f6eaede31 [FIX] account_edi_facturx: wrong ID
To be compliant with the facturx, the name of invoice should be the sequence given by Odoo (ex : INV/2021/04/0001) and not the ref.

closes odoo/odoo#69663

X-original-commit: 41d323c5ca665098fe2e54a40bc11a8f26ce463a
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-04-22 10:31:39 +00:00
Florent de Labarre 145d48d23b [IMP] auth_signup : add hook to add custom fields
closes odoo/odoo#65276

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-01-29 21:35:14 +00:00
Florent de Labarre a2070262eb [FIX] website_sale_comparison: allow inherit ProductComparison
closes odoo/odoo#69532

X-original-commit: 365f5e755d105542adaf1fd5a70a2966ae6a209b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-04-20 11:18:16 +00:00