When a field is related, defining a selection or selection_add will
have no effect and the paramater is ignored.
Log a warning and fix all fields badly definied
Closesodoo/odoo#45716closesodoo/odoo#45832
Related: odoo/enterprise#8613
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Commit 9a482fc introduced change for the document layout preview:
all "td" tag included in clearfix were in display: flex;
Because of this some styles were broken in form views on mobile.
We could have only put this rule in the right scope but
we preferred to fix this correctly.
Steps to reproduce:
- Go to Settings
- General Settings
- Click on Configure Document Layout
Related to task-ID: 2184243
closesodoo/odoo#45830
X-original-commit: 0206ee8f8a3652ae0eeb5aa78a94b92bd6e84921
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The default product category and uom should be fixed on generic
undeletable records (in data files).
And by caching those default values, we can gain up to 20% time when
creating products without providing uom and categories.
Also remove the unnecessary defaults on the compute fields, which do the
same as the compute (and have no use because it is a non stored field).
closesodoo/odoo#45791
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Each search on member_ids will trigger a ref call (one exists query each
time), whereas we could just directly use the appropriate share field on
res_users.
This commit cleans some useless .decode('utf-8') calls when we return rendered
templates results in the survey controllers.
The http module is capable of handling that type of results and the calls were
not necessary / added complexity.
Task '2187328'
closesodoo/odoo#44540
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit ComponentAdapter warned on every update and render.
This can make a lot of noises when we use some adpaters.
After this commit ComponentAdapter will warn only in debug=assets mode.
closesodoo/odoo#45583
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
addEventListener supports an `options` argument, which can
be useful to listen on events during the capture phase
This commit allows to pass these options to the hook useListener
closesodoo/odoo#45478
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Purpose
=======
Lighten the survey layout. Livechat button should not appear on survey pages.
Specifications
==============
Survey Layout inherits from web.frontend_layout, mainly to be able to use all
the styles rules defined in it and keep consistency between other frontend
pages and survey.
To avoid having the livechat button displayed on survey layout, 'no_livechat'
template variable has been introduced. The livechat button will be displayed
on all layout inheriting from frontend_layout (that is extended in
website_livechat to add that livechat button) only if 'no_livechat'
is False. By default, this variable is not set so will be considered as False.
In survey layout, no_livechat is set to True.
Links
=====
Task ID: 2195185
PR #45112
Purpose
=======
Lighten the survey layout. it should be free of website footer and header.
Specifications
==============
Survey Layout inherits from web.frontend_layout, mainly to be able to use all
the styles rules defined in it and keep consistency between other frontend
pages and survey.
Instead of inheriting another layout, this PR sets no_footer and no_header to
True for all survey layout. The idea is to show only the survey itself without
having other web/website object in the layout.
Links
=====
Task ID: 2195185
PR #45112
- create a SO with a section;
- create an invoice from the SO.
Before this commit, an SQL constraint was raised : 'Forbidden unit
price, account and quantity on non-accountable invoice line'. This error
occurs, because the default_get function adds a default account_id to
all the lines (including section lines) if a journal_id is passed in the
context. The journal_id is added in the context since : 03353118d3176463fbf779471cc272d31fb11b2e
Now, the default_get function only adds a default account_id if the line
is not a section line or a note line. This avoids the SQL constraint to
be raised, and the invoice is correctly created.
opw-2199356
opw-2199017
opw-2198781
opw-2198650
closesodoo/odoo#45809
X-original-commit: d71830f5d9f9a717194aaa8ec993d99739fe09e7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
In case of MTO+Manufacture, a sale order have a count of
manufacturing order created from it :
1. create SO with MFG+MTO product with quantity of 5.
2. confirm it. MO will be created for 5 Nos.
3. increase it to 7 . another MO created for 2 Nos.
4. there are 2 MO created based on 1 SO.
It was due that new stock move was merge, and the
'created_production_id' info was lost during the merge (keep only
the original one). To fix, avoid merging stock move with distinct
'created_production_id' (done by override
'_prepare_merge_moves_distinct_fields' and
'_prepare_merge_move_sort_method' methods ).
task-2199568
closesodoo/odoo#45800
X-original-commit: 1fb32cfd17122b625d211a7d22ec319fba35e87f
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Incorrect forward-port of e09798098679f made in 51d49517a8b5af2d1c85d9c6.
closesodoo/odoo#45775
X-original-commit: 099d0d6785b85dd67ef091fdaef084713fafb3c0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The product demo file marks a lot of product as 'invoice on delivery'
(the default is invoice on order), but the invoice status and amount to
invoice on order lines is _not_ recomputed when the product's invoice
policy changes (this is a conscious choice, as it would trigger
recomputation on past orders).
This means that the demo for products must be loaded _before_ the orders
demo, otherwise the computation for what is to invoice or not will seem
to make no sense on a demo db (even though the computation is in fact
correct): a lot of orders where marked as 'to invoice' while the
products where not delivered; invoice those and the system will again
mark them as 'to invoice' and will immediately want to generate a
refund...
closesodoo/odoo#45778
X-original-commit: e10f473fa2aba411755b76a0c1af7ff107cde5de
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Issue
- Install Sale and/or Purchase
- Create new order
- Debugger > Set Defaults
- Set default value for payment terms
- Quit and re-create
Default value is not filled
Cause
The default value is set but it's overridden
by a onchange
Solution
Remove the override who puts the value to False
OPW-2197940
closesodoo/odoo#45776
X-original-commit: 4d03e6dd81fab2aa12e3205106fd59758c6c90f6
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
The button which allows to indicate that an answer is correct is
supposed to turn green once the answer is validated. This was not the
case anymore since the link button was missing its href. Indeed BS4
forces those links to "color: inherit".
closesodoo/odoo#45769
X-original-commit: ee2fb7c05c9065c9d349682e60376566b96f1c1f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In the previous snippet cleanup, a lot of superfluous row > col were
removed in favour of having the bare content directly in the section,
this streamlines the interface and prevents having many useless UI
elements.
At the same time however, there are some snippets on which you might
want columns so that you can pull the content off-center and give the
block a background color independently of its containing section
(namely: the cover, title and text-block snippets)
this commit adds an option to add columns on those snippets (and remove
those columns completely if they're no longer wanted)
task-2120360
closesodoo/odoo#45712
X-original-commit: a44bfc4f7bba16d700650ecc2369fa1445ecbfb9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce the bug:
- Let's consider two companies C1 and C2
- Let's consider two production locations L1 in C1 and L2 in C2
- Let's consider that the company of SUPERUSER is C1
- Add the field Production location in the form view of mrp.production
- Log in C2
- Create a product P with a BOM in C2 with L2 as production location
- Create a MO for P
Bug:
The production location of P was L1 instead L2
PS: related_sudo is set to True by default.
opw:2196707
closesodoo/odoo#45692
X-original-commit: aef3d1864826a939fbd9cfd9b666614169a1db0e
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The widget Selectbo was performing a search_read on every field while
only using the fields id and name. This search_read has become very costly
in the latest version due to some new fields.
We now limit the search_read to the useful fields.
closesodoo/odoo#45707
X-original-commit: a4832ccdeedd777b43825e41ffb8c20937022279
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
PURPOSE
As CRM is going to be updated (onchange -> compute, code improvements, better
management of sales teams) cleaning and improving code is a necessary first
step.
SPECIFICATIONS
Add tests. Amazing. Notably about matching partner / duplicate based on email
as there is some weird behavior.
closesodoo/odoo#45477
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
When we change a contract to stage 'open', we write this contract
on employee. But it causes error when it's a template contract
(without employee).
After this commit:
When we change a contract to stage 'open', we write this contract
on employee only if contract has an employee.
[FIX] hr_contract: Allow overlapping in template contract
Before this commit:
We check for all contract that there are no overlapping for a
same employee.
After this commit:
We check that there are no overlapping for contract with
employee.
[FIX] hr_payroll, hr_holidays: Avoid some constrains with company time off
Before this commit:
We can't create company (or team) time off if you have 2 or more
template contract in your database.
We can't create mutliple company or team time off that overlaps.
After this commit:
We can create company (or team) time off if you have 2 or more
template contract in your database.
If a time off is set across multiple contract, print those contracts
in error message.
We can create multiple company or team time off that overlaps.
closesodoo/odoo#45696
Taskid: 2196185
X-original-commit: 3fdada6f8f19ae7123d9b35b3e7c557d072c1bc0
Related: odoo/enterprise#8553
Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
If the visitor closes the livechat window, he is redirected on rating /
feedback / send_transcript screen but he cannot go back to the conversation,
except by reloading the whole page.
Conversation should then be considered as inactive after the first click on X.
This commit close the conversation (set as livechat inactive and send the
'has left conversation' message) at first time the visitor closes the
conversation.
Task ID: 2120210
PR #39939
In order to be able to flag the livechat as inactive when the visitor left the
conversation, livechat_active field is moved to im_livechat module, as it is
not linked to website_visitor.
This commit is also a preparation for next one, which will implement the close
conversation right after the first click on x button in livechat window (at
visitor side). We needed the livechat_active flag to be available without
website installed.
Task ID: 2120210
PR #39939
Steps to reproduce the bug:
- The field expense_policy in the product.product form view was not visible before saving
PS: The default value was always set to False.
opw:2194236
closesodoo/odoo#45594
X-original-commit: 7068ae7ec740525bbf5702ad1e78e8e6b0d551e0
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Steps to reproduce:
- install crm
- go to any lead and schedule an activity in the mail thread
- select "email" as activity type and type some text in the note field
- change the activity type to "call"
Previous behavior:
The text you had in the note field is erased even if there
is nothing set as a default message
Current behavior:
the note field gets erased only if there is a default message set
for the current activity type
opw-2195368
closesodoo/odoo#45603
X-original-commit: 1445b694e6111727d93d548f2830c53180fb9aa7
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This reverts commit db691dbebf because the appropriate solution was to filter lines with 0 debit and credit during the reverse_move before the reconciliation (which apparently has already been done by another patch).
This patch, however, was causing the followup report to show lines on a receivable account with a partner and 0 balance with 0 way to remove them.
X-original-commit: 6a5271b7f4109a4f2a20378698fbe479d73ed9cb
- When browsing the blogs, in some cases the code need
to fix the URL to properly slugify the tags.
When so, the code crashes since it is trying to maniapulate
a `werkzeug.wrappers.Response` as if it was a `dict`.
To avoid this, we directly return the `werkzeug.wrappers.Response`
instead of trying to modify it.
closesodoo/odoo#45658
X-original-commit: d26ba7e4b71138a324bbb729f406cbad562881e7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Commit c883ed1087 let the possibility to
add additional stock moves in a confirmed production. The issue is those
move don't get the production group and their procure method is set
(and never changed) to make_to_stock.
This commit call adjust_procure_method before confirming additional
moves.
closesodoo/odoo#45660
X-original-commit: 96cc10fa79a120172b3cde88d50ba2fda5e75ab5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
When we buy a ticket on website, a sale order is automatically created and
confirmed if the ticket is free. When we buy a second ticket we will edit the
old SO, but we can't, because the SO was confirmed.
Solution
========
In `_create_attendees_from_registration_post`, reset the sale information.
Task ID 2188857
PR #44545
X-original-commit: d0e80ffdcc3a1ca2d872df66e1aee336f1777378
Indeed this field is notably based on tickets availability. Reading tickets
products is not necessarily granted to everyone. People reading events should
be able to know if the sale is available or not independently of their access
on product model. Let us therefore use a compute sudo.
Task 2188857
PR #44545
X-original-commit: cfabf12ef888a9dac48cbb19763740e2c65225d5
When user register to an event from website, they can answer questions
specific to a given registration or to all registrations. However they
are not correctly parsed and not saved.
Task 2188857
PR #44545
X-original-commit: e27d9b5c4f234f6ce64456c2f52e7cfb0331332f
In the event form view, when only community is installed, kanban state
is not on the right part of the form.
Moreover it should have a default value.
Task 2188857
PR #44545
X-original-commit: 1813f064bdcbc09131197484ed3c075dcba8bcb7
PURPOSE
Update tree view to add optional fields to make it easier to read.
SPECIFICATION
Modify the event_views files to add some fields (optional or not)
It add some more informations about the seats, the tracks and sponsors
and if the event is online or not.
LINKS
Task ID : 2192652
PR : #44938
Related: odoo/upgrade#801
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
This field is deprecated. Since its usage was to trigger a warning when
trying to confirm an event and confirming an event is not done anymore,
it has become obsolete.
SPECIFICATION
remove seats_min field and usage from event.event
remove default_registration_min field and usage from event.type
LINKS
Task ID : 2192652
PR : #44938
Formerly the vendor bills, customer invoices and regular journal items were
evaluated by the _check_unique_sequence_number method, but this is wrong
and also was overwritten Odoo original constraint error message.
Now the _check_unique_sequence_number evaluate the account.moves that are
not vendor bills that use documents because this kind of bills uniqueness
depends on the vendor: we can have same name of vendor bill from different
partners. This is evaluated in the already existing
_check_unique_vendor_number method
closesodoo/odoo#44813closesodoo/odoo#45643
Original-signed-off-by: Josse Colpaert <jco@openerp.com>
X-original-commit: beaa3bbacd4bd35ed11962a7466f111e5e85f0d8
Signed-off-by: Josse Colpaert <jco@openerp.com>
Sitemap uses `generate()` results, which were using `_rec_name` as slugified
URL.
Routing map has endurl using slugified `display_name` which is checked against
during `dispatch()`, that will redirect 301 to that url.
For instance:
- `/shop/product/acoustic-bloc-screens-23` is listed in sitemap while this
URL is not the correct endpoint. Reaching this URL will 301 redirect you to
`/shop/product/furn-6666-acoustic-bloc-screens-23`.
- `http://localhost:8069/event/design-fair-los-angeles-1` in sitemap which
redirect to `/event/design-fair-los-angeles-2020-02-14-2020-02-18-1`.
Sitemap should contains endurl, not 301 URL.
task-2119086
closesodoo/odoo#45642
X-original-commit: f4c60bd55920d4e24de817634032649b3c3caff0
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Issue: as salesman you want to send and print the invoice of your customer
but you don't have the access to write on the invoice
and thus you don't have access to create a mail.message and
set the flag invoice_sent to True
Allow to post message on an invoice when you have read access
closesodoo/odoo#45629
X-original-commit: d23d872f885f34bbbd747471e35e6914ac79b6cf
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
- Create a POS in a currency different from the company currency
- Open a POS session
- Do a refund (negative quantity)
- Close the session
An incorrect journal entry is being created, blocking the process.
This is because the sign of `amount_currency` is changed, while it
shouldn't.
opw-2191664
closesodoo/odoo#45619
X-original-commit: 1ac17f5d05dc4dd82db4a622229ba1ca2a7f31aa
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The problem occurs when the pos session has currency that is different
from the company's currency. Additionally, product that is tracked in
accounting is also sold in this session.
This situation results to anglo saxon move lines that are incorrectly
converted.
The current implementation considers the value from the stock valuation
layer to be in the session's currency. However, that is not the real
case because values in the valuation layer are always in the company
currency.
With regards to tax line, the tax_base_amount is not converted to the
company's currency. It's value should always be in company's currency.
This commit fixes the behavior of pos in generating anglo saxon lines
and setting the correct tax_base_amount in the pos session's accounting
entry.
X-original-commit: 2bdbea3bbf87a921ed3b343f5146a519f10e0add
- Create 2 applications with the following emails:
'test@test.com'
'test@test.com '
The 'Applications' stat button doesn't match the 2 applications.
Since `_compute_application_count` uses a `read_group` for performance
reason, we choose to strip the value at create and write for the sake of
simplicity.
opw-2189965
closesodoo/odoo#45613
X-original-commit: 00cfc324134b289417ba25373d472ba7cce4c78f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>