Enteprrise pr 6836 will allow disabling the delete button on gantt
views. Document it is possible.
task-2088954
closesodoo/odoo#40716
Related: odoo/enterprise#6836
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
In this commit, we add a new attribute "Delete" for user conveniency
if he don't want 'Delete' button on popover card they easily achive
by "delete=false" attribute and also add a testcase for it.
task-id:2088954
Since commit: https://github.com/odoo/odoo/commit/c31bf95e4e5e01e9f433ac13c6be33f85a57f9b9
There is typo while getting username from session so it was default set
as 'undefined' for collaborative pad editor name.
Get the proper username from session as 'username' instead of 'userName'.
but now we want's user's whole name so instead of username(login) take
the name(name of user).
closes odoo/odoo#43805
Taskid: 2154331
Closes: #43805
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
When having an invoice in foreign currency and a partial payment in
domestic currency (in a different date with a different exchange rate),
the computed amount due is incorrect. When computing the
amount_residual_currency the payment (in domestic currency) is converted
to the foreign currency using the exchange rate of the invoice date, and
not the one of the payment date (see 56d92213b8).
If the account.partial.reconcile line will have a currency_id and a
amount_currency the amount_residual_currency will not be converted but
simply added.
This behaviour was introduced with e130606602
and backported to version 11.0 with 3363d7235137f286458c734a1a0417beeb1f66bb.
In version 12.0 this behaviour was partially reverted in d3d2612061.
opw-2156001
closesodoo/odoo#44181
X-original-commit: 94d34e052f3757c21884fd5a57cc68ea8c51aafb
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Task 2168197
Especially when writing out checks we would like to track the value of
the state of the vendor payment in the chatter. This way we can see who
prints it, cancels it, etc and at what time this happened. It's
important for traceability. I think we can just enable it for all
payments in general, I can't think of any downsides and payments are
usually sensitive documents so I imagine people want as much info as
possible.
closesodoo/odoo#43505
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
PyPDF performs badly on many types of PDF documents.
We add a text extraction with pdfminer, which is designed for this task.
Because pdf content extraction was so flaky, it was completely
deactivated by 1b753b0d53. We revert that :-)
closesodoo/odoo#38508
Task: 2152494
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Avoid display errors with special characters when copying the href attribute
of links in the web editor.
opw-2078313
closesodoo/odoo#44176
X-original-commit: 19ebcdd20426406250174eb473b081a9e488e542
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
psycopg2 2.7 not be installed on python 3.8, needs at least psycopg2 2.8
use the same version as windows to avoid complicated rules if windows
AND python 3.8
Note that psycopg2 3.8.4 is currently the only one released after the
release of python 3.8 but reported compatibilty issued seems to be
fixed since 3.8 at psycopg/psycopg2#854Fixesodoo/odoo#42660closesodoo/odoo#44143
X-original-commit: f615826486ff8128c00b9a5ed5fbb8f86e6d492a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
* website, website_sale
The design will be deeply reviewed in a future update. This commit is
just about unifying it and making sure no element is cut/overflowing.
-> All items are now inline automatically
-> If there is no enough space, it becomes full-width over two lines
automatically (this can be forced with the o_we_fw class)
-> Force to stay on one line with the o_we_force_inline class
closesodoo/odoo#44142
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When we name_search a res.user, we have a special hack so we will
firstly perform an exact search on the res.users login, if none is found
we will search over res.users name.
This is intended but in the case of negative search since 660cebb4faaeb,
for example operator='not ilike' and name='test' would probably just
return all user that do not have a login that is exactly test.
This is not the intended behavior, in this instance we should just
return user that do not have "test" in their names.
Without fix, added test would fail on:
- .name_search('vlad', operator='not ilike') => finding everyone but
user with exactly login vlad instead of user not containing vlad in
their name
- .name_search('', operator='not ilike') => find all users instead of
finding no user
- .name_search('lad', operator='not ilike') => find all users instead of
just finding "Nothing similar"
opw-2170517
closes#44040closesodoo/odoo#44152
X-original-commit: 2378fb63c132c0bcf027785d478c0608b59a3409
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
PURPOSE
=======
When you close a payroll (employees), there are often a lot of document
linked. Archiving an employee should archive the contract, cancel future
leaves, archive the private address
Specification
=============
Add departure date (hr):
- Add a Date field to both hr.departure.wizard and hr.employee. In
the wizard, the field is required.
- In toggle_active() method in hr.employee, set departure_date to
false when unarchive the employee.
- If user has a current running contract, a user error will raise if
user enter a departure date earlier than the start date of the
contract.
Add checkbox to set a closing date on hr.contract (hr.contract):
- In the hr.departure.wizard, set the departure date to be the end
date of runing contract. Set the states of all draft contracts to
"cancel".
Add checkbox to free car (hr.fleet):
- In the hr.departure.wizard, set end_date to
fleet.vehicle.assignation.log, if there is no end_date or end_date >
departure_date
- Go through fleet.vehicle, find records with dirver_id to be the
employee, set it to False.
Add checkbox to archive private address (hr):
- when the private address not link to a internel user, set
employee.address_home_id.active to Flase
- unarchive it after the employee unarchived
Add checkbox to cancel future appraisals (hr.appraisal)
- find all appraisals link to the employee and state in
['new', 'pending'], set their state to 'cancel'.
Add checkbox to cancel future leaves (hr.holidays):
- only consider leaves are not in state ['refuse', 'cancel'],
find leaves with to_date > departure_date, set their state to
'cancel'.
PR #42526
Task 2153106
Related: odoo/enterprise#7471
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Quizz survey is updated to demonstrate the use case of media on questions and
answers. Happy surveying.
Task ID 2083823
PR #42228
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Purpose:
Allow the addition of media on a question and/or answers in order to describe
or illustrate them.
- Specifications:
During the creation of a question, you have now the possibility to set a
description of a question by filling an html field under the tab "Description".
This field can be used to enter text or to illustrate the question with an
image or video.
There is also an option to add pictures on answers for simple and multiple
choice questions. Those are displayed as clickable images.
Task ID 2083823
PR #42228
Login in into a database
Access the database manager
Duplicate a database
Internal server error will occur and display user. This should not
happen (even if the database is duplicated just fine), and occur
because after the duplication the connection is dropped but the cursor
will still hold the old reference and then, in the response generation
it will crash.
Invalidating cursor right after the duplication, like what is done after
a 'drop' operation fix the issue
opw-2170974
closesodoo/odoo#44159
X-original-commit: 59553c8595cdaf50a4c6f3ffe4093116d0f48bf1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, the CSS rule handling the "activity" of the modals
(their z-index compared to the one of their backdrop) was global and would
interfere with front-end or custom modals which do not use the static Dialog
methods giving them the "active" class.
Now, the rule has been inverted: the z-index of a modal is only changed when
it is given an "inactive" class, thus only impacting the modals instantiated
via Dialog or Owl Dialog classes.
closesodoo/odoo#44067
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, a move can be 'assigned' even if it has no reserved
quantity.
How to reproduce:
- For a tracked product, add some quantities for a LN/SN. Create an
another LN/SN with no quantity;
- Create a delivery for this product;
- Confirm it and check availability;
- On the move line, change the SN/LN for the one without quantity.
--> The move has no reserved quantity but is still marked as
`assigned`.
task-2171546
closesodoo/odoo#44145
X-original-commit: d5e70fa9778240b23515cea6ab1a3d0a674ac940
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Co-authored-by: sle-odoo <sle@odoo.com>
PURPOSE
There has been a few changes in the accounting module since the version 12.4.
The field 'invoice_ids' in the 'sale.order' model is now related to the 'account.move'
model instead of the 'account.invoice' model. The field that contain the payment state
is now called 'invoice_payment_state'. This field changed name again in master into
'payment_state'.
SPECIFICATION
Change the call from 'invoice.state' into 'invoice.payment_state'.
LINKS
Task ID : 2180184
PR : #43822
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Migration have long been only accessible thanks to a symlink from
`odoo.base.maintenance` to our private migration repository. Thank to
the change of bbb1a8f it is now possible to give a load the
migrations scripts from a path given in options.
The `initialize_sys_path` function has been updated to hooks the new
paths or the legacy symlink and to provide aliases to the previous
import logic to ensure backward compatibility.
`odoo.upgrades` (`community/odoo/upgrades`) is a new namespace that hook
all `--upgrades-paths` directories or the
`community/odoo/base/maintenance/migrations` symlink if none is previded.
`odoo.addons.base.maintenance.migrations` has been made an alias to
`odoo.upgrades`.
The `odoo.upgrades` is the desired method for accessing migrations
scripts and should be used by all new scripts.
closesodoo/odoo#44117
Task: 2178274
X-original-commit: d963cc05acd882729c4eb5ab940dae2a2197e55a
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
- Create a product A, FIFO and Automated
- Create a PO for 50 units
- Receive 45 units, no backorder
- Create a landed cost for the picking
The landed cost is split between the two move lines (45 units and 5
units).
This occurs since in v13, there is no canceled picking created for the
backorder, but a canceled stock move.
We filter out canceled moves.
opw-2179145
closesodoo/odoo#44095
X-original-commit: 120a2d116e4820fa9a4529e8ef01569823d02d13
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When simply need to parse a domain, it is easier
Add .strip() on ir.ui.view as ast.literal_eval produces an syntax
error if the node starts with spaces (as done in the xpath of
hr_attendance.view_employee_form_inherit_hr_attendance)
closesodoo/odoo#43831
Related: odoo/enterprise#7894
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When a contract is closed, set the date of the day.
In the contract cron, ensure that all closed contracts have
an end date if it is followed by a new contract.
Add multi-edit on work_entry list
closesodoo/odoo#44118
Taskid: 2180263
X-original-commit: 0b5d8ce756eac904a040ca700f44ea860daefcb4
Related: odoo/enterprise#7991
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
With a product configured as buy on order and a warehouse configured as
receipt in two steps, if the user increases the quantity on a po line
generated by a sale order before confirming it, the system will send all
the quantity to input but only the ordered quantity to customer. The
issue is that the "extra quantity" will stay in input.
We fix this issue by creating a new move with the extra quantity to the
input location so that push rules will send the extra quantity to stock
while the ordered quantity will be sent to the customer.
There was also an issue when incrementing the quantity on the po line
after confirmation if the po line was the result of a reordering rule:
only a move from supplier to the location of the reordering rule was
created.
This commit also introduces a change of semantic:
`created_purchase_line_id` is cleared after confirming the RFQ. This
allows to merge more in `_merge_moves`.
task-1981355
closesodoo/odoo#43545
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
When running the scheduler, either from the cron or from Inventory,
_run_scheduler_tasks calls _merge_quants.
However, when there were quants to merge, the query from
_merge_quants would not be applied from this function.
This is because the parameter use_new_cursor was used
but a manual commit was missing after calling _merge_quants.
For run_scheduler, we use the parameter use_new_cursor except for tests.
We add a commit in _run_scheduler_tasks, so that the result of _merge_quants
is committed in the database. Same issue for _run_fifo_vaccum
opw 2155559
closesodoo/odoo#44105
X-original-commit: 021f0f0cdeb006006e93fd74f0280d18b5688836
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
When we had multiple journal items with the same account in either debit or credit on the opening move, only the last one was taken into account. This could happen when the opening entry had modified manually (not through the list view opened by the setup bar).
We now take multiple lines into account when computing the opening balance. Also, this multiple lines case is also now supported by the setup list view allowing editing the opening balances : when multiple lines exist for the same account, we group them into one and edit the total just like before.
closes https://github.com/odoo/odoo/issues/43736closesodoo/odoo#44088
X-original-commit: c5a8051a2c840b2be545eee2f173261a908de737
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
When a move is created through a push rule, the system will first try to
find a picking to put it into before creating a new one. It is possible
the move is placed into an immediate picking where the reservation
fields are hidden and the initial demand is updated according to the
qty_done with [0].
As this behaviour is unwanted, do not merge move into immediate
transfers (which should be short-lived anyway).
[0] 8303b1a69eclosesodoo/odoo#44086
X-original-commit: fa9efd28e6e113cd9993a29bca070ddee83630c0
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Usecase for example A black T-shirt made from a white T-shirt and
black color. This behavior was possible in 12.0 and 11.0 and was
removed by commit 77a8d92196Close#40540closesodoo/odoo#44084
X-original-commit: 575353e251a0cce3bbff759edaeb56b5718beb11
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Steps to reproduce the bug:
- Let's consider a company partner P with company_id = A
- Let's consider an other partner C which is a child of P
- Change the company_id of P to B
Bug:
The company_id of C was not changed even if the field company_id
of C is in readonly as he has a parent.
opw:2179632
closesodoo/odoo#44061
X-original-commit: f41f7dc0f4f2a1682c6f81aba6512306ecf86067
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Task 2176461
* Dashboard: don't show lins if there is no data
* Add new menu for expense reports
* Reorganize notes on bottom of printed invoice
closesodoo/odoo#43787
Related: odoo/enterprise#7880
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Before this commit there were two buttons on this wizard with the same name 'create_invoices' that do different things. One creates the invoice and the other one creates and opens the invoices. By setting an unique ID on both buttons we can do a clean and easy xpath. Something like button[@id='create_invoice_open'] instead of having to use indexes or dangerous behaviours
closesodoo/odoo#44072
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
PURPOSE
Integration between event and eCommerce is required only when users handle the
entire selling process online. However users may require ticketing support
while managing payments outside of Odoo. Purpose of this commit is to prepare
support of tickets directly in event application without need of sales.
SPECIFICATIONS
Clean existing event type demo and data
Clean fields definition and parameters (no functional or technical
changes, just cleaning their definition).
Add tests before updating models. As some event models (event.type and
event.ticket notably) are about to be modified let us add some tests to avoid
regressions. Security tests are also moved in their own file. Some internals
tests defined in event_sale are also moved in their own file. That way we
avoid bloating files with unrelated tests. Future commits will add tests for
event and event.type models.
Prepare views for ticket model update :
* define views for ticket model. Currently views are directly embedded
in o2m of event.type and event.event, leading to complex xpath to
modify them. They are now real views;
* split templates in website_event_sale, to have templates related to
website_event and website_sale separated, leading to more simple diff
comprehension;
Add some fixes :
* copy event type mail scheduling only if activated on event type;
fix seats_max field not editable;
See sub commits for more details.
LINKS
Task ID 2177281 (support tickets directly in event)
Prepares Community PR #43488
Closes Community PR #44066
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Integration between event and eCommerce is required only when users handle the
entire selling process online. However users may require ticketing support
while managing payments outside of Odoo. Purpose of this commit is to prepare
support of tickets directly in event application without need of sales.
SPECIFICATIONS
In this commit we prepare the ticket model split and update by
* define views for ticket model. Currently views are directly embedded
in o2m of event.type and event.event, leading to complex xpath to
modify them. They are now real views;
* split templates in website_event_sale, to have templates related to
website_event and website_sale separated, leading to more simple diff
comprehension;
LINKS
Task ID 2177281 (support tickets directly in event)
Prepares Community PR odoo/odoo#43488
Closes Community PR odoo/odoo#44066
As some event models (event.type and event.ticket notably) are about to
be modified let us add some tests to avoid regressions.
Security tests are also moved in their own file. Some internals tests defined
in event_sale are also moved in their own file. That way we avoid bloating
files with unrelated tests. Future commits will add tests for event and
event.type models.
LINKS
Task ID 2177281 (support tickets directly in event)
Prepares Community PR odoo/odoo#43488
Closes Community PR odoo/odoo#44066
Since 412ff994f1 seats_max field of event cannot be modified as it
is always readonly. It should instead not be readonly as we consider people
could change it whenever they want.
LINKS
Task ID 2177281 (support tickets directly in event)
Prepares Community PR odoo/odoo#43488
Closes Community PR odoo/odoo#44066
Currently when changing category of an event, its category mail scheduling
is copied onto the event even if the category does not enforce its use.
We have to check the category use_mail_schedule field before computing
the new event mail schedulers.
In this commit we also lessen default schedulers from 3 to 2 in order to
still help people using them without bloating too much event creation.
LINKS
Task ID 2177281 (support tickets directly in event)
Prepares Community PR odoo/odoo#43488
Closes Community PR odoo/odoo#44066
In this commit we prepare future event model changes by reordering removing
unnecessary parameters definitions, notably readonly set to False as it is
the default value. Those parameters notably come from 412ff994f1 .
Some reordering is also done in order to better understand future pre / post
change model organization.
LINKS
Task ID 2177281 (support tickets directly in event)
Prepares Community PR odoo/odoo#43488
Closes Community PR odoo/odoo#44066
In this commit we clean some event.type definitions. Indeed there are several
of them without any real use, demo as well as data. It is more important to
have fine-tuned demo and data than a lot of unused or generic demo.
LINKS
Task ID 2177281 (support tickets directly in event)
Prepares Community PR odoo/odoo#43488
Closes Community PR odoo/odoo#44066
Before this commit:
In calendar view, when you unselect all filters of a category, all
events disappear (it's expected), but all filters also disappear.
So you can't selectd anything, you must reload the view to unlock
the situation.
After this commit:
When you unselect all filters of a category, all events disappear but
the filters stay as before selection (of course the last unselected
filter stay unselected).
closesodoo/odoo#44031
Taskid: 2146842
Related: odoo/enterprise#7970
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In Employee / Work information / Responsible: there is a lack of
information on the "help message" The objective is to change text
in the help message by the ones below:
Field "Coach":
-Employee responsible of this employee.
-The "coach" has no specific rignts or responsibilities by default.
Field "Time Off":
-User responsible for approving "time off" of this employee.
-If empty, the approval is done by any administrators or approvers (determinated in settings/users)
Field "expense":
-User responsible for approving "Expenses" of this employee.
-If empty, the approval is done by any administrators or approvers (determinated in settings/users)
TaskId :2168330
closes odoo/odoo#43467
Closes: #43467
Related: odoo/enterprise#7778
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Some small improvements in timesheet report view.
In measures of graph, take string attribute into account.
closesodoo/odoo#41348
Taskid: 2149371
Related: odoo/enterprise#7041
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
A timeout is setup to go back to the floorplan after the user has been
idle for 1 minute to synchronize orders. We now only keep this
behaviour on the ProductScreen.
closesodoo/odoo#44062
X-original-commit: 7569b630ef174254e4443587c66b26a13e6a6e1e
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
Payments that used terminals were not correctly canceled when switching
to the floor plan because there was no selected order. If a response was
received at that time, a traceback appeared.
X-original-commit: f9214eed9774dcddc57deb536dfcd23572972184
Separate orders synchronization from set table to make the code clearer and
enable overriding.
X-original-commit: 5dd115b885193d1b301f4154d76f028194a7ae09