PURPOSE
On the user rights screen, we can't choose responsible.
It shouldn't be visible.
SPECIFICATIONS
A "Time off Responsible" rights will be implicited as a checkbox in debug mode.
Also, changed "Manager" by "Approver" on Time Off type settings.
LINKS
PR https://github.com/odoo/odoo/pull/56807
Task-2314833
closesodoo/odoo#56807
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
user with the 'team approver' or the 'all approver' access right levels
cannot approve his own expenses. However, the 'approve' button is still
being displayed, which is confusing and misleading, and an ugly user error
is thrown when the user tries to click on it
SPECIFICATIONS
Hide the 'approve' button on expense reports If the user has either the
'team approver' or 'all approver' access right levels and the employee_id
set on the report is linked to the current user
LINKS
Task-2323982
closesodoo/odoo#56784
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
If the partner was created then the company, the api would return the
partner, find the corresponding company and return it with the
partner, but not actually link the newly found/created company with
the partner in the db.
Would happen for example if the user had no reveal credit when he
added the partner. Then credited his account and opened an email from
the same partner again, triggering the creation and enrichment of the
company.
closesodoo/odoo#57825
X-original-commit: 5879f7dede16c8ba574ed648e4c91ca438eb93fa
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Before this commit, selecting the whole content of the custom filter
input and releasing the cursor outside of the dropdown closed the
dropdown.
With this commit, the dropdown is kept open in this situation.
task - 2276544
closesodoo/odoo#57807
X-original-commit: 450e0ec45005c3d6c2e8475e134113a7d8515e9f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
* Prior to this commit only one selector could be provided in order to got to the
next tour step.
* After this commit an additional selector can be provided in order to consume
a tour step. This additional selector can be specified through the step property
alt_trigger. We also toke the opportunity to remove $actualAnchor in tip.js as no
more used.
task-2325001
Related PR: odoo/enterprise#12711closesodoo/odoo#57680
X-original-commit: 9606e9e231be9e1e7d15ea0efdedbf5afff47102
Related: odoo/enterprise#13214
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The behavior isn't exactly undefined: it will appear to work if the
relation refers to only 1 instance. If there are multiple it will give
results for 1 instance and ignore the others. This behavior should not
be relied upon, hence I'm documenting it as undefined. I confirmed this
with mat from the ORM team.
Even better would be to raise an error or warning if `related` is used
in this context.
closesodoo/odoo#57270closesodoo/odoo#57815
X-original-commit: 6ae421f551ee36afa836494bc8563fc9276ab31e
Signed-off-by: Raf Geens <raf-odoo@users.noreply.github.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Raf Geens <raf@odoo.com>
Added an example because it's non-trivial to realize why you would want
to set `mode` to `primary` together with `inherit_id`.
Another way to look at it is that the view matching doesn't understand
delegation inheritance. If it did there would be no need to override
`mode` because it would be able to see that the parent and derived views
refer to related models. But since that feature might not be worth the
effort, it's ok for me to just document the current situation.
X-original-commit: 549d159a836229f634be04131db947b275240edb
Some line items in a bulleted list would span a paragraph but the first
line of the paragraph would be in bold and the rest would be indented
and not bold below it. You would end up with sentences that broke off
half in bold and half in the regular font. This was due to wrong
indentation in the source.
The pattern was also used for more legitimate cases (field descriptions),
as well as borderline cases (where a section might have also worked).
I've updated the borderline cases to have consistent formatting across
the document and removed the bullet points that were prefixing
description lists in both cases.
X-original-commit: 2d865d80b1b9d14994562f0c77b16e99a4167fcf
MAT confirmed the Javascript API is currently not being built due to
repeated compatibility problems between ES6 and the docstring output
with no clear solution in sight.
X-original-commit: 3198d0120a9388768ee882bb98e279f860a5b456
The page shows the first 15 lines of a CSV in raw form as an example.
Next it shows the same data rendered as a table. However, it was
displaying the entire 680-line source data. `csv-table` doesn't have a
`:lines:` directive. I copied and truncated the original file for use
in the documentation.
X-original-commit: 04d4ec33043627747e36730953479557aae278f2
Add reservation information in the forecasted report.
Also this information is used by the forecasted information in
stock move.
closesodoo/odoo#57814
X-original-commit: 87b16dab35c2326220d5bbd51bb7f07e876352d1
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Before this commit, the pad key and server were saved on the company. It was an historical decision whose reasons no longer applies.
The "Root url" called later "URL template" was company dependant but it no longer exists.
closesodoo/odoo#57014
Taskid: 2326514
Related: odoo/upgrade#1739
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Task 2333152
The call to `ref` can not be done in py.js, it needs to be evaluated
before, when creating the action.
closesodoo/odoo#57770
X-original-commit: 1e9ddfbf9dbc8bbe86e3ebc183d5936b146cdf14
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
*: website_blog
- The scroll button option is now again available for all snippets, not
only when the height is forced to 50% or 100%. Indeed, nobody would
think to change that option if the snippet is already naturally tall
and you could well want that scroll button on small-height covers.
- The scroll button is now placed on top of the snippet content instead
of below in its natural flow. This allows it to work with snippets
like "Big Boxes" and actually prevent to miscenter the snippet content
just by adding that scroll button.
- Review the option UI and allow to control the spacing around the
scroll button.
- the "Big Boxes" snippet was at last adapted to work well with 50% and
100% height options.
- The 100% height option has now associated JS so that the height is
computed to use 100% minus the size of the header.
Note: this may be backported to 13.2 where the option was introduced and
where those improvements may appear essential for the feature to not be
considered as buggy.
Part of https://github.com/odoo/odoo/pull/57764
task-2224404
X-original-commit: 9d5cd2c1747488524c107e6165d7c55d74b80606
Issue was spotted in list views containing the "badge" widget with
decorations (e.g. in the Purchase Order list view). At first, the
decorations were correctly applied, but they weren't anymore after
a reload (e.g. after toggling a filter).
They weren't because the list renderer didn't called
'on_attach_callback' on its subwidgets at reload (thus, 'mounted'
wasn't called on its subcomponents, and the decorations are applied
in the mounted hook).
This commit moves the logic from the FormRenderer to the
BasicRenderer, so that it applies on List, Kanban, and Form views.
This commit also removes the transition scss rule on the badge
field widget as it caused a flickering at reload.
Task 2336440
closesodoo/odoo#57766
X-original-commit: 713bce22e8f412f2c26e663b9e30fdd64933ff0c
Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This test ensures that method `Callbacks.run` is re-entrant, i.e., it
can be called from a callback being run. The behavior is to execute the
remaining callbacks, and then resume the current one.
This completes https://github.com/odoo/odoo/pull/57469.
closesodoo/odoo#57778
X-original-commit: 7de434ebc091c4d85615c6cf69240e07b98fe767
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This simply makes it less easy to screw up a database by preventing all
users to do their daily tasks.
closesodoo/odoo#57776
X-original-commit: 665a795fc1b199f4f17cc9f1257d1b36b6276e6f
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Florent de Labarre <florent.mirieu@gmail.com>
When running -i website --test-enable, the test was falsy.
The last page created page was present in matching_page wich one is a criteria
to be excluded from last modified page to avoid duplicate suggested page.
Now we substract correctly them before comparison.
https://github.com/odoo/odoo/blob/saas-13.4/addons/website/controllers/main.py#L243closesodoo/odoo#57777
X-original-commit: 19319a7f88f474a6410ea1dabc6bcc1ac51e97bb
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Without this you have to overwrite the entire function.
closesodoo/odoo#57696
X-original-commit: c2e980c3798c3cf75e4f96b71c7bc81dbad6b78c
Signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
Remove fold/unfold from the tab 'Style', as we have in fact enough
vertical space. For the UX it is better to remove it from there.
task-2327111
closesodoo/odoo#57726
X-original-commit: fd36b2ad01c902b0d5745b0faaabed9afccede17
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
saas-13.5 version of odoo/odoo@15f2bbd40a
The tests must be only imported in a test context, not in a running
context.
Since 92a7f8c a new test requirement was added but it should
not be necessary to run a module, only to execute the tests.
closesodoo/odoo#57728
X-original-commit: 5a74fdad59144a68ed8b6670dbd63731c8090048
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Up to Odoo 13.0, the windows setup is 32 bits and embeds an old
postgresql 9.5 32 bits version too.
With this commit, the postgresql server is no longer embedded in the
resulting setup file. Instead, if the user choose to install the
postgresql server, the 12.4 version is downloaded from the official site
(version 10.14 in the case of a 32 bits windows).
Also, the Python target achitecture is choosen based on the Windows
system on which Odoo is installed.
This imply changes on the KVM images used to build the installer:
- The Windows system on the KVM as to be 64 bits.
- A 32 bits WinPython version must be in `c:/odoobuild/WinPy32`
- A 64 bits WinPyhton version must be in `c:/odoobuild/WinPy64`
A little bit of cleaning also comes with this commit to get rid of the
old `openerp` references.
closesodoo/odoo#57727
X-original-commit: c47d7c67066ff15602b16f18c4c3acebfd3a2755
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
QR-IBAN can be different than IBAN, so we added a separate field
to be able to put the QR-IBAN. It can be in handy in cases of
reconciliation afterwards or when different systems are used
at the same time.
If this field is filled in, we will use it for generating the
QR-IBAN barcode instead of the Account Number.
Thanks to Ravi Gohil.
closesodoo/odoo#57707
Task: 2307262
X-original-commit: 1cca4d9ec624b08cb85b1e53727fd67a3804c95a
Signed-off-by: Josse Colpaert <jco@openerp.com>
We refactored a method to check if the IBAN is in the correct
range to be a QR-IBAN or not. (to be able to reuse it)
Thanks to Ravi Gohil
Task: 2307262
X-original-commit: efd6e493a6d855c12e43e9b3cb7c436c6d7de35a
This warning is unlikely to be triggered during an install, and is problematic
during an upgrade since upgrade scripts will already do the same check but are
able to manage exceptions. The log is kept in log 25 for debuging/monitoring.
closesodoo/odoo#57667
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Add the address in purchase protal so that when in a multiple company
environment, the user can see which company the purchase order comes
from.
Task 2328169
PR #
closesodoo/odoo#57651
X-original-commit: 2081048662c219a181d7309307f021f02fb43739
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Remove the json_forecast of the sale order line,
it was a duplicate of information with the qty_at_date_widget.
But improve this one:
- Use the forecasted move information in case of confirmed SO.
- Change the icon (i) to chart.
- Link to the forcasted change to target new forcasted report
(Unfortunately we loose the feature to see components product forcasted
of a kit)
- Change information print in the popover in case of confirmed SO.
Also refactor the json_forcasted of `stock.move` into multiple fields
to avoid to dump/loads for other model who needed the forcasted data.
task-2324039
closesodoo/odoo#56425closesodoo/odoo#57526
Related: odoo/enterprise#13063
Related: odoo/enterprise#13160
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
- Add a minus before quanity if it describes a output move.
- Remove intermediate section "Pending Incoming Documents" and
"Pending Outgoing Documents". Change other label to be more descriptive.
- "Current Stock" in "Inventory On hand".
- Add line "Inventory On Hand - 0" If no other line
specific it explicitly.
task-2324039
date_deadline of the stock move has been reviewed:
- Now, it represents the datetime when the operation must
be done to be in time for the uppest document (SO/PO/MO/RR).
- At the creation of stock move the date_deadline is computed in
the same way than the sheduled date expected that it is not include
security days (inverse the logic for PO).
- When we update the delivery date (or lead time) of SO (or PO).
The deadline of related stock move is updated and the delta is propagate
between origin and dest moves.
task-2324039
As of Python 3.8 the digestmode arg from hmac.new
is not optional anymore (see https://docs.python.org/3/library/hmac.html).
We now use the hmac helper introduced in 1c7c837
and hash changes from md5 to sha256 (default of the helper).
closesodoo/odoo#57303
X-original-commit: 47de40d38c4f71d64cfb73701cb4fe20a423e4a4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, the design of the agenda was broken on Firefox, as the
'height: 0' property on td was ignored in Chrome and not in Firefox.
Probably a remnant that was not removed.
After this commit, both browser are displaying the same design.
Task ID: 2337855
closesodoo/odoo#57671
X-original-commit: c6c2dc41f818ebc30dca1682e5e2a8305dda2c67
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
Co-authored-by: edi-odoo <edi@odoo.com>
Setting a lead to won or lost should not impact others leads' probability
until they are modified.
Tests have been added to ensure that.
Task ID: 2254543
closesodoo/odoo#57681
X-original-commit: 7edc12e366659d226d56197e09bd65d17c80bd2f
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
Purpose
=======
Get rid of the cron.
Always have an up to date frequency table to compute lead probability.
Clean PLS code and ensure to remove unnecessary code
Specifications
==============
Disable the cron:
- Increment won and lost count for lead PLS params from frequency table at
each won/lost
- The complete set of leads won't be recomputed anymore every day
- A lead probability will only be recomputed if one of the PLS parameter will
be modified (stage_id, team_id + the ones checked in settings)
- No more onboarding phase : as frequency table is always up to date and only
the modified leads are recomputed, we can drop this. (So even on onboarding,
winning or losing a lead won't impact other leads, except the ones we modify
manually afterwards)
- Add an button to force the recompute of all the lead probabilities
(kind of reset) in the settings.
The cron has been disabled by default.
Users can know choose to reactivate it if they want to continue updating their
lead probabilities on a daily basis.
Code have been reorganised for better structure and understanding.
Some code parts have been factorised to be usable in both Live Increment and
Full Rebuild mode.
In this commit, we also update probabilities using only computes
Before this commit, _update_probability was called during write and create,
to ensure both probability and automated_probability were correct. That was
necessary because of onchanges and readonly field (automated_probability
was not given to the write method while saving after a change on the lead).
After this commit, we use the force_save tag on the readonly field
automated_probability. So we ensure that write always receives the new
automated_probability value and everything can be handled directly by the
compute. Also, we force the lead to start in automated probability mode.
So when creating a new lead, both probability and automated probability are
computed and aligned.
Finally, when winning a lead, we ensure that both probabilities are aligned
(=100), so that if user take the lead back to a previous stage, the
probabilities are correctly recomputed, and the lead will not be stuck to
100%.
Also, this commit applies some fix and minor changes listed here under:
- Ensure to have always positive frequencies
- Fix lost counts for team not set in pls computation
- optimise set_won : write only once per values
Finally, include tag in frequency table even if less than 50 occurences:
Due to refactoring in which we increment frequency table at each won/lost
instead of rebuilding the frequency table each day, the tags are never added
in frequency table.
This is due to the 50 occurence conditions that avoid to create the frequency
if we have less than 50 won or lost for a tag.
After this commit, we include the tag_ids in the frequency table, no matter
the number of occurences. But, during the PLS computation, we skip the tag
frequencies if the number of occurences for this tag is under 50.
This allows to have a complete vision on the tag frequencies, even for
small number of occurences.
Task ID : 2254543
X-original-commit: cd291b79eb2d2df80899867263ec71438ab8fe87
Column mappings are updated in-place, if multiple users are importing records
of the same model at the same time, this will trigger concurrency errors.
This is made worse by the error only being reported on commit (after having
processed the entire import) and being retried automatically, so it slows down
the user and the entire system, the more concurrent imports the slower.
Log except:
INFO dbname odoo.addons.base_import.models.base_import: done
ERROR dbname odoo.sql_db: bad query: UPDATE "base_import_mapping" SET "field_name"='name',"write_uid"=%s,"write_date"=(now() at time zone 'UTC') WHERE id IN (%s)
ERROR: could not serialize access due to concurrent update
INFO dbname odoo.service.model: SERIALIZATION_FAILURE, retry 1/5 in 0.8720 sec...
closesodoo/odoo#57655
X-original-commit: 3f5e9ca625b53021c100245f5786bda4069974ad
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
before this commit, when selectioning the snippet with an invalid API
key, a traceback was triggered and the snippet was destroyed.
task-2338730
closesodoo/odoo#57689
X-original-commit: 2c5b0c6b915546ccdac2ed4248f24a4e691fadd1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Currently, In the time off module when we try to open time off
activity from systray view it will open the wrong form view
so it shows the "Save" and "discard" button in the footer.
So in this commit, Fix it by changing the priority of primary
view which is only used for creating new timeoff from dashboard.
closesodoo/odoo#57578
Task-id: 2329080
X-original-commit: 2154e742418b6a2ff87f120d0338bc30b3d4b4dd
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
currently, whenever the view is change the picture zoomed in
and still displayed, only disappears after having refreshed the page
so, in this commit the employee picture should no longer to be
zoomed in whenever change the view
closesodoo/odoo#57576
Taskid: 2311308
X-original-commit: 8214332ccd86e52c4f18de8d5428a1a22f2ad21c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* Prior to this commit, images were only managed when being an image
field. No widget were used either.
* After this commit, image stored in model as url (as res.country.image_url)
can be used when specifying ':image' after the field name. The fields are
now rendered using their corresponding default widget. If there is a need
to force another widget and if the developer is sure that it is compatible,
he/she can specify it using the notation: 'field_name:widget_name'.
closesodoo/odoo#57645
X-original-commit: 18d4e3327c7152b4c3a86ba377e3357f213b703c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- Go to CRM > Settings and activate Leads
- Go to CRM > Leads and create 2 Leads with a different phone number
- Select the 2 created Leads and in Action menu, select Send email
- Make sure that "Lead/Opportunity: Mass Mail" is selected as template
- Send it
- Go to Contacts
2 Contacts have been created from the Leads, but both have the same phone number.
The issue comes from the override `default_get` of `res.partner` in crm module.
It is using `active_id` from context to fetch the Lead to populate Partner data.
This cannot work when several Leads are selected as the same `active_id` is used
for all of them.
opw-2333819
closesodoo/odoo#57638
X-original-commit: a84dcfb9475051082c6103f81bfa231ea50ed157
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
There's absolutely no need to load it on every page of the website. It
probably doesn't even need to be cached on the JS side given it's used
in all of 3 actions of the portal user's security page.
Reported by jke.
Also remove leftover console.log call while at it.
closesodoo/odoo#57636
X-original-commit: 00c1c9a7258cf53f1a40938e3a928151b188de64
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>