Commit Graph
53 Commits
Author SHA1 Message Date
Nicolas Seinlet 4d3331ba12 [FIX] 14.0 is no more supported with 17.0 release
closes odoo/odoo#147047

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-12-21 16:07:53 +00:00
Nicolas Seinlet 507cc6c017 [IMP] mail: improve blacklist search performance
When the blacklist table is filled with multiple thousands of records
searching the `is_blacklisted` field leads to a domain like
`[('id', 'in', [thousands_of_ids])]`. This can create a multiple megabytes
sql query.

Using inselect allows to avoid that issue.

Task-3328210

closes odoo/odoo#136089

X-original-commit: e00dce5edc1e4e0452a9add775ef46a1c993a17a
Related: odoo/enterprise#47677
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-21 07:40:08 +00:00
Nicolas Seinlet b2b370062f [FIX] stock_dropshipping: lack of picking type
Sometimes, no picking type match the domain, but picking_type_id is a required field.

closes odoo/odoo#97278

X-original-commit: afcad067bccc7676b4e40cc57f8d9b5792068802
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-08-02 10:32:07 +02:00
Nicolas Seinlet ea4e594b28 [FIX] account: restricted fields on notes
In 13.0, some account.move.line fields (amount_currency, debit, credit
and account_id) couldn't have a value when the line is of type 'note'.
Skiping them during line copy for notes is not an issue.

During 12.0->13.0 migration, we were facing issues with "grouped similar
invoice lines in a single move line", because this feature is not
available anymore in 13.0. To avoid any "loss of data" during migration,
we used lines of type note to create "missing" invoice lines in move
lines without altering accounting in any way. As a consequence, we have
13.0 databases with lines of type note having values for fields who
couldn't have ones.

closes odoo/odoo#64962

X-original-commit: 677edafeaf8d691764178f5e7e9639017b0249a8
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-01-22 17:12:07 +00:00
Nicolas Seinlet 55c6854ba7 [IMP] hr: filter record useless to compute
closes odoo/odoo#62864

X-original-commit: 3bd49935cf1dce39f8ee51378ad24f8b1666eac5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-12-04 09:33:54 +00:00
SEINLET Nicolas 5a03cc64d3 [IMP] website_visitor: avoid double indexing
unique constraint create an btree unbique index:
``` # \d website_visitor [...] Indexes:     "website_visitor_pkey"
PRIMARY KEY, btree (id)     "website_visitor_access_token_unique" UNIQUE
CONSTRAINT, btree (access_token)     "website_visitor_partner_uniq"
UNIQUE CONSTRAINT, btree (partner_id) ``` removing index=True avoid this
double indexing.

closes odoo/odoo#60120

X-original-commit: efb33e783bd04d542009ef0f57eba6a4aacbca65
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
2020-10-15 15:50:31 +00:00
SEINLET Nicolas 48ccbe67c6 [IMP] account: make sequence indexable
the search for sequence include a criteria `date_trunc('year', date) =
date_trunc('year', '2017-10-01'::date)` Which is translated by query
planner in `date_trunc('year'::text, date::timestamp with time zone)`.
As it's mutable thanks to the time zone, it's not indexable. Enforcing
the `without timezone` makes the query planner use an immutable
`date_trunc('year'::text, date::timestamp without time zone)`. As it's
immutable, it's indexable.

closes odoo/odoo#56244

X-original-commit: 70f671a32a504c6aa92fd19e38e6151c10b2325b
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-08-20 16:40:23 +00:00
SEINLET Nicolas 98f3363113 [IMP] account: avoid unnecessary call to account_get
closes odoo/odoo#56189

X-original-commit: 8209486c8bf6ee92dd2497d8ba99e20bea08fe75
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
2020-08-20 09:00:06 +00:00
SEINLET Nicolas 7814ffe845 [FIX] calendar: manage empty value for non required field
closes odoo/odoo#53668

X-original-commit: c59fcf3f04909e9797f7a6568dcf248988defb3d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-25 12:54:01 +00:00
SEINLET Nicolas ba20e42cc3 [FIX] sale_timesheet: ensure proper view inheritance
inherit the view which contains the items you're relying on.

closes odoo/odoo#52017

X-original-commit: 03dacc25ef46718a00fa7a1e0440813132600bfe
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-05-27 16:32:17 +00:00
Nicolas Seinlet 73c6863d3a [FIX] base_automation: avoid access right issues filter domains
If some filter domains use M2O to models current user cannot access,
using sudo() permit to filter even when user cannot access linked
models.

for the accuracy of the fix, add a unit test which reproduce the exact
reported bug.

closes odoo/odoo#44923

X-original-commit: 30e2153539643491fad889811a54a8e580fa9c58
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-08 18:55:15 +00:00
Nicolas Seinlet 3900619fdb [FIX] sale: "see own leads" user can invoice his sale order
closes odoo/odoo#43035

X-original-commit: f2231b3047f4c3a9ad3e481133fca62f9d056354
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-01-09 12:08:32 +00:00
Nicolas Seinlet 611b4ed95a [FIX] mail: fix activity view when having activities without type
At model level, activity_type_id is not a mandatory field on mail.activity.
Indeed required is added in views, meaning people could have activities
without type.

This make the activity views crash with `TypeError: 'bool' object is not
subscriptable` error when computing aggregated activity data. This commit
fixes that error.

Activities without type are still not displayed in the activity view as
columns are based on available activity types. It means activities without
type have no column to be displayed. As this is a corner case that should
not happen when using activities using the interface this is considered
as a limitation of current implementation.

closes odoo/odoo#42991

X-original-commit: 77f0dd8936df3dddfa3df8041d4b7f7c62595430
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-08 18:14:36 +00:00
Nicolas Seinlet d3171f2474 [FIX] sale: search on invoice_ids
some fields may depend on invoice_ids, which lead to a perf issue when
field is not searchable.

closes odoo/odoo#42950

X-original-commit: 53f363269c21eb6b2615d660f1c558c5a592e04b
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-01-08 14:09:39 +00:00
Nicolas Seinlet 6b751f12f3 [FIX] point_of_sale: permit accountant to change lock date
Accountant who change the lock date is not always a pos user, and then
cannot read pos sessions.

closes odoo/odoo#42156

X-original-commit: 8c6aa24525eca434b6f85b56c10c45b33cc05a43
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-12-17 11:10:30 +00:00
Nicolas Seinlet 0c695bd8ed [FIX] sale: Allow a salesman to invoice
closes odoo/odoo#41984

X-original-commit: 79b8c00f3e255b038bccad217acee608643558b2
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
2019-12-10 08:25:53 +00:00
Nicolas Seinlet 637c0fbc10 [FIX] website_blog: None is not iterable
return empty string instead of None to avoid `TypeError: argument of
type
'NoneType' is not iterable`

closes odoo/odoo#41772

X-original-commit: dd65c9fd7213f3d780a733e67390b2ae59f0f526
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
2019-12-12 09:00:48 +00:00
Nicolas Seinlet 7fc372a048 [FIX] stock: always prefix fields of sql views
If a module add a state field on another table used by this report,
PostgreSQL will report a:

```psycopg2.ProgrammingError: column reference "state" is ambiguous```

closes odoo/odoo#41350

X-original-commit: 16ae8aed10c72586a3a3e8b7484099263b0d7804
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
2019-12-04 12:35:47 +00:00
Nicolas Seinlet 0855f94181 [FIX] website_crm_partner_assign: force date format as format is forced in XML
https://github.com/odoo/odoo/blame/saas-12.3/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml#L674

closes odoo/odoo#35697

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-13 14:02:48 +00:00
Nicolas Seinlet 3af0b3387f [IMP] hr_recruitment: use search_count to count
closes odoo/odoo#35584

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-09 08:22:54 +00:00
Nicolas Seinlet 80fa405af5 [FIX] mail: message_unsubscribe takes 3 parameters
don't know why you try to use 4 parameters with a function that requires
3 of them:
https://github.com/odoo/odoo/blame/saas-12.3/addons/mail/models/mail_thread.py#L2283

closes odoo/odoo#34639

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-12 09:09:27 +00:00
Nicolas Seinlet 2d03ed43a5 [FIX] website: not setting domain is not empty domain
Previous versions of this action were setting a domain. Removing the
domain field, instead of setting it to empty value, have not the same
result for upgraded databases.

closes odoo/odoo#34454

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-28 14:48:33 +00:00
Nicolas Seinlet 33f47e0ae9 [FIX] sale: larger terms and conditions field
In edit mode, the terms and condtions field is too small

closes odoo/odoo#34332

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-06-26 10:39:20 +00:00
Nicolas Seinlet 1f70d53e5a [FIX] hr_maintenance: see employee equipments
For employee check the employee's equipments while on user pref see own
ones.

closes odoo/odoo#33602

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-05-23 09:18:08 +00:00
Nicolas Seinlet 3c3a3de3f1 [FIX] hr_payroll: validate leave without being Contracts/Manager
Contracts are only accessible by managers which raise an exception in
_create_resource_leave if not sudo()

closes odoo/odoo#33613

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-05-23 11:35:21 +00:00
Nicolas Seinlet 1b045d0ed4 [FIX] lunch: improved view speed
left join lateral is the postgresql optimized way to use parameters in
sub queries.

closes odoo/odoo#33526

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-05-21 12:06:35 +00:00
Nicolas Seinlet 25e53ecf71 [FIX] hr_payrol,hr_benefit: contract search
For a given date range, user can switch contract.

closes odoo/odoo#33103

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-05-02 10:56:11 +00:00
Nicolas Seinlet 8da4007bae [FIX] mail: is_blacklisted is group protected
as the field is_blacklisted require the group base.group_users,
attrs using is_blacklisted should also use this group
2018-09-24 17:45:57 +02:00
Nicolas Seinlet 49cc76797c [FIX] mail: add group on i tag
attrs use a field only accessible to members of group users.
If any user non member of group user, like user_id 1
during a migration, reach this view, you got an error.
2018-09-18 17:34:50 +02:00
Nicolas Seinlet 98072f1ad0 [IMP] stock: performance on _compute_reserved_availability
Improve performance (* 2.5) on _compute_reserved_availability
`mapped` makes use of orm prefetch, which is inefficient in this use
case when facing high volume.

Closes #21198
2017-12-12 11:17:54 +01:00
Nicolas Seinlet 12808c512d [FIX] point_of_sale: speedup order creation
When creating orders from the interface, all the orders of the current session
are in the cache and slow compute methods are recomputed.
Clear the cache before evaluating to execute _compute_amount_all on the current
order only.

The cache mechanism has changed in v10 and no longer contrains all orders.

opw-741442
2017-05-18 16:17:50 +02:00
Nicolas Seinlet 3a32021122 [IMP] models: mark records as recomputed as soon as they are
When recomputing stored function fields, the `write` may trigger a
cache invalidation which lead to a recompute of all the recordset
values, even the ones already saved in database.
2016-05-12 11:44:57 +02:00
Nicolas Seinlet f207ef5fae [IMP] account: improve reconciliation speed
- Only invalidate cache for fields and records we modify
 - Rewrite query to be more efficient
 - Avoid o2m commands to be more efficient; write directly on reverse m2o
2016-05-12 11:41:13 +02:00
Nicolas Seinlet 6f29bfc181 [FIX] mail: remove unneeded call to refresh()
With new api, this call is not wanted anymore. The cache is cleared
automatically, no need to clear the whole cache; that's a little bit
overkill and reduce performances.
2016-05-12 11:35:46 +02:00
Nicolas Seinlet e5f2bb638a [FIX] l10n_be_intrastat: use _compute_qty
The quantity is not correctly computed, and therefore the weight is
wrong.

The fix uses the appropriate _compute_qty method to convert the
quantity.

Closes #10204
opw-660801
2016-01-05 11:17:08 +01:00
Nicolas Seinlet 5f35530615 [IMP] Stock: various small optimization to load barcode interface faster
Perform search_read instead of read then search
Perform some RPC in parrallel instead of sequentially
Do not reload uls everytime
2015-12-15 10:27:36 +01:00
Nicolas Seinlet 8c4877ff0d [FIX] account_asset: Assets Analysis performance
In a real environment with a big dataset,
the query reponse time decreased from 750s to 6s,
by using a join on the sub-select instead of redoing
the select for each line.

Fixes #8812
Closes #9128
2015-10-22 16:04:19 +02:00
Nicolas Seinlet 5c9897a83f [IMP] stock_account: rework on stock_history view joins
- Replace `LEFT JOIN` by simple `JOIN` for required fields
 - Use `JOIN ... ON (...)` syntax instead of implicit join `A.X = B.Y`
 - Remove of unused column quant_id

Closes #9197
opw-650598
2015-10-22 15:59:54 +02:00
Nicolas Seinlet 29bd622521 [FIX] stock_account: stock history performance
Using BIGINT id instead of Text
 - This doesn't change the behavior, just the variable type,
   while being much more efficient.
Using `UNION ALL` instead of simple `UNION`
 - This doesn't change the behavior either,
   as the ids of each sub select cannot collide

Closes #9197
opw-650598
2015-10-22 15:59:54 +02:00
Nicolas Seinlet 9c8b99acf7 [IMP] website_sale: extract search domain in overwritable method 2015-09-04 17:26:06 +02:00
Nicolas Seinlet 02a530b64a [IMP] can use x_name in diagram view 2015-05-29 10:09:58 +02:00
Nicolas Seinlet e7886c6d75 [FIX] doc, new API + kanban error
- fix default_group_by in kanban
- use new api in server actions
- missing @api.multi in @compute example

Closes #6640
2015-05-11 10:17:55 +02:00
Nicolas Seinlet c593a881da [FIX] point_of_sale: remember tax_ids in pos.order
This avoid the unbalanced account.move created by the pos.session
when tax are changed on a saled product during the pos session

Closes #5161
2015-03-02 19:28:32 +01:00
Nicolas Seinlet 35b3836276 [ADD] l10n_be_intrastat: Belgian Intrastat report
Closes #2247
2015-02-03 19:35:56 +01:00
Nicolas Seinlet 35a061eb0d [IMP] point_of_sale: faster loading of pos session
name_get of pos.category should use a browse instead of a read.
For a company having thousands of products and a few categories, using a browse
will greatly improve the load time as it is cached.
2015-01-14 13:45:20 +01:00
Nicolas Seinlet 1eb2507034 [IMP] improve search in webshop using a split on white spaces 2015-01-07 15:43:03 +01:00
Nicolas Seinlet 8347d36bf1 [FIX] use inner join to avoid null id's in read_group 2014-12-29 15:22:35 +01:00
Nicolas Seinlet c2b7bca486 - Fix #1253
- avoid using sale objects in stock_account module
- check the purchase side
2014-09-03 19:18:16 +02:00
Nicolas Seinlet 2bd1ec9e6b remove pudb 2014-09-03 19:18:15 +02:00
Nicolas Seinlet a0670b5b99 fix #1253 2014-09-03 19:18:15 +02:00
Nicolas Seinlet 23df2ec28a [FIX] sale: on create, set taxes if product_id_change called 2014-08-27 11:48:40 +02:00
Nicolas Seinlet 8dc8302dad [ADD] wms: add option to select package type in WMS barcode interface 2014-08-11 13:45:39 +02:00
Nicolas Seinlet ee67d65801 handle missing JS files with a console log 2014-07-29 12:39:51 +02:00