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>
On a standard odoo install, `MigrationManager._get_files` represent
more than 4% of an install. This is because the legacy
odoo/base/maintenance/migration path was added to upgrade.__path__
once by module, making the get_filed check 574^2 os.path.exists.
This commit adds a check on initialize_sys_path to call it only once,
and merge legacy path with upgrade-path management in order to benefit
of the `up not in upgrade.__path__` check. This second part of the fix
will also remove the local dir from the upgrades paths.
A further improvement would be to fix MigrationManager in order to skip
_get_file work on a fresh install, (wip by rco-odoo)
closesodoo/odoo#45699
X-original-commit: 497330a695ed52a33f9c9b9c27b149446de0db29
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.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>
PURPOSE
If a visitor closes the livechat window, he is redirected on rating / feedback
/ send_transcript screen but he cannot go back to the conversation unless he
reloads the whole page.
Conversation should be considered as inactive after the first click on X.
SPECIFICATIONS
This merge holds two main commits
* move close livechat session to base livechat module in order to be able
to flag the livechat as inactive when the visitor leave the conversation;
* set livechat inactive _onCloseChatWindow: closes the conversation (set
as livechat inactive and send the 'has left conversation' message) at
first time the visitor closes the conversation;
See sub commits for more details.
LINKS
Task ID: 2120210
Community PR odoo/odoo#39939
Upgrade odoo/upgrade#772
Related: odoo/upgrade#772
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
Use date_stop instead, and remove the instruction to remove the computed
field.
closesodoo/odoo#45669
X-original-commit: 3650adbac52d19ecc6265d90babeb6fc270d3ac2
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
- 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>
Purpose
=======
Fix kanban state default value and display in community.
Fix question answers not correctly parsed from frontend.
Fix sale availability ACLs issue when having tickets.
Do not group the event tracks by location.
See sub commits for more details.
Task 2188857
PR #44545closesodoo/odoo#45655
Forward-port-of: odoo/odoo#44545
Related: odoo/enterprise#8533
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.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>
Issue
- Create new db with language en_CA
- Install Sales & Purchase
- Enable fr_CA
- Create a product & Save
- Edit the name & Save
- Create a quotation or RFQ
- Do not select partner
- Select your product
The description is still the old name
Cause
We try to browse a product with an empty
partner language
Solution
Use odoo.tools.misc.get_lang() in order
to fallback to a language is the partner's
one is empty
closes#44357
OPW-2196602
closesodoo/odoo#45620
X-original-commit: 4561b6bd4c2afab8ae29ced1a9085e6878a9921d
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.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
Purpose:
If the user is not using receipt functionality in his organization then it's can be hidden.
Current behavior before PR:
Sale and purchase receipt by default show when the account module is instaled.
Desired behavior after PR is merged:
Now users can activate Sale or purchase receipt from accounting settings.
closesodoo/odoo#44464
Task: 2028813
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Let's say we have a chain of move
wh1 - intercomp transit -> intercomp transit - wh2
The second move will be reserved according to what the first move
brought since they are chained. This behavior resulted in rev[0] which
tries to work around the ir.rule limiting the access of stock.move and
stock.move.line records in multi-company environment.
This patch wasn't perfect since, if the first move brought a lot, the
second move will reserve this lot and it will result in another access
error since the lot will still have the company of the first move.
We fix this by implementing the following logic: receiving from another
company should behave the same as receiving from the supplier, no
reservation is applied. We fix this by marking the inter company transit
as `_should_bypass_reservation` and we break the move chain if the
pull/push rule create an intercompany chain.
[0] 6ff34073153767d449804669f31e26c04de0a670
closesodoo/odoo#45601
Task: 2160847
X-original-commit: 67b45da9d877a5a1bb9adb3ce14051e01f67045f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit the sentence was a bit weird as a date is not on the future but in the future. This commit resolves this.
closesodoo/odoo#45548
X-original-commit: b335c33655a707f71fbc01929f5eea2e659e7215
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
- Set the rule 'WH: Stock → Customers (MTO)' with:
Supply Method: Take From Stock, if unavailable, Trigger Another Rule
- Create product A
Routes MTO, Buy
Add 3 Units in 'Stock'
Set a supplier
- Create a SO for 5 Units, validate => a RFQ for 5 units is created
- Create a SO for 2 Units, validate
2 Units are added to the RFQ, although there is enough in stock.
This is because we take into account the 'Forecasted Quantity' instead
of the 'Free To Use Quantity'.
closesodoo/odoo#45590
X-original-commit: 00993a136052487ea43bed0e59bb7bbc54113bac
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Install MRP and Purchase
- Configure the rule 'Stock → YourCompany: Production (MTO)' with:
Supply Method: Take From Stock, if unavailable, Trigger Another Rule
- Create a product AB with route 'Manufacture'
- Create products A & B with routes 'Buy' and 'Replenish on Order
(MTO)', set a supplier
- Create a BOM for AB with:
Product A: 2.0 Units
Product B: 3.0 Units
- Create a MO for 1.0 Unit of AB, 'Mark as Todo'
No RFQ is created for A & B while there is no stock available and a
supplier is set.
This is because the 'MTSO' logic is located in `_run_pull`, which is
never called in this use case since no procurement is created.
We need to apply the same logic in `_adjust_procure_method`, which is
called at MO confirmation.
opw-2189694
opw-2194739
X-original-commit: 9ae3b3e8d2694f5560913682824fd10e60de14a4
Before this commit, when receiving a needaction message while messaging
was not ready (i.e. `/mail/init_messaging` not resolved), the web client
crashed with the following error message:
```
TypeError: Cannot read property 'incrementMailboxCounter' of undefined
```
This happens due to reception of needaction message incrementing counter
of mailbox Inbox, but this mailbox is only added after messaging is ready.
This commit fixes the issue by directly adding inbox mailbox on starting
the mail service.
closesodoo/odoo#45442
X-original-commit: 741acb9f48f2d3542549791a8fd7d6fb318bc862
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Purpose
===========
Batch of improvements based on user testing/on site implementation with the
focus of improving the flexibility and usability of Event. This way the
application should be easier to use for small SMEs that organize events such
as local sport clubs, theater company, ...
Specifications
=================
Deactivate by default some filters in /event page top bar
Invert the behavior of is_individual field and rename it accordingly
Revamp the event list in front-end
Filter by month instead of week on /event page
Improve /event/<model: event.event>/register page design
Add tracking on name, email, phone fields on event.track
Links
===========
TaskID 2162438
Community PR #44476
Upgrade PR odoo/upgrade#771
Related: odoo/upgrade#771
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Quentin Mourier <qmo@odoo.com>
PURPOSE
Avoid losing contact information. Example :
I set a company that should come and speak to OXP and they have
an email address as well as a phone number set. To prepare the webpage
someone then sets the real speaker who is the person, not the company
=> Contact details are lost on the track and one needs to find
the contact in the repertory to set it back
SPECIFICATIONS
Track name, email and phone of event.track.
LINKS
TaskID 2162438
Community PR odoo/odoo#44476
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
This commit makes a few design improvements in the Event list in front-end
after some feedback about its usability
- Make the 'configure your registration' alter not editable (for studio)
- Display the "is online" through a "tag" design, not just text
- Remove remaining seats count
- Some display cleaning and improvements (design)
- Put the event date just below event title on event frontend list
- apply some minor design improvements in the /register page.
- Filter by month instead of weeks :
This commit changes the date filtering in website_event.
Before this commit, users could filter events by weeks.
After this commit, users will be able to filter by months
and will be able to filter events up to two months in the future.
LINKS
TaskID 2162438
Community PR odoo/odoo#44476
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
PURPOSE
Questions asked to attendees are usually attendee specific according to
"statistics". It makes therefore sense to have a field activating the global
question mode that is False by default.
SPECIFICATIONS
Inverse behavior of boolean 'is_individual' and rename it to 'once_per_order'.
By default it is set to False, meaning all questions are individual.
LINKS
TaskID 2162438
Community PR odoo/odoo#44476
Upgrade PR odoo/upgrade#771
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
Before this commit, in the "customize" menu on /event, custom views enabling
filters by "category, country" and the "show sidebar" were activated by
default. This commit deactivates them by default.
Reason behind this change is that most people don't have enough events to
justify having those filters on by default.
LINKS
TaskID 2162438
Community PR odoo/odoo#44476
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
Create an invoice, validate it, sending the data to the SDI.
Now reset to draft the invoice and re-validate it.
Action will be blocked because "You can't regenerate an E-Invoice when
the first one is sent and there are no errors".
This add the possibility to modify the invoice without re-sending it as
long as the first one is still in a sent-with-no-answer state
opw-2196956
closesodoo/odoo#45580
X-original-commit: a315d7dde7ab4c1283c999c336284aeac86dbbbc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>