Before this the `--unaccent` flag does double duty to specify whether
to create new databases with the extension *and* to try to use the
corresponding function.
The latter is further gated on the function existing at all in the
database.
Given postgresql does not have unaccent installed by default it seems
only the latter is really useful and we can ignore the flag to decide
whether to enable unaccent features, if the extension is installed
consider that it should be enabled and move on.
Merge this in master rather than previous versions as it can change
things like index access / use.
closesodoo/odoo#47377
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Fine tuning of 1e411e3a6d
- It moves the attachment in the message when we mark an activity as
done.
- It adds a test
OPW-2196668
closesodoo/odoo#47349
X-original-commit: 2033066426a6af6eed5f80f1bcde6e650e998f0d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Set 'Product Unit of Measure' to 5
- Set the UoM rounding to 0.001
- Create an excluded tax of 6 %
- Create a product costing 7.0
- Open the POS, add the product with a quantity of 0.535
The tax is 0.22 instead of 0.23.
The root cause of the issue is the in JS:
```
round_pr(0.535, Math.pow(10,-5)) * 7 = 3.744999999999999
round_pr(0.535, 0.00001) * 7 = 3.745
```
The numerical error impacts the tax computation later on.
As a workaround, we round by the maximum between the UoM rounding and
the 'Product Unit of Measure', which is what will be done in the backend
anyway.
opw-2205092
closesodoo/odoo#47372
X-original-commit: 125cdf96e94a94146804091ad47e701240c2529e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Commit ca4eaf4 introduced the data-mobile attribute, used
to specify options to pass when executing an action, only in
mobile (like using a fullscreen modal).
However, we forgot to add the 'isMobile' check, so the option
was passed in desktop as well.
This commit fixes the issue and adds some tests.
Task ID: 2155601
closesodoo/odoo#47333
X-original-commit: 6cb68a53106fa7326a7f818461418437d5a0df77
Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
If the bank account number is a postal one, search differently
to see if the account already exists. As for a postal account,
the same number can be used by multiple partners, changed the
account to include the name of the partner, but for this
we need to alter the way the account is searched/created.
closesodoo/odoo#47365
X-original-commit: b95b9d6db2af51644f640142d5a0b9ca72eac52f
Signed-off-by: Josse Colpaert <jco@openerp.com>
When reconciling and the bank account is not found, the system
wlll automatically create one. Here we refactor the method
checking/creating this bank account in order to be able to inherit
this functionality.
In the meantime, we added the company_id for the newly created
bank account in order to avoid problems when you are operating
on multiple companies at the same time.
X-original-commit: a63bd575166e4b07345fdcfa1c7d5bb9560821c8
This PR adapts some existing steps or add new ones to execute
the same tour on mobile.
This tour has many steps and give a good idea to know if new tasks
broke mobile or not.
The goal is that even if the design isn't perfect, users aren't blocked
and are able to perform their usual tasks.
The main flow tour is still running on desktop but
we also run it a second time on mobile.
It's only available in enterprise, otherwise the test will be skipped.
'375x667' correspond to the Bootstrap XS size.
This value is already used for the mobile tests suite.
Also see https://github.com/odoo/enterprise/pull/9011
Task ID: 2149402
closesodoo/odoo#46880
Related: odoo/enterprise#9011
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit adapts some existing steps or add new ones to execute
the same tour on mobile.
This tour has many steps and give a good idea to know if new tasks
broke mobile or not.
The goal is that even if the design isn't perfect, users aren't blocked
and are able to perform their usual tasks.
Task ID: 2149402
This commit moves some step utils in a dedicated file and add new ones.
These steps will be very useful for the Main Flow Tour to avoid
duplicated code.
To do this, we also had to transform it into functions to allow
utils to call each other. Existing one are converted for
standardization purpose.
Note that 'WEBSITE_NEW_PAGE' wasn't considered as an util.
This is a very simple step only used twice.
In this commit, we are still running the main flow tour on desktop
but we also run it a second time on mobile.
It's only available in enterprise, otherwise the test will be skipped.
'375x667' correspond to the Bootstrap XS size.
This value is already used for the mobile tests suite.
Task ID: 2149402
We are not able to precise in which case a step should be executed.
We already have 'edition' and now we introduce 'mobile'.
undefined: Desktop + Mobile*
true: Mobile* only
false: Desktop only
*: Responsive (<= SM), see isMobile
Note that tours shouldn't be language dependent.
By using XMLID's we are able to find a menu even if the tour
is running in another language.
The tip has been moved slightly but it's not a big deal,
others selectors menu already used XMLID's.
Before this commit, the tip for a many2X field was consumed with a
input event.
But on mobile we doesn't have the same behaviour; a kanban modal is
opened when we click on the many2X field input instead of writing in it
(auto-complete) like on desktop.
After this commit, the tip is consumed with a click event for many2X on mobile.
Since commit: odoo/enterprise@e662ef3629
a 'div' wrapper was added around the notebook header.
The tip was not visible due to it's location in the wrapper with
'overflow: hidden'.
After this commit, the tip is appended to the ancestor of the wrapper
and so it's visible again.
Before this commit, when you tried to run a tour by clicking on
"Start Tour" in the debug menu, nothing happened and a warning
message appeared in console:
"debug_manager.js:53 No handler for start_tour".
Now it will work on mobile too (debug mode only).
We had to do this to be able to run the main flow tour on mobile.
Note that another commit (in enterprise) will automatically consume
all tours to avoid to display it for demonstration purposes.
Task ID: 2149402
Previously the widget was not refreshed everytime it was opened.
Now that it is the case and since the color picker rerenders every time
we select a color:
It is no longer required to select/unselect the colors.
It is no longer required to add custom colors to existing colors.
Part of: https://github.com/odoo/odoo/pull/45872
task-2212288
closesodoo/odoo#47355
X-original-commit: 481fe703e9400fb64e96291914f76d4dca883e29
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When a default color matches a theme color it will now select the theme
color class instead of a css attribute when clicked.
Part of: https://github.com/odoo/odoo/pull/45872
task-2212288
X-original-commit: d7b3538a814f0e53cd3c5816f8296ad5e4c5f41a
Purpose of this task is some people would like to make accrual in days
but currently accruals work on different periods(week,month,year).
So in this commit, we added "days" as "interval unit" for leave
allocation with type accrual.
closes odoo/odoo#46751
Taskid: 2168023
Closes: #46751
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently on a Sales Order Portal view, the field 'date'
under the delivery order shows the creation date of deliveries
linked to the SO,
After this commit it should display the 'effective date'
(or'scheduled date' if not yet delivered) of deliveries linked to
the SO
task:2180525
closes odoo/odoo#46633
Closes: #46633
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Avoid traceback when click on edit and nothing is editable on the
page.
task-2199214
closesodoo/odoo#47328
X-original-commit: fd92a78bd18a0fd765d9c3a857adc10e29c025dd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Follow-up of d0c852f
The parser of `many2one_reference` was not introduced when the new field
type was created and then later when the formatter was added, which
leads to errors when the web client is trying to set the value of such
fields.
Since the value of this field is an ID, it is parsed as an integer.
closesodoo/odoo#47330
X-original-commit: db1e16bc041e1d892fd1f3ac5b694e12496a32f9
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
_prepapre_tender_values in only call from purchase_requisition_stock.
It's not needed to have 2 functions, everything should be in
purchase_requisition_stock.
Allow to propagate custom information to upper document. It could be
usefull in many buisness that do custom stuff for people
(t-shirt with user defined text, poster with own pictures...)
The customes values are pass throught procurements'values and are
display on MO or purchase order line.
Task: 1970476
The report layout was refactored before, but we forgot
to give the specific German lay-out a name, although the field
was added. This gave a traceback when we wanted to
select a lay-out or this particular lay-out (name False)
in the Settings.
closesodoo/odoo#47321
X-original-commit: 162eb09159a8e8836d5decd6d1a210d2659b55a9
Signed-off-by: Josse Colpaert <jco@openerp.com>
The unaccent extension was installed only at restore, not at creation
of a database.
Make both consistent.
closesodoo/odoo#46534
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Some option sections are feeling really laggy (especialy the theme ones
we now have in master/13.2). This was due to the "preview" activation of
the snippet being triggered on mouseover and not on mouseenter.
Introduced by: https://github.com/odoo/odoo/pull/36068
task-2198177
closesodoo/odoo#47303
X-original-commit: d85d912de513de5c81c85a8ff814e0af1e13cefd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This PR allows one to build the user documentation with python 3 and sphinx>= 2.4.0.
It also removes several warnings.
Remove autogenerated JS doc (backport from master)
closesodoo/odoo#47295
Forward-port-of: odoo/odoo#47169
Forward-port-of: odoo/odoo#46069
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Partial cherry pick of e4b75149f7
Sphinx 1.6.7 is the minimum in debian stable and ubuntu LTS
X-original-commit: 516e7854fd61c75865bb444e3614cad20283275e
Steps to reproduce:
* Create a template with 2 variants
* Archive one variant
* Unarchive this same variant
--> the template is archived
This is due to commit 6a13b565cbbad89ff1c4177b171b01f30c83edf9. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants
closesodoo/odoo#34769
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit when a user archives the product, the barcode
field in its template used to get disappeared.
Since barcode field in template is a related field to product,
the field gets invisible in product template when the user archives
the related product.
After this commit, even when a product is archived,
its barcode will still be visible in template.
Here the barcode field is changed from related to computed.
task-1978559
If you want to de-activate the multi company ir.rule, those checks will
still raise an error.
Task 2198433
closesodoo/odoo#47291
X-original-commit: 12a81a3a5265cbd18f5c00ab439cd1486696521b
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
Issue
- Install Sale
- Create SO
- Add a note line with a very looong word
- Print PDF
No line break, table is expending out of
the visible report.
Cause
There is no line break CSS rule
Solution
Use word-break: break-word; in order to
break line without cutting words.
OPW-2195984
closesodoo/odoo#47272
X-original-commit: af8fb786a9569562cefb7d8ea63454cddc04cd44
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Since 13.2, the cards cannot contain an overflowing element anymore as
we needed to enforce 'overflow: hidden' for the border-radius option.
Note: this commit adds data-vxml="001" on the snippet. This will allow
users which have already added the card version of the snippet in their
website to receive a notification that the snippet is deprecated once we
will have implemented that system (in progress).
task-2208802
closesodoo/odoo#47228
X-original-commit: 220ec38e7538389279eb2dce9c897052d680ea1a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
No default url on countdown's urlpicker anymore. Only a placeholder.
Also redirect to homepage if no url.
Part of: https://github.com/odoo/odoo/pull/46640
task-2210358
closesodoo/odoo#47235
X-original-commit: a0d983e94e3681a3f3e55cc445defc1ec862c606
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The urlpicker was not closing properly when a value was selected.
Part of: https://github.com/odoo/odoo/pull/46640
task-2210358
X-original-commit: 6f722d919cd650d5c0b1b9c4a878fd519267c348
- Create 2 companies A & B
- Set the website in A
- Set the user in both companies, main company being A
- Create a SO template in company B
- Click on "Design Template"
An AccessError is raised because:
- `slug` accesses the `display_name` of the template which is in company
B
- the `allowed_company_ids` is set to company A in [1]
A solution could be to always set:
```
context['allowed_company_ids'] = request.env.user.company_ids.ids
```
But the side-effects could cause other issues.
Therefore, we handle the `slug` manually.
[1] https://github.com/odoo/odoo/blob/af411b866aa2052c01168342f8f05ae3dabad83e/addons/website/models/ir_http.py#L203
opw-2194103
closesodoo/odoo#47249
X-original-commit: 0bcfffd291aceb74a5260a49d2fa3032f511dba1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit takes advantage of modern JS syntax (like Fetch API, arrow
functions) to shorten the `odoo.reloadMenus` function's implementation.
Original implementation of this function was in commit 8a28cc22fd
PURPOSE
Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.
SPECIFICATIONS: GLOBAL RULES
Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.
Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.
Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.
SPECIFICATIONS: OTHER COMMITS
Perform some light code cleaning before updating fields.
Keep some explicit onchanges:
* onchange partner on registration: required as UI flow is a bit different
from automated code update;
* onchange track boolean on event: allow to simplify fields dependencies;
Rename event type default_registration_max to seats_max to match
naming.
Improve event type data and demo
See sub commits for more details.
LINKS
Task ID 2089156
Community PR #42911
Upgrade PR odoo/upgrade#912
Related: odoo/upgrade#912
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to have matching names between event type and event to ease code
understanding.
LINKS
Task ID 2089156
Community PR odoo/odoo#42911
Upgrade PR odoo/upgrade#912
Currently website_menu boolean field is not copied when copying an event. It
comes from an issue related to duplicating website menus. It seems real issue
has been fixed at 1a8993e0cb . Current copy=False on website_menu is a wrong fix
due to some mismatch in forward-port. We can therefore copy website_menu
again.
LINKS
Task ID 2089156
Community PR odoo/odoo#42911
PURPOSE
Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.
SPECIFICATIONS: GLOBAL RULES
Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.
Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.
Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.
SPECIFICATIONS: WEBSITE_TRACK(_PROPOSAL)
Keep an explicit onchange for tick / untick of website_track_proposal. Indeed
otherwise you have a loop of dependencies between website_track and
website_track_proposal
* untick website_track: website_track_proposal = False (done in _compute_website_track_proposal)
* tick website_track: no effect
* untick website_track_proposal: no effect
* tick website_track_proposa: website_track = True
It would be complicated to write in computed fields, as they depend on each
other, on cache and current values, ... It is therefore simpler to keep an
onchange: when ticking website_track_proposal set website_track as True in
interface.
LINKS
Task ID 2089156
Community PR odoo/odoo#42911