Changed the way some field types are displayed.
Before this commit, column width in a list were calculated according to
a given factor (integer), determining their weight.
Now, some specific fields have an hardcoded width instead. This task
also slightly tweaks some width factors, in order to try to have a
better layout in most list views
Task 1985916
closesodoo/odoo#35147
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Before this commit, in list editable, when user save multiple records in
the same time, the context is passed for the write but not for the read.
Now, the context is passed also for the read.
closesodoo/odoo#35113
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
The initial implementation of the special group by buttons in list
groups only supported the first level of groupby. So, if one grouped a
list view by field A, it worked (if A had a groupby defined). However,
if we want to group by B/A, this no longer works.
opw 2040725
closesodoo/odoo#35090
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Having an assert that randomly breaks is quite annoying, as this assert
is not critical and breaks once every 100 - 120 builds. It can "safely"
be commented out before being fixed
closesodoo/odoo#35043
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
There was an error in this tax's repartition. A tag was wrongly added to its base.
closesodoo/odoo#34245
Signed-off-by: Josse Colpaert <jco@openerp.com>
Under certain unknown conditions, the range cannot be applied and
triggered an error. In order to allow the user to keep editing, we need
to prevent the dialog from showing, hence the use of `console.error`.
If this error appears, the carret is moved to the beginning of the focused
node.
If this error appears, then bullet can generate an error (I managed to
have the bug once or simulate it by manually breaking the dom and range)
We suspect a wrong snippet custom javascript code.
see: https://github.com/odoo/odoo/pull/34188closesodoo/odoo#34871
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Let's assume a form view with a readonly many2one field with a
default value. When creating a new record, the user can click on
the many2one value, which should open the related record in a form
view (stacked in the breadcrumbs).
Before this rev., this didn't work: we actually came back to the
previous view/action in the breadcrumbs, when trying to open the
related record.
closesodoo/odoo#33172
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Steps to reproduce the bug:
- Create an invoice I
- Set the invoice date in the past and add payment terms
- Validate I
- Create refund from I
Bug:
The invoice date is set as today but the due date was set in the past.
opw:2033438
closesodoo/odoo#34748
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
During checkout, the user can create a new billing (only for public user as it
will create a 'normal' `res.partner`), a new shipping, edit its billing (that
will edit himself) or edit its shipping address.
All those cases will go through the exact same methods, public user and logged
in user included.
This previously led to multiple issues and multiple fixes to correctly set
`company_id` and `website_id` on the address (res.partner).
See 44372471ef that fixed the `website_id` part.
See 3a0f05f33 that fixed the multi-company behavior, but needed 2ba71140 to not
modify the company of an already created partner, but was still incomplete as
after that fix a logged in user would still have the admin (sudo) company
instead of the website one as supposed.
This commit will fix that bug and add some tests for all mentionned issues.
Fixes#28853
Backport from odoo/odoo#34596closesodoo/odoo#34689
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When a pl promo code is applied, the code is shown in the promo code input.
Before this commit, if the user clicked on "Apply" (so with the same code) it
would remove the pl as it would go in the `if` condition that is supposed to
handle empty code modo to reset pl.
Coming from #34633closesodoo/odoo#34734
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Forward port of a8dfc7fb73
Before this commit, when a transaction has as status 'authorized', the
transactions' confirm page gives an error : 'Oops! There was a problem
with your payment.'
Now, the page gives the same message as when the transaction has the
status 'done' : 'Your payment was successful! It may take some time to
be validated on our end.'
opw-1984325
Prevent singleton error when validating stock.picking with option cancel_backorder
in case there are multiple backorders involved by displaying all the backorder's names separated by commas.
opw: 20337021
closesodoo/odoo#34709
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Have a Tax 24%, included
Have account.voucher with a line reading:
`Price: 64.93; Tax: 24% Incl`
Validate the voucher
Before this commit, the account.move.lines created were wrong and unbalanced
as the amounts that should have been affected by the tax included haven't been
After this commit, the move and its lines are correct and balanced
OPW 2031751
closesodoo/odoo#34784
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Go to the database manager, configure a password either via the
interface either via the `admin_passwd` `.odoorc` config file. Click on
the backup menu, let the `password` field empty and submit the form. The
modal is closed without any warning and no query is sent.
The problem is that even if the field is marked as `required`, there is
a event listener that catch the `onsubmit` event and close the modal
even if it is not valid.
opw-2031461
closesodoo/odoo#34669
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Before this commit, values were rounded to the unit, which was part of the former specs
of the Intrastat report
After this commit, we make the intrastat 2019 comply with the new spec, which is to round
value, price and weight to two decimals
See the spec here: https://www.nbb.be/doc/dq/f_pdf_ex/nieuwsbriefintrastat_n28_2018_fr.pdf
OPW 2031682
closesodoo/odoo#34700
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The patch fa492d87f4 has been backported
from Odoo 12.0, that runs on Python 3.
The string '\n\n({} {}, {} {})' to be formatted is a byte-string in
Python 2, while the return value of _() is always a unicode-string.
As format() is (too?) nice, it attempts to convert the unicode-strings
into ascii in order to inject them in the format pattern.
With some languages that are written in ascii, this works -- by chance.
When you use non-ascii languages like Japanese, it fails.
We then fix that issue by using unicode-strings in the formatting
pattern.
#OneCharacterPatch B-)
opw-2032016
-----------------------------
For full technical understanding:
Python 2.7.16 (default, Mar 11 2019, 18:59:25)
[GCC 8.2.1 20181127] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> '{}'.format('test')
'test'
>>> '{}'.format(u'test')
'test'
>>> '{}'.format(u'エ')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30a8' in position 0: ordinal not in range(128)
>>> u'{}'.format(u'エ')
u'\u30a8'
closesodoo/odoo#34698
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
Before this patch, if some module was based on top of `auth_signup`, and `auth_oauth` was also installed in the same database, the only way to get the proper qcontext would be to call `super()` inside `web_auth_signup_qcontext`, which would produce a login, which is most likely not desired because such addon would try to add some logic on top of it that maybe prevents login based on some circumstances.
After this patch, any submodules can work properly without workarounds.
closesodoo/odoo#34690
Signed-off-by: Christophe Simonis <chs@odoo.com>
The @import directive in less leave the @import as is if it detects .css
extension. Otherwise it will use the less import.
Since less 3.0.0 less/less.js@77fde7eb7 checking css extension regex
changed from:
/[#\.\&\?\/]css([\?;].*)?$/
to:
/[#\.\&\?]css([\?;].*)?$/
thus all our import of google fonts with URI like:
//fonts.googleapis.com/css?family=FontName
now are getting imported as less, thus they are included directly in the
output file with HTTP scheme URL which may be blocked on HTTPS instance.
With this fix, we specify that the import is a normal CSS one with (css)
import option:
http://lesscss.org/features/#import-atrules-feature-css
opw-2057037
closes#36167
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Insall website and mass_mailing, go to the `/sitemap.xml` url, the
`/unsubscribe_from_list` url is listed, it should not.
opw-2033251
closesodoo/odoo#34677
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Install website_slides, create a bunch of users all published on the
website. Using raw sql queries, give some karma to those users. Go to
the `/profile/users` web page. When connected the ranking is correctly
shown, when not connected all users are ranked 0.
The problem is that the public user (id: 4) can only access is own user
which prevent him to access the karma of the other user required to rank
them.
As the injected IR Rules are not adding any value and that a domain is
applied already, it is safe to skip the ir rules.
opw-2029105
closesodoo/odoo#34656
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The default value for a many2one on res.currency should be a currency
not a company
closesodoo/odoo#35005
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the signature tour (130af96dc1) would fail sometimes.
Indeed, the tour is trying to get `Thank You` on the page after the sign step
but since the modal to pay will open on top of the page, the `Thank You` would
not be found.
closesodoo/odoo#34990
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Before this commit, the close button on the thread window was
too small to click on it. The padding of the button wasn't over
the all available area.
After this commit, the padding of the close button is higher and
so the user can target it more easily on a small screen.
We had to reduce the padding of the parent.
Step to reproduce:
- Open the "Discuss" app
- Go to the "Channels" tab
- Open a channel
- Try to tap on the close button on the top left window
Task ID : 2033828
closesodoo/odoo#34977
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This fixes a bug in Website, that can be reproduced like so:
- insert a snippet
- insert a char in it
- 2x CTRL-Z
The second CTRL-Z didn't do anything because Summernote moved the range
to the header, which is not editable. This fix moves the range to the
first editable element in the editor in these cases, thereby keeping the
focus in an editable area, and ensuring that hotkeys still function.
The history feature being non-tested as of this version, no test could
be added for this fix.
closesodoo/odoo#34834
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Writing the country_id of the main company in demo data disables demo
data installation if installing multiple l10n, this is caused by a wrong
check of the vat field (base_vat).
Two approaches can be used here:
- Always write on country_id in all l10n demo data
NB: this also implies writing the country_id first in order for the
vat check to be done using the right country code
- Never write on country_id in any l10n demo data
The prefered approach for the moment is to never write on the country_id
of the main company.
This approach is easier to apply as it is a mimimal diff and the first
approach would require deeper changes to the code in order to allow
writing all the information in a single `record` tag in the demo data
closesodoo/odoo#34905
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
When (un)registering a typing members of a channel, the discuss
sidebar must be re-render. This is necessary in order to display
the typing indicator next to discuss items, i.e. '...'.
When receiving a message from a typing member, this person no
longer becomes a typing member.
Before this commit, for each new messages, the discuss sidebar
was re-rendered. This happens due to unregistering the author
from the typing members of the channel, even when the author
was not a typing member in the first place.
With this commit, when the list of typing members of a channel
does not change, the discuss sidebar won't re-render and slow
down the whole UI.
opw-2035443
closesodoo/odoo#33616
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Before this commit, chat window's out-of-office info did not change
when direct partner's `im_status` is/was on 'leave'.
Users had to reload page to see updated out-of-office info.
Task-ID 2007663
Before this commit, most new messages added to the mail manager were
handled as if recently posted from a document thread. As a result, it
was frequently setting a new item in the local storage to notify
other tabs from these new messages.
The intent of this behaviour is to notify other tabs of newly posted
messages in a document thread, without using a longpolling
notification. That means this logic should only apply on messages
that have been recently posted on a document thread.
Sometimes, this issue was breaking the local storage on Firefox.
It showed the error message "Quota Exceeded Error" whenever `setItem`
was used, even when items were removed beforehand. The capacity of
the storage was only a few Kbs on this domain, far from reaching the
maximum capacity. We think that this error comes from the concurrent
`setItem` on multiple tabs, but this is very hard to reproduce.
This commit fixes the issue by limiting the `setItem` to the tab
that really posted the message. Tests have been adapted in order to
pass only with this fix.
Put toogle_button or a favorite widget to handle a boolean field in an editable list
click straight up on the widget's button or link
Before this commit, the widget changed its appearence, but the changes were not
propagated to the model. This is because the controller will not force_save if its mode is edit
(to let changes piling up and save everything when clicking save), which is the case
of the editable list
After this commit, following what has been done at 2f5e44d40b
clicking on a widget in an editable list just activates the row for editing
but doesn't change the widget's value
OPW 2033700
closesodoo/odoo#34878
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>