Usually in a form view, a notebook is not placed within group/s.
Also, using studio we don't let user drop notebook in a group since it
generates issues with the notebook.(See https://github.com/odoo/enterprise/commit/ea5ccd548bb6781e5ccdf76cf11255c6fd6aa3cb)
This commit fixes the issue by moving notebook out of the group and making
the 'payment.icon' form view structure consistent(and properly
editable with studio).
task - 2060330
X-original-commit: c4efe0173478be8b6a643d5fefef4244384ea6c2
When we post multiple draft moves at the same time, the numbering should
be done by starting with the oldest one up to the newest.
closesodoo/odoo#41138
X-original-commit: 5b745eb61377e5b4532f2e370f9b1559a9b66c0a
Related: odoo/enterprise#6975
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
If a visitor logs in (and has a visitor_id in his cookie), the partner will be
linked to the visitor. If, after 1 week, the visitor tries to connect again
with a different session (or another visitor_id in cookies), the authenticate
will crash because
* _cron_archive_visitors applies on visitor inactive since at least a week
* there can be only one visitor per partner (sql constraint)
* the visitor linked to the partner is not retrieved (because archived) and
we try to link the partner to a new visitor.
Further than that, if the visitor is archived and the linked partner wants to
login again with a new visitor_id, we should
* reactivate the previous visitor,
* copy history from newest to previous one,
* delete the newest one
Note that last two points were already done before this commit.
Task ID: 2120464
PR #40199Fixes#40077Fixes#40301closesodoo/odoo#41273
Original-signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
X-original-commit: 53a6bed3b5c1ae09be490254ed09f18acbb970c4
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
When computing the price of a product through a pricelist item, if the
item was based on anotherp pricelist, the dates and uom weren't given to
the subsequent method call.
As the majority of the calls to those pricelist methods put all their
arguments in the context, it wasn't noticed until now.
Functional example:
Pricelist A:
Rule A1 : 10% discount on Pricelist B, from day 3 to day 6.
Pricelist B:
Rule B1: 5% discount on Sales price, from day 3 to day 6,
Rule B2: 10% discount, from day 7 to day 9.
If today was day 8, the call to pricelist(A)._compute_price_rule(day=5)
would use rules A1 and B2, but should have used rules A1 and B1.
closesodoo/odoo#41295
X-original-commit: df9b113805ed28f274711bb4ba0dd9a2610e5035
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Set a default company since it is mandatory and hidden in mono-company
mode.
opw-2129187
closesodoo/odoo#41259
X-original-commit: ffb6360e87ed8b6fbe5ae19a801230d1f89bc660
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this fix, a QUnit test was wrong (didn't parse)
After this fix, the test actually works and tests something.
closesodoo/odoo#41257
X-original-commit: 3818a7f0df754717a7379dc8341729b508a166be
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Make the domain stricter as well:
* no reason to have / match a token if the payment method is not
electronic
* don't lose the capture mode
* don't remove the company filter though it's probably not useful (as
the journal and payment should already be in the same company so the
check on the token's acquirer's journal should be enough)
The domain used to select the default payment should not matter too much.
Task 2147923
closesodoo/odoo#40959
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Note: the original would only set the domain if
`l10n_latam_use_documents` was enabled but even if the fields are not
shown without that it doesn't make much sense to allow any document
type to be selected when latam docs are *not* being used.
In this revision, the document type is always filtered by available
types and that is only non-empty if we're using latam documents.
Task 2147923
closesodoo/odoo#40955
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Steps to reproduce the bug:
- Let's consider a fiscal position FP with automatic detection for customer in your country
- Let's consider two taxes T1 and T2 where T1 is mapped by T2 in FP
- Let's consider a product P with T1 as customer taxe
- Let's consider a customer C in your country with no fiscal position
- Create a repair order for C
- Add P as an add line
Bug:
T1 was set as customer taxe for P instead of T2.
When manually creating an invoice for C with P, FP is automatically
detected and T2 is set.
With this fix, the automatic detection of FP is applied on repair order.
opw:2120595
closesodoo/odoo#40856
X-original-commit: 3810f9d96246fbc21297b71c34704e87288eb77a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Issue
- Swiss company
- Install Accounting & Studio
- Journals > Customers Invoice
- Communication standard: Switzerland
- Journals > Bank
- Swizz account with CHF ISR subscription number
- Studio > Reports > ISR
Traceback
Cause
If the statement of the `l10n_ch_isr_optical_line` compute
method is False, the value will be `None`.
In the view, we do a foreach on the value which is `None` and
it crashes.
Solution
Set an empty string as default value for the
`l10n_ch_isr_optical_line` field
OPW-2129122
closesodoo/odoo#41247
X-original-commit: a0dc556b0e04c9e89e7f6a8e4e9af045151614f7
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
`custom_layout` should be set as a context key, otherwise it crashes at
creation because of non-existing field.
opw-2146695
opw-2149726
closesodoo/odoo#41238
X-original-commit: f9837eb08a316965057fe239f434b1c6d5c0196c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
steps to reproduce:
-install the manufacturing app
-install studio
-go to manufacturing > click on the studio icon (top right of the window)
> click views > activate the gantt view
you should see a traceback with the following error
"Invalid field 'progress' on model 'mrp.production'"
mrp_production does not have a progress field => removal of the
property "progress" in the view fixes the issue
opw-2144823
closesodoo/odoo#41197
X-original-commit: 31bf253110b9a77ec8d6185b66157cdbfe9e67f5
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
The `session_info` dictionnary is used to bootstrap some JS code client
side (usually in the backend). It includes relevant information, such
as some parameters key for the OdooBot onboarding, the Enterprise
subscription expiration alert, etc. to avoid triggering a lot of RPC
calls upon webclient start.
`session_info` is also called by the remote authentication mechanism
located at `/web/session/authenticate`, which can be used by external
mechanism to obtain a valid session remotely.
Revision odoo/odoo@8a28cc2 introduced the concept of cache keys for
some oft-requested data (such as menus, translations and dynamic qweb
templates) to avoid requesting them on each webclient start, since they
tend not to change often. Unfortunately, it introduced a read on the
ir.ui.menu model that raised an `AccessError` if the authenticating user
was not a member of the `base.group_user` group ('Internal' user type).
While fixing that issue, it became apparent that `session_info`
returns a whole lot of information through this remote connection route
which is entirely unnecessary if not used in the context of a webclient
start, such a currencies, the state of the enterprise subscription, etc.
This commit fixes the access right issue by removing this non-relevant
information from the returned dict (including cache keys) if the user
is not an internal one.
closesodoo/odoo#40770
X-original-commit: 6e99ac2c6cd5ca9af87b4fc7a3a1394359e30b02
Related: odoo/enterprise#6860
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Reproduce the issue
- Load Arabic language
- Install Accounting
- Create an invoice & add credit note
- Switch to arabic
- Click on the "(i)" icon near the total price
The popover is displayed at the other side of the screen
Cause
- RTLcss was reversing the "left: 0" css property to "right: 0"
- The popover configuration was not adapted for RTL
This commit ignore RTL for the popover css "left" property and
configure correctly the JS side
OPW-2146210
closesodoo/odoo#41200
X-original-commit: 88f03f0444a2533b1f6085369af431131da42b54
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
Reproduce the issue
- Load Arabic language
- Install Sales
- Report > Sales
- Switch to arabic
- Click on the pivot view to display the dropdown
The dropdown position is incorrect
Cause
The calculations are based on a `left` value who is weird.
This commit use the mouse X position to compute the `left` value.
OPW-2146210
X-original-commit: d021f4257c87863b75f148c4809f5e2797a1e99f
Move the method `_prepare_purchase_order_line` from 'stock.rule' to
'purchase.order.line'. The purpose is to reuse it in approvals_purchase.
task-2040710
closesodoo/odoo#41046
Related: odoo/enterprise#6702
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
In the case of deletion with `ondelete="set null"`, return_path of
children of deleted record will not have return_path updated.
So remove the children recursively.
Another fix was done in 13.0 to avoid most issue in 6d5cd8b1d19.
opw-2148046
closes#41075closesodoo/odoo#41178
X-original-commit: 6d5cd8b1d194fb173c486355c89d2ce503fd0ba4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- the oderpoint_id field on the purchase order line wasn't used to not
merge the po lines
- if the orderpoint_id field is set, use the orderpoint location to
create the move
- if multiple stock moves with different source locations go through
`_merge_moves`, they should obviously NOT be merged
- `virtual_available` computed field was not being invalidated when the
context keys "warehouse" and "location" changed
task-2001462
closesodoo/odoo#40573
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Purpose of this commit is to add some missing fields in message view, notably
is_internal newly added flag and its ratings. Rating form view is also
updated to display is_internal flag, and form view is a bit reorganized.
Task ID 2071556
PR #38692
PURPOSE
Clean posting process and improve mail.message definition and comprehension.
Move as much possible content from website_* modules to portal_* modules
to ease their use in customer portal
SPECIFICATIONS
Now that website_rating is now portal_rating, let us update translations
files accordingly.
LINKS
Task ID 2071556
PR #38692
PURPOSE
Clean posting process and improve mail.message definition and comprehension.
Move as much possible content from website_* modules to portal_* modules
to ease their use in customer portal
SPECIFICATIONS
Now that publish feature is replaced by internal directly in mail and portal
rating portal inclusion can be done safely in a portal_ratign module instead
of website_rating. It allows to remove the dependency and give the rating
feature of customer chatter directly in portal applications.
LINKS
Task ID 2071556
PR #38692
PURPOSE
Clean posting process and improve mail.message definition and comprehension.
SPECIFICATIONS
In this commit we use the is_internal flag to correctly propagate it from
mail gateway and clean some parent check. In this commit some code is cleaned.
No functional change should occur with this commit.
LINKS
Task ID 2071556
PR #38692
PURPOSE
Clean posting process and improve mail.message definition and comprehension.
SPECIFICATIONS
Website mail defines a website_published field allowing to publish / unpublish
comments on the frontend of some modules. This field has several drawbacks :
* it is used only for front-end people (portal, public) and has no real
effect in chatter / classic discussions;
* it is used only in some advanced front-end module and is not available
in portal by default;
* its naming is not really correct as it is not linked to fields coming
from the website_published mixin and its behavior is not really
the same;
* its use is a bit duplicated with internal flag coming from subtype
allowing to hide messages related to an internal subtype;
* there are overrides of standard mail.message methods just to handle
this flag;
In this commit we change that field by an is_internal flag directly on
mail.message model itself. It tells if share people (customers, share users)
are allowed to read the message. This field can be given through posting
API or set manually using widgets. It is also used in access rights custom
methods and managed like the internal flag of subtypes.
Mailgateway was already using an internal flag for internal note replies. It
is renamed to is_internal and propagated as it is now a standard field. It
also eases code understanding.
Portal is updated to allow managing the flag directly. It means customer portal
now natively allows to moderate customer comments without any need of website
modules.
Rating is updated accordingly. An is_internal field is added, replacing the
related on website published.
LINKS
Task ID 2071556
PR #38692
PURPOSE
Clean posting process and improve mail.message definition and comprehension.
SPECIFCIATIONS
Move description from website_mail directly to mail. Anyway it is a
non stored computed field and therefore having it available directly
in mail does not cost anything.
LINKS
Task ID 2071556
PR #38692
PURPOSE
Clean posting process and improve mail.message definition and comprehension.
SPECIFICATIONS
In order to be more explicit subtype parameter is renamed to subtype_xmlid.
It therefore clearly indicates it should be a valid subtype Xml ID. Support
of ill formatted Xml IDs is removed because there is no reason to try to
add some random prefix. Give something that exists or go to hell, punk !
LINKS
Task ID 2071556
PR #38692
Currently discuss post (through mail or sms) does not allow the author
to be notified of its content, as
* he posted it and is therefore already updated;
* it could create email loops;
However with SMS one could easily try to send SMS to himself using the
sms composer that is different from the mail composer. In that case
just use the ``mail_notify_author`` context key allowing to bypass the
"no author notification" rule.
Task ID 2091685
PR #40650
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Bug
===
The file "public_root.js" try to load "/web/webclient/locale/en_US" with ajax.loadJS
we do not have the address to the Odoo server, so we try to load the file locally
but this file might not exist on the website which is using the widget
Fix
===
Overwrite ``ajax.loadJS`` and ignore ajax loading
(also printing a warning message in the JS console)
Task #2081146closesodoo/odoo#41177
X-original-commit: 50f8508ca8569acc538a2af6a3c1162d39f834cd
Signed-off-by: std-odoo <std-odoo@users.noreply.github.com>
Previously, when grouped by state, user was able to drag
and drop kanban boxes to alter the state of an unbuild, a
purchase requistion or work order. However the state should
be readlonly and could only be modify via public methods on
those objects. Those methods do additional required stuff than
just modifying the state.
task-2087309
closesodoo/odoo#40759
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Renames the file created by the build,
from "posbox.img" to "iotbox.img"
closesodoo/odoo#41190
X-original-commit: 3abe39e785d28d1e0b1a18eb9b98c1d341e5a116
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Kpartx did not erase the mapping correctly
Now we delete the mapping directly in "/dev/loopx"
X-original-commit: a33482ed703d162e79493b05a01e9724912b0385
Use case:
Plan a production of 10 units on 2 workorders. Produce 4 units of lot1.
Record the production and produce the 6 next ones with the same lot1. On
the second workorder, the suggested quantity is 4 and not 10.
This issue is due to the fact that we fill the next workorder quantity
only at the first production batch and we don't check that the same lot
can be used again.
This commit call the mathod to update the quantity on the next workorder
if the first lot is produced again.
closesodoo/odoo#41189
Opw: 2127665
X-original-commit: e15fc6ac994edabc8907c13295c883cff9320d10
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
After commit odoo/enterprise@8a38a60b1f
mobile tests didn't run correctly because of missing viewport META in HEAD.
This commit add the missing META. This META must be before all
JavaScript file to ensure that JavaScript also know that we work in
a viewport.
Note that "runbot" run tests in a chromium headless with a size screen
reduced and so it worked without this fix.
closesodoo/odoo#41183
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Managers could see only their sessions like other operators.
Now they can see all the sessions so they can check and help the operators.
task-2048498
closesodoo/odoo#41175
X-original-commit: 6ae791335a1986aa4cc72f7ed9aadd471c1774c5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The field user_id was created twice in the model with the same values and options, only a different help message. This removes the duplicated one.
closesodoo/odoo#40542
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
When printing the 'Picking Operations' report in case of a receipt,
lines are duplicated.
This is because we need to print the `move_line_nosuggest_ids` as
displayed in the view.
opw-2125049
closesodoo/odoo#41168
X-original-commit: eed3171f2f057223c3fbedd95ce6bcde2124f46c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
PURPOSE
Improve mail template preview wizard by improve its views and displaying
more rendered fields. It helps users knowing what will be sent to customers.
SPECIFICATIONS
Rename template model to mail_template_preview to better match the mail
template namespace.
Remove _inherit on mail.template and instead choose fields to compute
and display. Indeed lot of fields are unnecessary or badly computed.
Instead just add fields on the wizard that depends on mail template
and will be computed based on mail_template_id field of wizard.
Improve error management.
LINKS
Task 2085912
PR #38708
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently when rendering a template crashes, error is not easy to
understand as it is hidden in a generic message. Purpose of this commit is to
improve this message to indicate why the template fails to build (only the
first error encountered).
Task 2085912
PR #38708
Purpose of this commit is to improve livechat demo mode by adding conversations
spanning on several months and with ratings and different operators. That way
we have beautiful data to show in demo mode.
Task ID 2075287
PR #37355
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Purpose of this commit is to improve search capabilities of eLearning
frontend application. Searching tags and content should be easier to
do, update and notice.
SPECIFICATIONS
Before this commit
- There is no visual indication to what are the selected filters.
- The user can only select one tag in each dropdown box.
- When the user selects a tag on one course card, this tag replaces all other
filters.
- When the user enters custom search terms, it replaces all other filters.
- When searching a documentation, a stacktrace appears.
After this commit
- Selected tags appear as little tag boxes under the search bar.
- The custom search terms appear as one tag box.
- It's possible to remove a search tag by clicking on the cross present in each
little box.
- It's possible to select multiple tags in each dropdown box.
- Tags in course cards work the same as tags in dropdown boxes, and add
themselves to the list of filters.
- To generate the list of courses to display, a logical OR is operated between
tags of the same group, and a logical AND is operated between groups of tags.
- A logical AND is operated between the custom search terms and other filters.
- A logical AND is operated between the "My courses" options and other filters.
- Bug when searching a documentation is fixed.
LINKS
Task ID: 2080617
PR #39259
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Note that this also add data-oe-model and data-oe-id in XML.
This allow us to avoid to load these links as external URL when
a user receive it in inbox instead of external mail client.
See file addons/mail/static/src/js/thread_widget.js -> _onClickRedirect
Task ID: 1895451
closesodoo/odoo#39958
Related: odoo/enterprise#6414
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit fixes the traceback that happens when we try to create
a question from the survey form in mobile mode.
The problem was due to the context not being propagated
to the "add record" button that appears in mobile mode.
Therefore, as we use that context in our widget, it crashes.
The solution to this is to just use the normal tree view behavior
instead of our override when we are in a mobile environment.
LINKS
closes odoo/odoo#41143
Taskid: 2071342
Pr: #40694
X-original-commit: 0dc7d956c59dfbece1f05e475c227affd51ce435
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fixes the traceback that happens when we try to create
a question from the survey form in mobile mode.
The problem was due to the context not being propagated
to the "add record" button that appears in mobile mode.
Therefore, as we use that context in our widget, it crashes.
The solution to this is to just use the normal tree view behaviour
instead of our override when we are in a mobile environment.
LINKS
Taskid: 2071342
Pr: #40694
X-original-commit: b394a67ccd527b4ff88f0b59083fd3b59cf97681