The parameter `lot_id` must be a recordset, not an `int`.
opw-2188752
closesodoo/odoo#44525
X-original-commit: aeafd2a84e309ee4a496f9a109d7fe6b0fb9cd3d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The computation was incorrect, the answer was 10, not 110 with the
previous formula
Courtesy of Frederico Freire Boaventura
closesodoo/odoo#44514
X-original-commit: 577e1ad8314cac6e61f60f997f338df4b7a1da38
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Steps to reproduce:
- install sales
- create a new quotation
Previous behavior:
the avatar next to the author's name is empty in the mailthread
Current behavior:
avatar is displayed as expected
opw-2187231
closesodoo/odoo#44407
X-original-commit: 24ba9f9954a71eba46d44fe242cd2e6dba125da6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
The default journal depends on the company define in the context or the company in the environment
In case of online signature/payment of a SO in a different company then the public user
The company will be wrong and the journal_id as well
It lead to a fail of the payment since the payment could not be reconciled with the invoices
This is happening because the force_company is not taken into account for the default journal
This commit take the force_company into account, it take the precedences on the default_company
closesodoo/odoo#44238
X-original-commit: 8158e286b0020daa994b593377a2c99234e66086
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before this commit, the date range was not known without open the record in backend.
It is really painfull to don't know when a guy of your team ping you on a new leave
the date from the current leave. (today ? next week ? ...)
Now we have the date into the name_get and so the subject of the email.
task-2001439
Nothing related to next activity ;) but idea was the same.
closesodoo/odoo#44462
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
If an automated action raises an exception, in the traceback modal:
- For admins, display Disable & Edit automated action buttons
to be able to directly know with wihch automated action the error occurred,
and to give the possibility to edit or disable it quickly,
- For regular users, just add a paragraph to tell with which automated action the error occurred,
so they can give this useful information to their administrator
This is specially useful for databases which have just been
upgraded to a newer version, and for which the server action
is failing because its code is no longer supported.
closesodoo/odoo#44513
X-original-commit: 8f3940c132bbbc99e47fa3f0cba0e768159d9af2
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
In stock, before sending an sms, we check if there aren't the key
'skip_sms' in the context. It is useful, for example, in fsm
application.
TaskID: 2081191
Purpose
=======
Currently, it is only possible to set an Analytic Account for a whole Project, there
is no distinction by task. However, if the user has 1 task per customer, he cannot
track the costs and revenues for that specific customer easily. He has to manually
change the AA of the timesheets' analytic lines. An option would be to set a
different AA on the SO generating the task, but the AA of the project takes over
anyway.
Specifications
==============
If the user sets an AA on the SO, it should bypass the one set on the project
Add an AA field below the Email cc one on tasks in debug mode
- should be related to the AA field from the SO
- it should also bypass the AA set on the project
All the timesheets from this task should be related to the AA field set on the SO/Task
closesodoo/odoo#40844
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
time.clock is deprecated since python 3.3 and no longer exists in python 3.8
time.process_time was introduced in python 3.3
Replace "is" by "==" as this produces a SyntaxWarning in python 3.8
Fixesodoo/odoo#41313closesodoo/odoo#44502
X-original-commit: f03b4cb5576f264b6845242ba112f02422af4f5f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Some code was added to prevent notifying a 'reset' if there was no
'preview' before. Unfortunately, checking "if there was a 'preview'
before" cannot be done properly so some 'reset' were stopped while they
should not have. This commit simply removes the code which is in fact
not needed.
closesodoo/odoo#44499
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Issue
If month - 1 or month - 2 are in the previous year, the filter is
incorrect.
ex: Date = Jan. 2020, Filter = Dec. 2019
=> last_year__last_month = 2018-12 instead 2019-12
Cause
If date is 2020-01-20
Selecting December => adding param "last_month"
Selecting 2019 => adding param "last_year"
Applying "last_month" => date become 2019-12-01
Applying "last_year" => date become 2018-12-01
Solution
Detect the right year to activate by default
when a month is selected and no year is selected.
With that solution it is not possible to get records in Jan. 2020
or in Dec. 2019 only for instance but the global functioning
of date filters stays the same as before.
OPW-2169528
closesodoo/odoo#44208
X-original-commit: 096fdc7d3fe0799aa761c6ad3597569a002c698e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Jason Van Malder <jvm@odoo.com>
Closes#43580Fixes#9449
Adds field type conditions for boolean in search for Property model.
As False values are not stored in DB for boolean, the search() does
not return any value for non existent lines with:
* operator: '=' and value: False
* operator: '!=' and value: True
Uses the 'include_zero' and inverse operator mechanisms implemented
in Property model.
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
- In an e-commerce with automatic invoice set;
- Buy something as public user;
- Pay the order;
Before this commit, the client don't receive the invoice confirmation
email.
opw-2176506
closesodoo/odoo#44494
X-original-commit: 684e678e1240f444ccdcd31939456fe57177b5b2
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Purpose
=======
At the second res.company creation, the multicompany mode is 'enabled'.
But to get the company selector dropdown, the user needs to reload the page.
Specification
=============
Force a reload at res.company creation, similarly to the forced reload when updating the language (lang) of the user.
closesodoo/odoo#44386
Taskid: 2127257
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Due to commit https://github.com/odoo/odoo/commit/7ecae3357117b1fd9889540556d5eba14ef8f237
which is introduces Next Activity icon on kanban cards at left bottom
of the card in contacts
however, this change effects other kanban cards making image and
details separated, such effected kanban views are ratings in project,
products and channels in live chat so fix the layout issue for all the
above kanban cards and it will not effect the contact kanban view.
taskID-2183676
closes odoo/odoo#44349
Closes: #44349
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Archived or deleted products shouldn't be counted in the comparison
widget count anymore.
The current behavior did only reset the cookie (and the count) when
products were added/removed from the comparison, but didn't consider
the case when the products currently in the cookie weren't all existing/valid.
Fixes#44049closesodoo/odoo#44485
X-original-commit: 0b488842c0be2160c5ccd3b5b03b02a728f4eec5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The following steps will reproduce the issue:
1. Activate invoicing in the pos config
2. Start a new session
3. Switch browser to offline mode (or stop the odoo server)
4. Make an order
5. Invoice the order during payment
6. Validate
7. Error shows (which is okay)
8. The problem is that the receipt screen is not shown after validation.
The intended behavior is that the receipt screen will show with
an additional Print Invoice button above the receipt.
The problem is caused by wrong signature of the thrown error
when the _save_to_server is called. The signature understood by
the error handlers is the one by `error` and not by `reason`.
See _handleFailedPushForInvoice which is the main consumer of the
error thrown by the _save_to_server call.
closesodoo/odoo#44392
X-original-commit: 5d593eb31ce7d545a57cb93bc9834e4cebadea19
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit adds the new AbstractField class written in owl,
meant to be extended by specific Field owl implementations.
Note that its API is not complete yet, but it is enough for
basic usecases.
This commit also adapts the BasicRenderer to instantiate the
future new fields that will be written in owl.
closesodoo/odoo#43759
Related: odoo/enterprise#7872
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit's intention is to bring class inheritance of event handlers
to components.
Use case:
A component class may want to set generic event handlers for all classes
inheriting from it, in order to set shared event behavior from the start
It is the case in many parts of Odoo, in particular in the cases of fields
which need at least to react on some keyboard event for navigation
The way to implement such a behavior is to make use of the
`useListener` OWL hook, by passing as arguments
event name and the handler function
Use the 'Volume' decimal precision on all `volume` fields.
Complement of commit c1a5221ba2
opw-2185374
closesodoo/odoo#44473
X-original-commit: dc0111d6cdf4032fa840f9ff95f4fa687d33f77c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Linked to issue: https://github.com/odoo/odoo/issues/43745
At slide creation, as image_1920 was in readonly mode in form view when type is
video, document or presentation, the field was not sent in value to the create.
There is no reason to set this field readonly. If the user want to modify the
thumbnail, that his responsability.
This commit remove the readonly flag for slide.image_1920 field to allow
computed thumbnail to be saved at slide creation.
Task ID: 2182638
PR #44405closesodoo/odoo#44472
X-original-commit: 15af8734c5d16a358cababb6163863b30e24f8cc
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Follow up on 255f7219a9
The issue is still happening.
With the current commit, we will be able to know for sure if it happens because
we don't wait long enough, or because the messages are never appearing.
closesodoo/odoo#44471
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Some elements like the file input are not compatible with selection.
Since there is no reliable way of figuring out if the element is
compatible or not we will simply try catch it.
closesodoo/odoo#44470
X-original-commit: 1f0a0b380c2738795b0b5a7976692d9e9cd88583
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
If a view is present multiple times in the same module, the "last
instance" is going to win (by replacing any previous instance's arch
with its own).
Most cases of duplications are probably views which got moved then
either not removed (from the original location) or revived (through a
forward-port), the first instance can just be removed entirely.
For the few which seemed to be more than just trivial mistakes, merge
the two views instead.
closesodoo/odoo#44463
Related: odoo/enterprise#8107
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When the multi-location is enabled, in the stock picking form, when
the picking is unlocked, we can't modify move lines in the wizard,
due to a bad readonly attribute which doesn't take in account
'is_locked' field.
closesodoo/odoo#44460
X-original-commit: cc2bff6dba6575febe37c8365709609b209a834b
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Steps to reproduce:
- install pos
- install the hebrew language and set it as preferred language
- start a pos session with the virtual keyboard option activated
- try to search a product
Previous behavior:
the keyboard keys are reversed
Current behavior:
the keyboard keys are not reversed
opw-2171278
closesodoo/odoo#44388
X-original-commit: 37e3fe908ed3e87bdc8bfa33f411672e51e43e1a
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
Purpose fo the task is to improve the usability of hr contract and
automatic alert before contract expired
-improve sign demo data
-improve kanban state field in contract kanban
-improve contract Form view ui
-set first contract date on employee form
-added the date of last completed contract on the new contract
-improve signature request form
-create automatic activity before the week of contract expired date
closes odoo/odoo#40789
Task: 2049413
Closes: #40789
Related: odoo/enterprise#7454
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Subcontractor and active are in the same section. Would be great
to avoid that since they don't are related at all.
closesodoo/odoo#44453
Task: 2187181
X-original-commit: b8786975169b4b5e61c242dc4f07c2e6c7b7ffdf
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
`AccessError` requires the argument `msg`. Therefore, even if this error
is catched, we need to provide one, otherwise a `TypeError` is raised.
opw-2183184
closesodoo/odoo#44452
X-original-commit: cdefbf8d66e42d88d845dd621e0306cb55c5f79a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this change we were letting the user to create a journal with a
AFIP POS Number they like, and where they try to post an invoice in that
jounrals they receive an error message telling that the document has not
valid POS Number.
In order to avoid this we add as part of the constraint where we check
the validity of the AFIP POS Number which is: should be greater that 0,
and should be 5 digits max.
closesodoo/odoo#44433
X-original-commit: 3e991fb4ceb02eeb41ed6579ac409f9595663c41
Signed-off-by: Josse Colpaert <jco@openerp.com>
The law itself said that you can use 4 or 5 digits, but some customers
complains that they want 5 (for eg. 00001) because some suppliers reject
the invoice if only 4 digits (that is wrong, but suppliers do anything
to avoid paying).
We've check and AFIP online invoices use 5 digits always. So, to satisfy
customers/suppliers and make code simpler, we think using 5 digits is a
better option.
X-original-commit: a475de89568c8274bb556d672948b25a95996599
To be able to flash the partition on which the IoT Box is executed,
we must create a third partition and install an OS there to be able
to boot on it and flash the partition of the IoT Box
- Creation of the third partition
- Raspbian download and checksum verification
- Installation of Raspbian on the third partition
- Download the IoT image on the Raspbian partition and check the checksum
- Reboot on the Raspbian partition
- Installation of the IoT image on the second partition
- Reboot on the IoT partition
- Cleaning and deleting the third partition
closesodoo/odoo#44430
Task: 2161955
X-original-commit: 407d9a88a3d23ed49ed5a2c5fa4d211cec43edfd
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
We move the main.py controller and the upgrade.html view
in the hw_posbox_homepage module for more consistency
X-original-commit: 9ba84dc6c0651892bdd00403477bab23fce16bdb
Extend boot partition to 512Mo to be compatible
with a future version of Raspbian and auto flash
X-original-commit: a9a8aa5ed46f7740d59c4e6f6fd6b7f3e45aabf8
- When rendering a website page, exceptions might happens.
If so, an error page is displayed, to do so we create
a new psyscopg cursor to read the view in database and render it.
But if the current (failed) transaction was holding a lock, the new
cursor might have to wait for this lock to be released further
down the line. However, this will only happen after the
request is done (and in fact it won't happen). As a result, the
current thread/worker is frozen until its timeout is reached.
So rolling back the transaction will release any potential lock
and, since we are in a case where an exception was raised, the
transaction shouldn't be committed in the first place.
closesodoo/odoo#44085
X-original-commit: 7a61c89da5ccaed983275eb5f4986475ebf8b48d
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Before this commit:
when a user asks a question on a forum, share buttons are always showing even if
question is validated or not and hence it will lead to 404 error.
After this commit:
when a user asks a question on a forum, share buttons will only show after a
question is validated.
task-2064874
closesodoo/odoo#37505
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Add an option to add a right sidebar on the job list page.
Redesign the job list page and the job description page.
Integrate existing website snippets to customize the job description
page in the editor.
task-2145266
closesodoo/odoo#43655
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When a tag has a very long name, on a screen too narrow, the sidebar
overflows outside of the screen and a horizontal scrollbar appears.
By allowing the tags to wrap, the overflow does not occur any more,
excepted if there is a very long word. In that case, we truncate it.
Same goes in the short blog post template, excepted that the parent's
width is already specified.
closesodoo/odoo#44424
X-original-commit: a5ff42cefeb5e0fff4155d5ec0ff08e521bfebaa
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Stock moves records can be unlinked in some cases, for example when
confirming a move containing a kit, the original move is unlinked and
replaced by the moves of the components of the kit.
This commit adds two indices to accelerate the unlink of stock move
records. The fields were the indices are added are foreign key on stock
move, and postgres checks the foreign keys of the rows before deleting
them.
closesodoo/odoo#44426
X-original-commit: e34a176dd438fe0f4f1a384889bfdc196f2c4b4f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
When the "Show Detailed Operations" is enabled on a picking type,
create a immediate transfers with it, validate, unlock and readd
a new detailed operation, save and it will create a move line without
any state. Due this lack of state, the quant won't be updated.
Fix by remove the readonly=False in the state fields
(3f4f77fd9d), to avoid sending
state:False by the web client.
closesodoo/odoo#44425
X-original-commit: 8f28b302e6311322abc749daf364d4c1c5398fe6
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Issue
- Studio
- Add an required html field
- Create new record
- Leave it empty
It is saved
Cause
The isSet function of FieldHtml widget, have a "/" in the <br> tag
and summernote empty = <p><br></p>. If you add a space, the value
becomes <p> <p>.
Solution
Remove the "/" and the spaces, check if value != <p></p> &&
<p><br></p>
OPW-2183687
closesodoo/odoo#44427
X-original-commit: c984b1b1210cea1e63f3bc66cec2120554c76c2a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>