Simple `this` instead of `self` mistake which prevents the widgets to
trigger up events.
closesodoo/odoo#44617
X-original-commit: 033ad6680794e037566720f35b0285e18f3d2130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When an order is synchronized to the server, there is a timeout of 7.5
seconds that is left before considering that the order has not been
synchronized, and should be re-syncronised.
Since syncronization of order in pos_restaurant have been made, there
are more operations than before that are performed, and the
synchronization of an order can take more than that.
The validation of a picking can also take a lot of time, almost when
products are kits and compose of multiple products.
The problem, is that if it takes more than 7.5, the same order will be
pushed again to the server, even if the previous sychro still running,
which will lead to wait the previous request that has the lok on the
same records, all this blocked request can lead to block all workers of
the server because all requests are trying to modify same objects.
So we've increased the timout for flushed orders.
closesodoo/odoo#44615
X-original-commit: 9452c3f873c86a4c8502695720be942a76d4d25d
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Purpose
=======
Before this commit, the method _mail_find_partner_from_emails could
return a list mixing partner ids and partner recordset, that could
lead to issue when trying to read the different elements.
With this commit, we ensure that we return a list of records only.
closesodoo/odoo#44608
X-original-commit: 2fbbbd8609fd2e08545ddb1ab8e2d7d22ee4d292
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Task 2080625
There are now 2 modules:
* account_inter_company_rules
* sale_purchase_inter_company_rules
This allows to use the feature without having to install sale and
purchase.
closesodoo/odoo#43039
Related: odoo/enterprise#7636
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
The fact that there is a company id set means that you cannot select the
partner in a M2o if you didn't select the company in the selector, and
that you cannot open a document where that partner is set if you are not
in the correct company.
This is an issue for inter_company_rules, as you should be able to
select the company to make a so, po or invoice to a company of the same
database.
*: website
This reviews the latest posts snippet and its options. Theme options
(available in graphene and avantgarde themes) have been made
standard, the hover effects on the images have been rewritten as they
were broken since the snippet's DOM had been altered in bb0cdec459 and
the css rules no longer applied.
The number of posts option has been removed in favor of a fixed number
that depends on the screen size so that the layout looks good on all
devices (3x1, 2x2 1x3).
The list, big picture and horizontal layouts of this snippet have been
fused, and the layout is now an option on the snippet. A new option has
also been added to choose which posts are displayed: most recent or most
viewed. Lastly, a new 'cards' layout similar to the one on odoo.com has
been added.
See sub-commits for details.
task-2152188
Linked to https://github.com/odoo/design-themes/pull/198closesodoo/odoo#42466
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
* website
This commit reviews the latest post snippet(s). It fixes the list style
option and renames it to "Hover effects", most of the css for those
effects were broken, since the XML had been altered in bb0cdec and the
css had not been adapted, resulting in most rules being unable to target
anything.
The number of posts option has been removed in favor of a fixed number
that depends on the screen size so that the layout looks good on all
devices (3x1, 2x2 1x3), this makes the layout more responsive and
prevents having a select with 10 options where most choices would result
in a poor layout.
The list, big picture and horizontal layouts of this snippet have been
fused, and the layout is now an option on the snippet. A new 'cards'
layout similar to the one on odoo.com/blog has been added as well.
Lastly, a new option has been added to choose which posts are displayed:
most recent or most viewed.
task-2152188
PR: odoo/odoo#42466
* website
This commit moves the theme specific options from theme_avantgarde and
theme_graphene standard, namely:
- Big picture "list style" (hover effect)
- Big picture "First is bigger" option
- Latest posts horizontal
task-2152188
PR: odoo/odoo#42466
Recently, we changed the way snippet are organized in website to allow
for versioning of the snippets' css and frontend js, to prevent new
changes from breaking old versions of a snippet. This commit moves all
the parts of the s_latest_posts and its big picture counterpart (which
are really just two variations of a single snippet) to match this new
organization, such that we can support css and js versioning in the
future.
task-2152188
PR: odoo/odoo#42466
If the shipping weight is changed on a package, we want to update the
shipping weight on the picking to be consistent.
We also want to be able to set a shipping weight on a package that has
no carrier packaging, as we'll use the default one set on the carrier.
With the commit some time ago #d382288, I removed to take the first,
but you can have multiple transfer accounts in one company.
The best way is to just do a limit=1
closesodoo/odoo#44607
X-original-commit: aab5cb4ce6d7850a042203d62915dcc37f4d8bd9
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This started from noticing that purchase somewhat oddly *removes* a
filter (internal_type='other') from a domain which is fairly
rare. Looking at the file histories didn't yield anything of
interest ("v9 accounting") but finally looking at the model revealed
an additional multi-company filter missing from both views.
After consulting with @qdp-odoo, @sle-odoo and @lap-odoo, no good
reason was found for the discrepancies:
* internal_type filter should probably always be there, unclear why it
would get removed from purchase
* whoever added the multicompany filter *probably* missed that it
would never be used because there was not one but two views
overriding it (differently)
* sibling "income" field, as well as the corresponding fields on the
product category, should match (though they were less incoherent).
closesodoo/odoo#44602
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Increasing the quantity on a purchase order line will create a stock
move with the delta quantity. In case the purchase order has a return
among its picking_ids, the delta will be wrong.
This is due to the fact a return move is considered like a move_dest
of the original incoming move. The delta quantity will be computed
from the return move which doens't make sense.
This commit excludes outgoing moves from move_dest to avoid taking
return move into account.
closesodoo/odoo#44551
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
PURPOSE
Improve global event usability by adding a graph view as well as various
changes on the ticket sale flow.
We also improved the track proposal layout, added a handy button to invite
partners to your event and prepared some data for the event_barcode module.
SPECIFICATIONS
- Add a "Invite" button on the event, that allows sending invitations though
the mass_mailing / mass_sms features
- Add a graph view for the event.event model
- Allow styling the description and the biography when sending a track proposal
with basic plaintext2html usage
- Improve event and sale views integration in the event_sale module
(stat buttons and next activity generation)
- General improvements to the "auto confirm" flow of registrations
- Prepare data for the event_barcode module, to make it "event agnostic"
More details in underlying commits
LINKS
Task ID : 2093336
Enterprise PR: odoo/enterprise#7760closesodoo/odoo#43420
Related: odoo/enterprise#7760
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
When the auto confirmation flag is set on an event all registrations
must be confirmed by default.
When the auto confirmation flag isn't set the registrations will be
confirmed as soon as the related invoice is paid.
SPECIFICATION
Add a is_paid field in event.registration which will be updated in a
method as soon as the related invoice is paid. This field is used to
display a ribbon on the registration to emphasize its payment status.
LINKS
task ID : 2093336
PR : #43420
PURPOSE
Improve the integration between event and sale, by adding additional information
on both the sale order and the event registration views.
SPECIFICATIONS
- Add a stat button on the registration form linking to the related
sale order instead of a link in the form itself.
- Add a stat button on the sale order showing the registrations count
related to this sale order.
- When changing the ticket type on an attendee it displays an exception
activity on the sale order in order to warn the responsible for taking
action about it.
LINKS
task ID : 2093336
PR : #43420
PURPOSE
- When creating a talk proposal, the spaces and carriage return were ignored
- Track name change from "Location" into "Room"
- Remove link between image/biography and the related partner and allow the
user to add one when submitting a track proposal.
SPECIFICATION
- Adds the plaintext2html requirement to the controller.
- Adds an input to upload an image on a track proposal.
Task ID : 2093336
PR : #43420
PURPOSE
- In order to get an overview over events, add a graph view grouped by
event name and measure by seats available.
- Before this commit you had to install event_sale to see the popup window
in the barcode interface when scanning an attendee. With this commit you'll
see the popup even when event_sale is not installed.
SPECIFICATION
- Add the minimal information about the registration in the event module
and overrides it in the event_sale module to add the necessary informations.
That makes the window popup appear everytime when scanning an attendee.
- Add a "is_ongoing" field on event model to use it as a filter in
event_barcode.
LINKS
Task ID : 2093336
PR : #43420
Enterprise PR : odoo/enterprise#7760
It very rarely happens that the test is failing due to the following error:
`Tour shop_list_view_b2c failed at step
.oe_product_cart .oe_currency_value:contains("825.00")`
The value found in that case is 750 instead of 825, which indicates that the b2c
setting was not correctly activated.
To exclude the RPC themselves from the equation, it is decided here to move the
setting change directly in the Python.
closesodoo/odoo#44599
X-original-commit: 735807cefb7ccf3232f7492b825ce8c42bacbed4
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
@Julien00859 already made a pass on this at some point but there's a bunch of warnings either dynamic or from not the stdlib left over.
Some of them can't really be fixed in-code and have been explicitly ignored instead:
* `setuptools` uses the deprecated `imp` module until v41.6.0
* `zeep` uses defusedxml.lxml which was never intended to be a public / production API, not sure what to do there (cf mvantellingen/python-zeep#956)
* there are a ton of invalid escapes in non-raw string literals, they're unlikely to ever be relevant so ignore them
closesodoo/odoo#44164
Related: odoo/enterprise#8130
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Replace an assertRaises(StopIteration) by a next() with a default
value.
Following PEP 479, *any* StopIteration reaching the toplevel of a
generator triggers a DeprecationWarning. And while the assertRaises
looks innocuous, both _assertRaises and the underlying
clear_upon_failure are implemented with functools.contextmanager,
which wraps a generator.
As a result, exceptions raised in the assertRaises "body" get
reinjected inside the wrapped context manager[0] and if the exception
is a StopIteration it triggers the warning.
By not using assertRaises we side-step the issue.
[0] https://github.com/python/cpython/blob/b6999e5690c7006b0ba4049cfd638513c982a90c/Lib/contextlib.py#L131
In 0.15 accessing werkzeug.urls functions directly through werkzeug
is deprecated, the shortcut will be removed in the eventual werkzeug
1.0.
Fix existing uses of these shortcuts. Also cleanup some imports when
they're not far from a werkzeug* import being altered.
assertDictContainsSubset has been deprecated since 3.2 and is not
documented anymore, apparently because the order of its parameters is
less than obvious.
Consequently, remove the call to said dict & replace it with
assertions on item sets.
Note: the odd formatting is because these bits are literal-include-ed
in the documentation as sub-slices (just the relevant code lines), so
ideally they shouldn't be moved around and no additional content
should be added to those specific lines.
Adding preview of expenses attachment to journal view.
When creating an expense, files can be attached (e.g. scanned receipts).
Those attachment files where not displayed in "Accounting > Accounting > Journals > Purchases" move_line list.
They now appear in the document preview.
Task = 2176443
closesodoo/odoo#44161
Related: odoo/enterprise#8002
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Since this option is soon to be used, this rename is a last tweek
to make it more logical to use since it will point to a single
upgrade dir most of the time.
closesodoo/odoo#44593
X-original-commit: 1c8e2809fb296abce6114b7da906d48a240df418
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
The creation of a new blog post is noisy.
The user is disturbed with colors (purple box, blue borders, etc).
task-2144335
closesodoo/odoo#43692
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, the covers from event & blog, which shares the same
template, would be set a fixed bg-primary color which couldn't be
changed.
This commit adds the possibility to change that bg color.
task-2144335
Next commit will add new cover properties entries for the bg color.
Still, we want a default `bg-primary` class. Instead of addind 3 new default
value in existing cover_property fields, the chance is taken to make a mixin
out of that field to avoid code duplication.
task-2144335
Properly set the transfer account in the company taking account the accounts defined in th company domain. We found this error because in l10n_ar module we have 3 chart of accounts based on the company AFIP responsability which actually have same transfer_account_code_prefix. For that reason it was setting a transfer account to the company which is not belongs to the current company.
closesodoo/odoo#44586
X-original-commit: d38228836b8944740f04ca355c997c4b6a346e48
Signed-off-by: Josse Colpaert <jco@openerp.com>
When there are two modules with the same name, an error is thrown
and only one of them is executed.
closesodoo/odoo#44573
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, Creating New Template from "Send Invoice" wizard doesn't update template_id on the Wizard.
In this commit, We write newly created template_id on the wizard.
closesodoo/odoo#44561
X-original-commit: 454e6ed9d956ac131d6476c95e59b2ab390df5b6
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Fixes#43705
Before this commit, There will be tracback on converting currecy if there is not date on tax line.
Now we use current date to as fallback to convert currency.
closesodoo/odoo#44559
X-original-commit: 2b88d71c6e4815334f0edaa24d6041c5facd811e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The title of notification is the author name escaped (for security
reasons).
if (message.hasAuthor()) {
title = _.escape(message.getAuthorName());
}
When forwarded to the system notification, it does not need to be
escaped though, as the system notification is not HTML based.
Without this patch, a user named "Bob's friend" sending a message was
creating a notification with the title "Bob's friend"
Unescaping the notification body just in case but the HTML of the body
in a mail.messages should be stripped by _notifyIncomingMessage.
Unescaping will just ignored unescaped characters and should do
nothing on messages not escaped.
Fixesodoo/odoo#24846closesodoo/odoo#44550
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Improvements for custom models and some default behaviours
linked to the Studio model configurator (Enterprise task).
In a nutshell:
- mark the default `x_name` field of a custom model as 'to be copied'
- improvement for kanban views that makes it easier to user with
custom models
The interesting part is in the Enterprise `web_studio` module.
Task 2091654
Enterprise PR: odoo/enterprise#7326closesodoo/odoo#42055
Related: odoo/enterprise#7326
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Copying a custom model's record seems pointless by default, since
no field is actually copied.
It makes sense to copy at least the `x_name` field, to make it clear
to the user that the system understood it was duplicating something
and not just creating something entirely new.