Steps to reproduce:
1. Go to Project
2. Filter > Add custom filter > Last Updated on
3. Click on the date field and use the date picker to change the value
4. The dropdown is closed and you lost your selection => BUG
This bug was due to a conflict between owl and bs dropdown (e4f87710),
to prevent this bug, we added a check to ensure there are no open
bootstrap calendar inside the current dom.
Note that if you click outside the dropdown, the datepicker is already
closed when you go through this code. It means that the datepicker will
not be present in the DOM anymore and the dropdown can be closed too.
opw-2373573
closesodoo/odoo#61262
X-original-commit: 73dfc1f7a8e2197fcdd4053ec57c260576593a15
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
When you are selling a kit in point of sale, the genrated picking is not
validated.
It is not validated, because the moves are not confirmed, before we set
a quantity done, and so the moves are not exploded and it result to the
impossibility of calling action_done on the picking.
To avoid this problem, we are confirming the moves created, and then set
the quantity done on the moves generated from the
confirmation.
closesodoo/odoo#61260
X-original-commit: 4f2f347c8b21b78efaa702d1b3c91b7f88dd88e0
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
When you want to obtain `dropship_picking_type`, it is possible to have
several results. This will lead to an error when doing
`dropship_picking_type.id`.
```
dropship_picking_type = self.env['stock.picking.type'].search([
('company_id', '=', company.id),
('default_location_src_id.usage', '=', 'supplier'),
('default_location_dest_id.usage', '=', 'customer'),
])
```
The fix ensures that `dropship_picking_type` contains only one element.
closesodoo/odoo#61256
X-original-commit: 3e3b1b335ced1ff20129172e6a7b2b0dcbe1a20d
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
The access rights of a model was checked but not the records themself.
In case a user has access to a model but not to a specific record, he
should not be able to execute a server action on it.
Correct the ir.rule on private partners to be also verified for other
operations than read.
While it was not possible to actually write on it (due to side effects
of ORM where write implies a read operation),
check_access_rule('write') was working on a private address
closesodoo/odoo#61253
X-original-commit: b0028c05d6ba9c67f16992ddb446eea6a854d099
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The user executing an action triggering an base automation may not
have access to the base.automation record itself (regular employee or
portal)
Added test test_on_create_restricted failed before this patch as the
portal does not have the rights to read the base.automation record
Fixesodoo/odoo#59680
X-original-commit: 33a7142f298eeda7808d6d07e80231836442a0ce
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus
WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:
When saving, a read is called. By default, read has
bin_size to true to avoid performances issues.
It will return the image size instead of the content
it may lead to image dissapearing or "Incorrect padding" error
HOW:
find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
git checkout -- addons/base_setup/views/res_config_settings_views.xml
---
PR for General Settings: https://github.com/odoo/odoo/pull/47297
opw-2346644
closesodoo/odoo#61215
X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
- Set a customer language to a different language, e.g. French
- Create a SO, add a product and validate
- Create a down payment
The down payment invoice is partially translated in French.
This was first solved in fc659d3f78 but broken in
0e73eca1364c8e0df93cd.
opw-2365982
closesodoo/odoo#61207
X-original-commit: f10b98d1776659f291b2f7f8a4a2111e4f106667
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Usecase to reproduce:
- 10 company having 10 000 moves in state 'confirmed', 'partially_available'
- Run scheduler manually (without cron)
It will takes a huge amount of time.
It happens because the run scheduler wizard will call run_scheduler
as sudo for each company (passing company as arg).
run_scheduler will try to assign move that could be reserved. However
the domain in order to search move do not include the company_id and
search for every company.
Following upper usecase:
Instead of running action_assign 10 times on 10 000 moves, it will
run action_assign 10 times on 100 000 moves.
Databases with multi companies and having a lot of stock will have a
scheduler speedup from this patch.
Thanks "Rémy Voet <ryv@odoo.com>" for finding this issue.
opw-2328707
closesodoo/odoo#61183
X-original-commit: a21f9876b5b9d01380d03d638deb48cd091f26e7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Issue
- Use runbot with all modules/duplicate DB-all
- Open a sale order randomly and enable every columns on Order Lines
- Press "CREATE" button
- Add "[E-COM11] Cabinet with Doors" to the products
The widget is not visible
Cause
There are too many columns
Solution
Increase the width of the widget
opw-2342149
closesodoo/odoo#61210
X-original-commit: f1a1cf87efc184dfe8f266729e5923994d224ce5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
Changed ValueError to UserError and return to raise so the user get a popup to
explain that this filter value is not supported instead of a traceback
task-2352688
closesodoo/odoo#61213
X-original-commit: f9ab590cd961026865808f4008bd45fc2afb6bed
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, double clicking on the border or on the padding of
a form input generated a traceback.
task-2312878
closesodoo/odoo#61201
X-original-commit: 904af21214a5a6924ec80b5690a523819aaec5f1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Reseting the field should just be done through the form element's reset
method to let the browser do it properly, otherwise the browser may
validate the applied values (and for example mark the required field
as wrong (making them red)).
task-2312878
closesodoo/odoo#61200
X-original-commit: 7676fc069d8b6458d0fc1f8eafe087ce553743f0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When creating an invoice from an attachment fails, we call super() which creates a new invoice and post the attachment to it without the `no_new_invoice` context key. This triggers an new import of the attachment.
closesodoo/odoo#61191
X-original-commit: 034625f2ade73f368f97e583b83db86372ae8001
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
Before that, even though the code contained something about it, the duplication of account.journal objects handled their code field pretty poorly (as it was trimmed to 5 characters), leading to situations where journals could have the same code, leading to possibility for account moves to have the same name.
This commit improves the SQL constraint testing journal codes so that they must now be unique per company. We also recompute the code in a more advanced way so that journal duplications works as smoothly as possible.
Task 2346404
closesodoo/odoo#59791
Related: odoo/enterprise#14447
Related: odoo/upgrade#1880
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Open POS Config
Enable the option 'Connect Devices'
In 'Epson Receipt Printer IP Address' write anything then focus out
Enable the 'Cashdrawer' Option
Empty 'Epson Receipt Printer IP Address'
Disable'Connect Devices'
Save
Blanking 'Epson Receipt Printer IP Address' leaving 'Cashdrawer' on
will lead to crash during the payment session if the user click on
'Open Cashbox' when using cash as a payment method.
'Cashdrawer' should be disabled automatically when needed.
opw-2367498
closesodoo/odoo#61086
X-original-commit: 6491f9b20570c374e464194cbce698b00c173847
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
The dashboard "View Statement" action on bank journals was using the
`open_action` helper, but it was badly computed for journals with
`bank_statements_source` set to `online_sync`. We were directed to the
statement lines instead of the statements; and there was no other way to
go to the list of statements.
closesodoo/odoo#61190
X-original-commit: 78286851034b8f3ef4dcab78e50b7220c0bdd213
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
Before this commit, the max height of the off canvas hamburger was the
same as the standard navbar-collapse (80vh) but in the case of an off
canvas hamburger menu we need a 100vh max-height to display it
properly.
task-2312878
closesodoo/odoo#61189
X-original-commit: 007580b2cd7329733f1e9b70ea95265080b7ccd8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Revert "[FIX] sale: correct _get_to_invoice_qty depends"
This reverts commit cfc9abe14689db82acf1872fa8d358662fc7e123.
While the field is indeed in the list of records, it's a big change of
behaviour.
Retroactively changing the invoicable lines of sale.order that are
closed is dangerous and can lead on unexpected behaviours.
Performances can also be bad when changing the product configuration
on a database with a lot of sale orders.
Changing the product configuration should only apply to future orders,
not past.
closesodoo/odoo#61168
X-original-commit: be13bc94c2ff51b99a4399be44a765d0b28202eb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Steps to reproduce the bug:
- Let's consider a company contact C with two children CH1 and CH2
- Create a purchase order for CH1 and a subscription for CH2
- Archive CH1 and CH2
Bug:
The count of purchase orders in C was displaying 0 instead of 2
Same issue for the vendor bills
opw:2360155
closesodoo/odoo#61167
X-original-commit: b3e31f2680534382b048324cfcb8a6f6c457553f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Steps to reproduce the bug:
- Let's consider a company contact C with two children CH1 and CH2
- Create an opportunity for CH1 and a subscription for CH2
Bug:
The count of opportunities in C was displaying 0 instead of 2
opw:237344
X-original-commit: d11fb611fed3a8541d03b7d3e49973ae7c16a768
Steps to reproduce the bug:
- Let's consider a company contact C with two children CH1 and CH2
- Create a meeting for CH1 and a meeting for CH2
Bug:
The count of meetings in C was displaying 0 instead of 2
PS: set() is used to avoid to count several times the same event for a partner.
If for example CH1 and CH2 attend to the same event, only one event must be counted for the
parent C
opw:2360155
X-original-commit: 7449c8a6643477742616bf236f2f2c90aec68581
Co-authored-by: nim-odoo <nim@odoo.com>
Consider some model A that "_inherits" from model B, which itself
"_inherits" from model C. Also consider a field F on model C, which is
inherited by both models B and A. Now create a record from model A,
with a given record for model C, no record for model B, and a default
value for field F. This should create a record in A, connected to a new
record in B, connected to the given record in C, and the default value
should be ignored, as a record from C is given.
Before this commit, the given record in C is modified with the default
value for F. The default value is considered because no record is given
for B, and that value is used to modify the given record in C. The fix
consists in discarding default values by considering potential ancestor
records when parent records are not given.
closesodoo/odoo#61165
X-original-commit: b83dfaa2c9bcc6bc7f8df19ed0e442554816709b
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
WHY: it's a copy-paste mistake and doesn't have any meaning, while makes code
less readable
closesodoo/odoo#61091
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This variable has been unused since commit f3d6a54e36.
opw 2368733
closesodoo/odoo#61143
X-original-commit: 563253a8303723e3eb4217005bf518fdf6b3f9e3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The pricelist item model (product.pricelist.item) has a compute_price field,
and the necessary fields to be able to compute the price of a product.
However, these fields are never used into the model itself;
the parent model (product.pricelist) actually makes the computation,
embedded into _compute_price_rule.
Because of this, it's not possible to inherit pricelist items.
It's also a better design, on object principles.
Last, it lighten a method that is still 130+ lines long.
opw 2368733
X-original-commit: 9cd0bf740706a64e49599111304a6fb5ec6d7287
Behavior prior to this commit:
In a multi-lingual setup, when entering a SO for a customer set in
a non-default language with a product that has translation in both
languages and is set up to replenish on order, the description in the
generated RFQ is duplicated, for example: "Product test Test Product in Dutch"
The problem stems from the fact that the description on the generated
stock move is set to the translated name of the product. When
generating the PO, the stock move class removes the product name to
avoid duplicating the description, but it uses the non-translated name
in the comparison.
Behavior after this commit:
The description on the RFQ line is included only once (using the default
language for the database)
opw-2368562
closesodoo/odoo#61138
X-original-commit: d013f8641ae2ed8c12d30ba5650c8e6ff2f1d5fd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, link and media buttons of the wysiwyg editor
toolbar in the forum were never displayed. It's because we were not
using the right option names in the toolbar object.
Thanks to @kirtangajjar for initial bug fix.
Closes https://github.com/odoo/odoo/pull/53589
task-2369420
closesodoo/odoo#61098
X-original-commit: 88a693fa5b8852596e623e08f5eb846b9988b5d7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
1. Lead to loose the tour: Remove the step of the tour that asks
to set an address (the address is auto-completed at free trial
based on domain name).
2. Bug: At step 3, it redirects to the
invoice settings to select a localization, when you click on
"install more packages", you are sent back to the sales app.
--> this bug is related to res_config_settings.js from base addon.
I tried to fix this bug by adding a data-attribute "discard" in the
res_config_settings_views and checking this additional condition in
the js.
3. Bug: Tour blocks at last step "send by email" on quotation.
After clicking on "sent" on the pop-up, there should be rainbow
effect to mark the end of the tour.
4. Bug: Sale order line: fix the blue color on Invoiced Quantity
only, instead of the full line
5. Put the "sample product" in active= false (it's necessary for
the sample invoice but should not be visible to the user, they
should create their own)
6. Merge the 2 dates fields related to expected delivery on sale.order
--> since other modules extends this module, I made the field
expected_date invisible and put the same value in both fields. This
value is the max of the order_lines.expected_date
Taskid: 2277314
X-original-commit: b9ffda35ecf31f3af52bf04f23c6794429548d23
Before this commit, the parameter for user filters was not kept in the
url when navigating with the pager.
Closes https://github.com/odoo/odoo/issues/56248closesodoo/odoo#61093
X-original-commit: c6a8be30c2b43d6462e365da6f3ec5aad32d1c08
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The xpath branding of a node which followed a t-field node which was
added by an inheritance view was not correct. E.g.
View 1:
```
<hello>
<world id="1"></world>
<world t-field="a"/>
<world id="2"></world>
<world id="3"></world>
</hello>
```
View 2 inheriting view 1:
```
<xpath expr="/hello/world[3]" position="after">
<world t-field="b"/>
</xpath>
```
So the result is:
```
<hello>
<world id="1"></world>
<world t-field="a"/>
<world id="2"></world>
<world t-field="b"/>
<world id="3"></world>
</hello>
```
Now the xpath branding of world id="2" was /hello[1]/world[3], which
is correct.
But the xpath branding of world id="3" was /hello[1]/world[5] which is
incorrect as it should be /hello[1]/world[4] (as related to the
original view). This was because inherited t-field did not carry any
information they came from inheritance (as "normal" nodes would).
The side effect of this was that the incorrectly marked node was not
possible to edit (and made the editor crash on save).
closesodoo/odoo#60976
X-original-commit: 07cf2b9520fc6c79a9a7ca39929bda0bfbe85e3a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Changelog:
[ADD] DomHelpers: set class helper
[FIX] Readme: fix build instructions for Odoo
[FIX] EventNormalizer: Don't force a line break with [any key] + [ENTER]
closesodoo/odoo#60796
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This helper is the equivalent of jquery's `toggleClass` with a value for
the `force` attribute. I chose to name it `setClass` instead because
with that attribute it's technically not toggling: it's setting.
Steps to reproduce the bug:
- Create a vendor bill VB1 with one line L1
- Set an analytic account AA on L1
- Post VB1
- Create a new vendor bill VB2
- Set VB1 on the field Auto-complete
Bug:
The created line L2 on VB2 had no analytic account
PS: In 12.0, the analytic account was kept when using Auto-complete field
opw:2359432
closesodoo/odoo#60962
X-original-commit: 5f46c50442dbe42bc534718719a6b19ee087eab0
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Co-authored-by: smetl <las@odoo.com>
Public user by default don't have email. So when you try to subscribe to a
channel in public user (portal don't receive an email), the email cannot be
send and the user see a message:
"Unable to post message, please configure the sender's email address.
closesodoo/odoo#60867
X-original-commit: 7e40af524cc1b23abab3140377d993f3e93c5cf0
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Behavior prior to the commit:
A user can double click the "Send" button when submitting a form on the
website. Because the event handler is removed on the first click, the
second submission uses the browser default behavior and posts the form
to an incorrect URL, resulting in a 404 error for the user.
Behavior after the commit:
The button is disabled after the first click.
Note:
Using `.attr('disabled')` is sufficient both to disable the button and
to give the disabled visual on all browsers since IE9, but we keep
`.addClass('disabled')` and `.off()` for cases where the clickable is not a
`button` but a link.
opw-2356402
closesodoo/odoo#61111
X-original-commit: 0eed92da709dba843a7f2f82aee772313e3d4630
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
The randint generator generated always `None`
because the `return` was forget in method of `populate.compute`.
- Add a test for the randint tool, and fix the issue.
- Change the documentation of `_populate_factories` to be more
explicit about the custom generator.
closesodoo/odoo#61076
X-original-commit: 09d2ddecaf4fc6474c96acf1f4a12de4789caef8
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Due to mentions being positioned inside thread view and messaging list (when in
chat window) and those two elements having `overflow: auto`, it is necessary to
give mentions an appropriate max height to prevent overflow.
This makes it necessary to add a scrollbar to the mention list, which makes
scrolling into view of active item necessary when navigating with the keyboard.
Also removed activating item on mouse over to prevent activation of wrong items
when navigating with keyboard if the cursor is unfortunately over another item.
task-2275828
closesodoo/odoo#61084
X-original-commit: 85384dd0bb8de5e98e585cb8610d58b11e601520
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>