This commit removes the field twitter_hashtag from event and event_type.
The justification behind this change is that it has been made obsolete
by our social marketing app and our website builder.
Task ID 2191921
Community PR odoo/odoo#44715
Upgrade PR odoo/upgrade#764
Related: odoo/upgrade#764
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of the task is to improve the list view of timesheet.
so the description(name) field should no longer be required in the
list view and move the Description(move) field to the right of
the task one in list view.
As field is required at python and display as _rec_name on
analytic line so if value is blank then we should fill the
value with the '/'.
task-2176065
closes#44101
Related: odoo/enterprise#8001
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
---------------
Add small improvements to the frontend UI for slide_channels.
SPECIFICATION
-----------------------
Current behavior before PR:
1. We can't display all uncategorized slides of a course.
2. When you upload an image or PDF, the name field is replaced by the filename even it was filled before selecting the file. This leads to rewrite the name a second time before uploading the slide.
3. There is no way for the website designer to choose if he wants to display or hide the promoted slide of a course.
Desired behavior after PR is merged:
1. Slides without a category are displayed correctly, now you have access to the link "View all" which allows the user to display all uncategorized slides with a possible pager.
You have also the possibility to create a section/category with the new button "Add a section" next to the button to upload content.
2. When you upload an image or a PDF, the name field is no more replace automatically by the filename. Now, it's replaced only if the field is empty when you select the file.
3. Now, there is a new button under the Customize tab to display or hide the promoted slide on the courses. By default, the promoted slide is displayed on the course.
task-2161391
closesodoo/odoo#42420
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
To reproduce:
- Create a second company with the same currency as the first,
- Assign the first pricelist with that currency (based on _order) to
the second company
- Install the POS, or create a new pos.config while in the first
company
The above results in:
raise ValidationError("The selected pricelists must belong to no
company or the company of the point of sale")
opw-2192658
closesodoo/odoo#45199
X-original-commit: f6e73f69350b3d0fef5f24e0073f68e52da3a36d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
From Odoo 13.0, the list of answers of a user displays the name of the
answer itself, and not its parent's.
Answers created directly on a question are given a name, but answers
created from a comment are not.
This commit fixes this behavior for a better consistancy: all posts
should have a displayable name.
A migration step on saas~12.5 will populate from their parent's name
the existing posts that don't have a name.
closesodoo/odoo#45193
X-original-commit: 327079e97d12bf3bfcbc74e78bcc7ebc36149d02
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Before when you uploaded a document, the title was set to the filename even when the field was
set by the user before. Now, the field title is set to the filename only when it is
empty.
task-2161391
Before, uncategorized slides weren't display correctly on the slide_channel. It was impossible
to view all the slides if there were more than 4 slides uncategorized because the "View all" link wasn't
display.
Now, when there is no section/category on a course, it displays the last 4 slides with the "View all" link
which allows to be redirected to the uncategorized category (category_id=-1). This request displays all the
uncategorized slides with a pager if the limit of 12 slides per page is exceeded.
If there is at least one category created, all uncategorized slides are displayed under a section "Uncategorized".
Additionaly, there is a new button which allows to create a category directly on the course page to allow the user to
organize is course more effectively.
task-2161391
Purpose
=======
The project overview is still as obscure as ever, so we are adding even more tooltips.
Specifications
==============
Add the following tooltips to the project overview:
- Other costs: Any cost linked to the Analytic Account of the Project.
- Re-invoiced costs: Costs from expenses that were reinvoiced to your customer (provided
that the Analytic Account of the Project was set on the Expense).
- Invoiced: Revenues linked to Timesheets already invoiced.
- To Invoice: Revenues linked to Timesheets not yet invoiced.
closesodoo/odoo#44693
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit clean-ups the code for model `sms.template.preview` which
mainly includes the following changes :
* remove 'res_id' field and use only the reference field instead;
* remove inheritance from `sms.template` as we only need a body field
computed based on record and template;
* convert onchange of lang / record to compute field for body;
* fix 'No Records' warning which previously appeared even if there were
records to be previewed (by adding compute field 'no_records');
LINKS
TaskID 2180132
Community PR odoo/odoo#44104
Upgrade PR odoo/upgrade#763
Related: odoo/upgrade#763
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Sometimes, constraints are not delayed during a module upgrade: the
module is 'to upgrade' but in 'init' mode :-/
Fix this by relying on the module's state only.
closesodoo/odoo#45179
X-original-commit: 878b6538961a9b6a5fe1c6ac68d4ff39391abcdf
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
When we valide a stock landed costs with a stock picking
with multiple products, when two stock valuation layers is created,
only one was link to the journal account move.
task-2123752
closesodoo/odoo#45178
X-original-commit: d141c5fdb5cf9b7d2b365dadcfa6ccd9c4d38d4c
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Without at least one field, performing a search in these models' search
view is outright impossible.
closesodoo/odoo#45177
X-original-commit: 0aabfbff3ce5d68bf37e1734ba7aa43f62803f3a
Related: odoo/enterprise#8379
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Custom models and fields set up the registry as part of their CRUD.
Make sure to flush() before setting up the registry, in order to avoid
neverending recomputations (as fixed by the former commit).
closesodoo/odoo#45163
X-original-commit: af6dbb5c7c165dcf37bf87ee76c0170795ecb574
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
In some case, a pre-migration script calls `xml_import.parse` to force
reload a no-update data in pre-script. It is possible that fields are
marked to recompute in the process. The problem is that the reference to
the field added in `env.all.tocompute` won't be the same as the
reference of the same field after calling `registry.setup_models()`,
leading to an infinite loop while recomputing this field, since
`fields.__get__` wont find `self` in `env.all.tocompute`.
This problem was discovered when trying to migrate a database with all
modules installed (no demo data) from 12.0 to 13.0 (for commit
references: http://runbot.odoo.com/runbot/build/1176576 with database
comming from http://runbot.odoo.com/runbot/build/1171714).
This commit adds a check before executing `registry.setup_models()` in
order to log when some fields to compute remain before breaking fields
references, and adds a `flush()` after pre-scripts to fix the current
issue.
X-original-commit: 41b9d810066774736c4077bba1dc9c9fba004f48
* modify client-side domain normalisation to error if the domain is
invalid (not enough terms / segments for the number of operators)
* add better error reporting to attrs / modifiers parsing
* add a few layered error augmentation to provide clearer context
e.g. "error: invalid domain <thing>" is helpful but "error while
parsing modifiers for field foo: modifier invisible: invalid domain
<thing>" is much more helpful
* rework _evalModifiers to deduplicate it in order to more easily
implement this contextual augmentation
* test that improper domains are properly found improper
* fix a bunch of incorrect attrs domains
* also removed an apparently undefined (& unused) "options" argument
to a _applyModifiers call
closesodoo/odoo#44642
Related: odoo/enterprise#8175
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
d92f76592c introduced a toastr when publishing a record.
It was designed for the topbar publishing toggle button, but some other
templates ended up also using that feature.
As those templates were missing `data-description` which contains the model
business name, it would show `You've published your undefined`.
This is only related to a very few places having a publish button inside the
page.
This commit fixed that by ensuring every publish button template have the
necessary code.
Also, a fallback is added in case tha `data-description` is missing somehow.
task-2191735
closesodoo/odoo#45141
X-original-commit: 4ab6e36b739060eb16e97eac502fd087a072abf3
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Issue
- Install MRP
- MO > Import with BOM
The lines are not populated but it
was the case in v12.
Cause
In 7206b385b5, the lines generation
are done in a onchange but they are
not trigerred in imports
Solution
Call the onchange manually when we
are in an import case
OPW-2188066
closesodoo/odoo#45118
X-original-commit: 26c44fae1ad8a3ac2d79d9673255aef12fddeb17
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Before this patch, validating an unreserved move of a dozen while 12
units were reserved resulted in a quant with 0 unit as quantity and 11
units as reserved quantity.
closesodoo/odoo#45132
X-original-commit: bf7d76a7127521ba17f29bc470c3d551cc9988d5
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
[1] transformed the button to be `a` instead of `button` for validation reasons
however `header` only renders `button` tags so the chat button was not visible
anymore.
[1] eb2f0aabcfclosesodoo/odoo#45129
X-original-commit: 0075dc37b07b1e81ff8c20e5af49173bf69d55ed
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
* = website_crm, website_hr_recruitment, website_sale
It is now possible to change the position of the submit button via
the left panel. Indeed switching to a non-horizontal form left the
submit button aligned with the labels which thus appeared broken.
Part of https://github.com/odoo/odoo/pull/44907
task-2191409
X-original-commit: 60b4c8d04006736be573189accd0dccaafafa651
account.bank.statement.cashbox model is verified at create/write
and updated accordingly but may crash on multiple record creation/update.
The `for` loop on `self` didn't use the specific records yielded but the `self` recordset.
closesodoo/odoo#45116
X-original-commit: af8367734c69dfeb0a1e1f029009f6da98449d0b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
In this commit we deleted tour file of website_forum beacause
of the changes applied on forum icon of new click button,
live chat icon disappear after livechat module installed and
modified livechat channel data for auto-publish channel.
task-2088546
closes#40085
Related: odoo/enterprise#6639
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
in this commit, throw the wizard to enter the new page name, while duplicating
page button and new duplicate page button added in the page properties dialog.
updated the test case related to duplicate page along with duplicate menu
consideration.
task-2088546
closes#40085
Co-authored-by: jpr-odoo <jpr@openerp.com>
Following things are done in this commit:
1. changed some labeling and string for more readable and helpful to the user
2. added extra width to the text box
3. added publish/unpublish option for mobile view.
4. track page option auto-activated for any new page,event,job offer,course,
blog.
task-2088546
closes#40085
Co-authored-by: jpr-odoo <jpr@openerp.com>
RATIONALE
Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case
* using the template in the composer on a single record: it is displayed
in the rendered template in the composer, meaning people could change it.
This behavior is interesting as it allows to see the email content;
* using the template in the composer in mass mail mode: it is not displayed
as only the raw jinja is displayed. It is therefore not obvious that it
will be appended to the body of the mail. People could add it manually and
have 2 signatures as a result;
A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.
Behavior will therefore be
* use a template -> specify signature usage in it manually through jinja;
* do not use a template -> signature added in sent emails;
SPECIFICATIONS
Remove user_signature.
Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.
Quickly clean some signature integration.
LINKS
Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761
Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
The customizable "out of office" text was removed from the editable views as
part of task-2053585, but some places in the code were still using it, even
though it was never set anymore.
This commit removes the obsolete code.
Part of task-2171864
closesodoo/odoo#44968
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before that, depending on rounding errors on floats, it was possible to end up with a matched percentage of 0.999999999 instead of 1.0 on an account move in case of full reconciliation. This could in turn cause problems with cash basis taxes, when checking what proportion of the move is reconciled.
closesodoo/odoo#45094
X-original-commit: 958bee9cf9f770351fbc346a081cfe059a911b3f
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This is a followup of 1d553eea7b.
Systematically logging import tracebacks can fill up log files, and
waste disk space. We therefore log those tracebacks in DEBUG mode, so
that they can be activated only when needed.
closesodoo/odoo#45075
X-original-commit: 017e3d798c55b1bdac221aea76d3d944f045ee65
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.
closesodoo/odoo#44883
Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Purpose
=======
Helpdesk users don't have the right to write on a coupon.
When sending a coupon by email, the coupon is marked as 'sent'.
Allow users to send coupons by executing the state change in sudo.
closesodoo/odoo#45091
Taskid: 2179609
Related: odoo/enterprise#8143
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Assume a situation where you trigger a method which is going to create a
nested picking with move_lines included and having a filter set which
means that your context includes {'default_product_id': 20}
{
'location_dest_id': 9,
'location_id': 19,
'move_lines': [(0,
0,
{'location_dest_id': 1,
'location_id': 2,
'name': u'name',
'partner_id': 1,
'product_id': 10,
'product_uom': 1,
'product_uom_qty': 1.0})],
'origin': u'Origin',
'partner_id': 1,
'picking_type_id': 59
}
Before the creation of the objects it will inject the default product in
the top level of the dict which should create a picking with one or more
move_lines.
Based on this this injection will overwrite all product_id values of the
created move lines as the picking is created last and the default value
will write ALL move lines with this specific product from the context.
closesodoo/odoo#45076
X-original-commit: 1da687b644e581081ce21687c5eb32285c872a2a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Issue
- Deactivate demo data
- Install several modules (e.g. Sales, Helpdesk)
- Go on Home
- Hard refresh
All tours' tips are shown
Cause
In 02dab5dc88, we wait the DOM to be ready.
The DOM wasn't ready in previous version, this is
why it seems to work.
As the DOM is ready, in check_for_tooltip we
have a visible trigger so trigerred = true
and the tip is activated.
If you activate the debug mode, the DOM is
not ready too, this is why it works fine
in debug mode.
Solution
I don't think that not waiting the DOM to be
ready is good so I think we should keep that
and handle the case when we update the tours
from the _register method. So that, we use
the else part of the update method which
will break after a tip has been activated.
OPW-2188525
closesodoo/odoo#45073
X-original-commit: 5f0451c54cb785cc940b78a489316bed5ad9d888
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
[FIRST ISSUE]
Steps to reproduce the bug:
- Create a pricelist PL with 50% reduction on all products.
- Create a SO with PL
- Add an optional product P
Bug:
The price is correct for P but the discount displayed was 0%.
[SECOND ISSUE]
Steps to reproduce the bug:
- Add the option line to the order
Bug:
A new line was create for P in the SO with the correct price but the discount was not displayed
PS: The discount field on the model sale.order.option has been implemented to add a new discount
to the displayed price unit of the option. But it has not been implemented to show the discount computed with
the pricelist.
opw:2186470
closesodoo/odoo#45056
X-original-commit: bcb304bbad3d10ca5efc7411fff4c9efff8fa6b3
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Activate variants and pricelists
- Go to Product > Products Variants
- Search for anything on the 'Pricelist' filter
A traceback is raised: 'Can only create cache keys from hashable
values...'.
This comes from the following change:
https://github.com/odoo/odoo/blob/4b06fe19fa68255b7982d15e5847da2f6d6209fd/addons/web/static/src/js/views/control_panel/control_panel_model.js#L962
It returns a list instead of a string. Since a list is not hashable, it
causes the issue.
There are not much solutions since the context key `pricelist` can be a
`list` or an `int` (an ID). We force the cache key conversion to a tuple
to avoid the `TypeError` and handle the `list` use case (which was
broken on top of crashing).
opw-2187757
closesodoo/odoo#45064
X-original-commit: ec0a8767143b4c4818418281803c4f52fefa8d2a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Go to Accounting / Reporting / Management / Invoices
Select Pivot view
Add "Total" measure
expand results adding "invoice #" and product
Total will be incorrect because it is summing up the value reported from
several lines of the query in which the total is taken as the invoice
total, so it will display total * # lines.
Using the price retrieved from the single lines fix the issue, but it
needs to be converted according to the currency rate of the invoice.
Moreover the test need to be modified because the amount_total variable
of the report should NOT be the move amount_total but the amount from
all the lines converted in company currency
opw-2187369
closesodoo/odoo#45050
X-original-commit: 1558bb2a62cf169e6b19a2aa4dd92fcd8ff1b25a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Usecase to reproduce:
- Set the lot_stock_id as a view location
- Create a PO and validate it
-> The forecast quantity on stat button is correct but it's missing in
the forecast quantity report.
It happens because the condition for stock_move is based on valuation
strategy. However it's not correct since it's not True that a product
is in the stock if it's valuated (as subcontracting, owner, ...)
In order to fix it uses the warehouse in order to define if a move is in
or out (the same way than the _get_domain_locations on product).
X-original-commit: d7da1b733b4cece73d26805e6371499026bed0cd
When adding a custom field, the ORM also adds it to all the inherits'ed
models, but with the state `base`, because those inherited fields are
automatic (created by the ORM). However, dependencies are enforced for
`base` fields, while they can be ignored for `manual` ones. This is a
problem when a custom field is fucked up: its inherited fields will make
the registry crash.
We fix the issue by not enforcing dependency check on fields inherits'ed
from custom fields.
opw-2191114
closesodoo/odoo#45024
X-original-commit: 2db0787dc9e8717200aaf1d71ac64df1c17f4143
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
The translation alert dialog was attached to the entire view in case no
status bar was found. This resulted in the following layout on large
screens:
chrome
--------------------------------------
| alert dialog | form view | chatter |
| | | |
--------------------------------------
Whereas when a status bar was set on the form view, the rendering was as
follow:
chrome
--------------------------------------
| status bar | chatter |
| alert dialog | |
| form view | |
--------------------------------------
The fix make sure the alert dialog is always placed just above the form
view just like when there is a status bar.
closesodoo/odoo#44878
Task: 2075172
X-original-commit: dacdc30681510e9c2db23610c5be5285a72a8949
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Before this commit the purchase_rfq action had two context keys
defined. One being empty {} and one with quotation_only set to
True. After this commit there is just one context (the one that is
actually used and applied) on the action.
Empty key added in 12.0 at 6138686d41b
Second key added in 13.0 at b5cea7e2b6closesodoo/odoo#44990
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
In a database with many users / events to synchronize, the cron
`ir_cron_sync_all_cals` may time out. Consequently, even if a `commit`
is performed for each user, some users are never synchronized.
In this commit, we first sort the users by last synchronization date,
meaning that all users will ultimately be synchronized, even if the cron
times out. On top of that, we introduce the context key
`last_sync_hours` to prevent the synchronization in case the cron is
restarted after timeout.
opw-2158372
closesodoo/odoo#45032
X-original-commit: 2f21def63c61324e2286dbee6abead091171a041
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: Nicolas Martinelli <nim@odoo.com>