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.
The 'new' (read: the classes not in the 'compatibility layer section')
classes of the kanban views did not allow to cleanly separate an image
header from a content container.
This commit adds such a container, allowing a very simple layout that
should work all the time for a typical 'card with left image and right
content layout':
```xml
<div class="o_kanban_record oe_kanban_global_click o_kanban_record_has_image_fill">
<field class="o_kanban_image_fill_left" name="image_128"
widget="image"
options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
<div class="o_kanban_record_details">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<field name="x_name"/>
</strong>
</div>
</div>
<div class="o_kanban_record_body">
<!-- some fields here (e.g. tags,...) -->
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
<!-- some fields here (e.g. kanban status,...) -->
</div>
<div class="oe_kanban_bottom_right">
<!-- some fields here (e.g. user image,...)-->
</div>
</div>
</div>
</div>
```
Before this commit, the absence of a container for the right side meant
that the top/body/bottom were flex-growed in a flex-direction: row
element, appearing as 3 columns instead of rows.
The `FieldBinaryImage` assumes that the image mixin is used to manage
its fields - this is mostly true, until you use custom fields.
This commit makes using the 'background' option of the Image widget
possible by fallbacking the thumbnail field's name to the name of
the field itself instead of `image_128` when we're dealing with a custom
field.
- Create a product A
MTO, Buy
Add a supplier S1 and set a specific reference
- Create a product B
MTO, Buy
Add a supplier S2 and set a specific reference
- Create a SO with A & B, confirm
- 2 RFQ are created
The first RFQ is created with the correct reference, but not the second
one.
This is because `display_name` depends on context keys: it is computed
once for both products with `partner_id` set as `S1`, while it should be
recomputed for product B with `partner_id` set as `S2`.
In order to avoid this, we use `with_prefetch()` to avoid reusing the
prefetched value.
opw-2176638
closesodoo/odoo#44564
X-original-commit: d96c1910be8f242455de9b443fc9db82155b4dd1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The web_diagram module was removed in saas-13.1,
along with the diagram view support but some translation files were
brought back by forwardports.
closesodoo/odoo#44563
X-original-commit: 3f50601736b23dac78720d24d5b67bf6b94f5f43
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
- Create an invoice for 1000
- Make a partial payment (e.g. cash) for 250
- Print the ISR
The ISR contains an amount of 1000 (total amount), while it should be
750 (amount left to pay).
opw-2180538
closesodoo/odoo#44552
X-original-commit: 421bbcd5270b889874dc99a9a8cead0272e1e3da
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Issue
- Install eLearning
- Edit the header > change image
- Save
Image not changed
Cause
We do not take new style/class attrib in account in
replace_arch_section.
Solution
Take them in account
OPW-2122947
OPW-2182109
closesodoo/odoo#44541
X-original-commit: 8579c0cae839c615415120b79d6ec22c71f7affd
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
The parameter `lot_id` must be a recordset, not an `int`.
opw-2188752
closesodoo/odoo#44525
X-original-commit: aeafd2a84e309ee4a496f9a109d7fe6b0fb9cd3d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The computation was incorrect, the answer was 10, not 110 with the
previous formula
Courtesy of Frederico Freire Boaventura
closesodoo/odoo#44514
X-original-commit: 577e1ad8314cac6e61f60f997f338df4b7a1da38
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit shows a toaster when publishing a record through the toggle in the
topbar.
The `_description` field is used to do that, as it is supposed to contains a
'business oriented' descriptive name, see task-37311. Indeed, this field is
used in studio and in mail templates.
task-2144335