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 we have eg. a report with a page break (eg. `Print On New Page`
enabled on a financial report section) the encoding is broken.
The reason is that lxml.html fragments_fromstring function accepts text
string (OK in unicode) or bytestring => the encoding will be guessed (by
chardet library) if guess_charset argument is set to true.
So since we do not pass guess_charset option, the encoding is not
recognized.
In this changeset, we give a text string to the fragments_fromstring
function since it seems that all our input should be in UTF-8.
note: lxml.html itself uses html5lib.HTMLParser parseFragment that takes
a charset argument, but there is no interface through
fragments_fromstring to specify the charset.
opw-2146715
closes#41255closesodoo/odoo#41289
X-original-commit: 1d3d517aad08887970e4ba2d9290e260faacae2d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.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>
With the reload from attachment ticked (attachment_use) when dealing with
a single pdf, the attachment's content must be returned without calling _merge_pdfs
in order to preserve the embedded files. Since PyPDF2 doesn't support completely
the embedded files, there are simply dropped with creating a new pdf in _merge_pdfs even
with a single attachement.
closesodoo/odoo#41246
Issue: https://github.com/odoo/odoo/issues/41079
X-original-commit: a8f96bc7f35d047999cd16b7dd03bcddd3c32263
Signed-off-by: Laurent Smet <smetl@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>
New fields created from `ir.model.fields` view form are copy=True by
default (copy=False in case of One2many) thanks to an onchange but
manually created fields were not (e.g. created from Studio)
Task: 2067885
Do not remove the country set on the company when the state is removed.
closesodoo/odoo#41234
X-original-commit: dfa2a3b7c5d75bfc5a3e5f07171daf373b319ed8
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
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 without having to depend on website.
SPECIFICATIONS: MAIL.MESSAGE DESCRIPTION
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.
SPECIFICATIONS: MAIL.MESSAGE WEBSITE PUBLISHED
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 merge 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.
Also rename subtype parameter of message_post to subtype_xmlid. 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 !
Finally mail.message and rating.rating form views are updated to include
is_internal flag and perform some view cleaning. An entry of ratings in
Technical/Discuss is added for debugging / management purpose.
SPECIFICATIONS: MOVE WEBSITE RATING TO PORTAL RATING
Now that publish feature is replaced by internal directly in mail and portal
rating portal inclusion can be done safely in a portal_rating 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
Related: odoo/enterprise#6410
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.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>