When we clear the configuration parameter crm.pls_fields unlink method is
called. In order to have a correct dynamic compute based on this parameter
we need to re-evaluate the depends. This is done by overriding unlink of
ir.config_parameter, like already done at create and write.
Task-2196200
closesodoo/odoo#61293
X-original-commit: d04cc4df4ec28816aeb6d1d7c7fc0e547fd13fa5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:
- Assign a sales team to a new POS
- Go to Sales > Orders > Sales Teams
Bug:
Traceback:
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
opw:2371276
closesodoo/odoo#61292
X-original-commit: 6d41376ae0f17fd582daa6ac78de05cd1255d7b4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
Before this commit:
It was complicated to manage the contracts as they were all displayed in
one view.
When the contract was a time credit one (which is by definition a temporary
situation) the data used was based on the time credit and not on the full time
equivalent. This usually forced the HR to create fake new contracts without
time credit for the appraisals.
After this commit:
A new report will ease the followup of contracts with the time running.
It comes with a new view that highlight the reference information which
allow to easily manage credit time. Simulation is also made on FTE data which
eases HR work.
This commit also fixes a bug in the simulation with the meal voucher (only one
was taken into account in the summary right panel.
The wage on signature is now populated when the document is signed.
Closesodoo/odoo#58120
Related PR: odoo/enterprise#13384, odoo/upgrade#1802
task-2326407
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Some lines had been wrongly (re-)moved during the process of integration
of Jabberwock. This restores them. Among other things, this fixes the
issue that made the popover snippet options still appear when the
snippet was invisible.
Using the handle to move elements from footer/header anywhere
in the page would make the main element disappear with endless
content loading animation.
The end of the drag and drop executes a serie of methods :
_destroyEditors > cleanForSave > toggleTargetVisibility
Since the "cleaning for save" is called for all snippets and the footer
doesn't contain a 'o_snippet_invisible' class, the "onTargetShow" method
is called... but actually hide the footer because the "onTargetShow"
implementation was so that it clicks on the visibility checkboxes
regardless of its current status.
Part of https://github.com/odoo/odoo/pull/59624
task-2312878
X-original-commit: 5488916657f9cd4041abdcbe3fc615174df6cb49
Before this commit:
Going to Website / Products
--> Products will open `tree` at first position while it should open `kanban`
view based on given `view_mode`.
After this commit:
>e remove explicit `view_id` and add view ref in `context` so it opens `kanban`
at first and respects given view_id as well.
This commit closes#50349closesodoo/odoo#61273
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Use case:
1) Create an invoice matching reconciliation model, matching 90% percent of the amount, with a write-off line applying a 100% write-off of the remaining amount.
2) Create a 100€ invoice
3) Create a bank statement with a 90€ statement line whose payment reference corresponds to the one of the invoice
4) Click 'reconcile' on the bank statement
On enterprise, this crashes when preparing the data to give to the reconciliation widget, as the write_off_vals key is not set properly by the call to _apply_rules.
OPW 2367754
closesodoo/odoo#61265
X-original-commit: 1dd6199519b4ad5b5b17dfa17965ededcecb6da4
Related: odoo/enterprise#14563
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
- Go to Point of Sale > Configuration > Attributes and create an Attribute:
* Attribute Name: Attribute X
* Variants Creation Mode: Never
* Attribute Values: Value Y, Value Z
- Create a Product (i.e. Product X) available in POS with the created Attribute and Values
- Configure a POS and enable the following options:
* Is a Bar/Restaurant
* Product Configurator
- Open POS Session and select a table (i.e. Table 1)
- Select Product X and a value for Attribute X
- In the order summary, the value of the attribute appears after product name
- Go to Floor plan
- Go back to Table 1
The values of all attributes don't appear anymore in order summary
In POS front-end, when adding a product, the name of all chosen attributes values
are registered in a variable named "description".
The full product name displayed in the order summary is generated from display_name
of the product and this "description" variable.
When moving to floor plan, ongoing orders are saved in DB and reloaded when moving
back to a table.
As "description" is not saved, regenerating full product name from display_name of
product and "description" is not possible.
However the generated full product name is saved in DB and can be retrieved.
opw-2371965
closesodoo/odoo#61266
X-original-commit: df3061f6e8061cf039bf083f649b7585c8c31df4
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
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>