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
Studio customization is an exception, a data module added to ir_module
but that is never added to graph since there is no manifest.
OPW #2180885closes#43880closesodoo/odoo#43940
X-original-commit: 4051ac83b5e7cc1cb91a264b51401ad5601ad4e2
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Sometimes when we try to buy a product that doesn't have any variants,
it would result in an error saying there isn't any valid combination
for that product.
This was happening because `_get_variant_id_for_combination` was
considering that the field `combination_indices` would always be
equal to `''` (empty string) in such a case.
This isn't true as `combination_indices` isn't a required field
thus allowing `null` \ `None` to be valid values for that field.
This fix will simply include products with no values set for their
`combination_indices` when searching a corresponding variant from
the `product_template`.
closesodoo/odoo#44056
X-original-commit: 03e7efc3b4592c5f063c665130011a91fcc4d683
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
When there are no items in the cart, pressing the print bill button
may result in an error due to the translation (_t) module not being
imported
closesodoo/odoo#43937
X-original-commit: f4ef43e98613c2e916402eb35375a3d39481832f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Two of the UserErrors mentioned 'quantites' instead of 'quantities' before this commit. This commit fixes the terms and the translation file.
closesodoo/odoo#43902
X-original-commit: 68a849bfb507c5fa14b869a44ea50bf88ff3ce1f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Purpose
=======
Improve the sponsors and attendees integration in event. Focus on :
* sponsor management: transform it into a real business document allowing
to communicate with sponsors) ;
* attendee management: improve views, ease searching / updating them in
batch;
Specifications
==============
Sponsors
--------
Move all the views related to sponsor and sponsor type to their own file to
clean module organization.
Add integration with mailgateway and activities through mail.thread and
mail.activity.mixin inheritance.
Improve sponsor views: add a real form view and add a small kanban view
displaying some partner / sponsor information.
Attendees
---------
In order to allow state management in batch, state field is made editable in
multi edit mode of registrations. That way event managers are able to work in
batch. It required to move some code currently called in custom action-called
methods directly in write. It makes sense to consider that some required code
is called by writing on state field instead of depending on calling the right
method. Indeed there is not much "business" code to move: calling mail
schedulers on confirmation, and putting the closing date when closing.
Event and registration tree views are improved, some fields are now editable
in multi edit mode.
When a user register on a event from website, it will create a sale order and
a partner (the customer of the SO). Set automatically the partner of the
registration to the partner of the sale order.
Other
-----
This merge include a fix in mass mailing (default domain propagation) and
web (void values display for phone widget). See sub commits for more details.
Task ID 2119333
PR #40949
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Improve the attendees management: improve views, actions, (views, actions).
Specifications
==============
In order to allow state management in batch, state field is made editable in
multi edit mode of registrations. That way event managers are able to work in
batch. It required to move some code currently called in custom action-called
methods directly in write. It makes sense to consider that some required code
is called by writing on state field instead of depending on calling the right
method. Indeed there is not much "business" code to move: calling mail
schedulers on confirmation, and putting the closing date when closing.
Event and registration tree views are improved, some fields are now editable
in multi edit mode.
When a user register on a event from website, it will create a sale order and
a partner (the customer of the SO). Set automatically the partner of the
registration to the partner of the sale order.
Task ID 2119333
PR #40949
Purpose
=======
Improve sponsor management in order to transform it into a real business
document allowing to communicate with them directly.
Specifications
==============
Add integration with mailgateway and activities through mail.thread and
mail.activity.mixin inheritance.
Improve sponsor views: add a real form view and add a small kanban view
displaying some partner / sponsor information.
Task ID 2119333
PR #40949
As sponsor feature of website_event_track is going to be improved we take
the opportunity to move views in their own file. It eases module and views
readability. Some XML Ids are also renamed according to guidelines.
Task ID 2119333
PR #40949
When the value is empty in a related field, string of the element was
displaying "false" instead of an empty string which is not what we expect.
This commit fixes that issue.
Task ID 2119333
PR #40949
Currently mailing_domain is a computed editable stored field. Its mailing
domain is either computed based on current model (taking into account
blacklist, opt-out, ...), either manually crafted.
However current implementation does not support default values coming from
context as they are reset by the triggers of the computed field. This
commit fixes that behavior.
Tests are added because somehow we should find a way to stabilize mailing
domain computation.
Co-Authored-By: Stéphane Debauche <std@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Task ID 2119333
PR #40949
before this commit: if only one measure is enabled then measure row not
displayed in downloaded xlsx file
after this commit: downloaded xlsx file will always have measure row
either single measure enabled or multiple measure enabled
task-2127388
closesodoo/odoo#40769
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
before this commit: file was downloaded in xls format, which supports
maximum 256 columns and 65536 rows.
after this commit: pivot returns xlsx file when table printed and
downloaded, we have support of xlsxwriter, xlsx file supports 16384
columns and 1048576 rows
task-2127388
Without any access rights on the 'account' module, a salesperson should be able to
create a new invoice from a sale order.
Since the merge of account.invoice with account.move, we need to manage carefully the
access rights when dealing with invoices. A salesperson must not be able to manage the
journal entries except the one being an invoice created for a sale order.
To make such restriction on the journal entry's type, we need additional record rules
- in sale: to restrict the access to invoices.
- in account: to exit such restrictions when having billing access rights.
closesodoo/odoo#44023
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>