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
Before this commit, the web_editor option 'Style' which has a `Quote` entry
would not do anything visually.
Indeed, what it does is inserting a `<blockquote/>` element in the DOM but is
has no style anymore in BS4.
This commit restore the style we had with BS3.
task-2144335
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
Steps to reproduce:
- install sales
- create a new quotation
Previous behavior:
the avatar next to the author's name is empty in the mailthread
Current behavior:
avatar is displayed as expected
opw-2187231
closesodoo/odoo#44407
X-original-commit: 24ba9f9954a71eba46d44fe242cd2e6dba125da6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
The default journal depends on the company define in the context or the company in the environment
In case of online signature/payment of a SO in a different company then the public user
The company will be wrong and the journal_id as well
It lead to a fail of the payment since the payment could not be reconciled with the invoices
This is happening because the force_company is not taken into account for the default journal
This commit take the force_company into account, it take the precedences on the default_company
closesodoo/odoo#44238
X-original-commit: 8158e286b0020daa994b593377a2c99234e66086
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before this commit, the date range was not known without open the record in backend.
It is really painfull to don't know when a guy of your team ping you on a new leave
the date from the current leave. (today ? next week ? ...)
Now we have the date into the name_get and so the subject of the email.
task-2001439
Nothing related to next activity ;) but idea was the same.
closesodoo/odoo#44462
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
If an automated action raises an exception, in the traceback modal:
- For admins, display Disable & Edit automated action buttons
to be able to directly know with wihch automated action the error occurred,
and to give the possibility to edit or disable it quickly,
- For regular users, just add a paragraph to tell with which automated action the error occurred,
so they can give this useful information to their administrator
This is specially useful for databases which have just been
upgraded to a newer version, and for which the server action
is failing because its code is no longer supported.
closesodoo/odoo#44513
X-original-commit: 8f3940c132bbbc99e47fa3f0cba0e768159d9af2
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
In stock, before sending an sms, we check if there aren't the key
'skip_sms' in the context. It is useful, for example, in fsm
application.
TaskID: 2081191
Purpose
=======
Currently, it is only possible to set an Analytic Account for a whole Project, there
is no distinction by task. However, if the user has 1 task per customer, he cannot
track the costs and revenues for that specific customer easily. He has to manually
change the AA of the timesheets' analytic lines. An option would be to set a
different AA on the SO generating the task, but the AA of the project takes over
anyway.
Specifications
==============
If the user sets an AA on the SO, it should bypass the one set on the project
Add an AA field below the Email cc one on tasks in debug mode
- should be related to the AA field from the SO
- it should also bypass the AA set on the project
All the timesheets from this task should be related to the AA field set on the SO/Task
closesodoo/odoo#40844
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
time.clock is deprecated since python 3.3 and no longer exists in python 3.8
time.process_time was introduced in python 3.3
Replace "is" by "==" as this produces a SyntaxWarning in python 3.8
Fixesodoo/odoo#41313closesodoo/odoo#44502
X-original-commit: f03b4cb5576f264b6845242ba112f02422af4f5f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Some code was added to prevent notifying a 'reset' if there was no
'preview' before. Unfortunately, checking "if there was a 'preview'
before" cannot be done properly so some 'reset' were stopped while they
should not have. This commit simply removes the code which is in fact
not needed.
closesodoo/odoo#44499
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Issue
If month - 1 or month - 2 are in the previous year, the filter is
incorrect.
ex: Date = Jan. 2020, Filter = Dec. 2019
=> last_year__last_month = 2018-12 instead 2019-12
Cause
If date is 2020-01-20
Selecting December => adding param "last_month"
Selecting 2019 => adding param "last_year"
Applying "last_month" => date become 2019-12-01
Applying "last_year" => date become 2018-12-01
Solution
Detect the right year to activate by default
when a month is selected and no year is selected.
With that solution it is not possible to get records in Jan. 2020
or in Dec. 2019 only for instance but the global functioning
of date filters stays the same as before.
OPW-2169528
closesodoo/odoo#44208
X-original-commit: 096fdc7d3fe0799aa761c6ad3597569a002c698e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Jason Van Malder <jvm@odoo.com>