Purpose of this merge is to clearly distinguish sending a mass mailing from
scheduling it to a future date. Currently both options are a bit mixed and
not obvious. Now buttons are separated. Scheduling opens a small wizard
allowing to choose the date.
Some computation of sent and scheduled date are also fixed to be cleaner.
This merge is related to task ID 46932. Closes#24465.
Currently when you click on send now button or schedule button it will enter
current date as sent_date while the mailing list is still in queue. Actual
sent date will be the date when the mail is sent.
Related task ID : 46932
Purpose of this commit is to re-arrange mass mailing buttons and to add
a button for scheduling mass mailing in future :
* add schedule date in debug mode;
* re-arrange all button;
* add schedule in future button and on click open wizard to schedule future
date;
* on 'send now' button remove the useless '|' in domain;
* add a small wizard to select the send date;
This commit is related to task ID 46932
Currently the distinction between expense officers and expense managers
doesn't make sense because they both have the same rights.
This commit aims at making a clear difference between an officer and a
manager.
After this commit the rights will look like this :
* Expense Manager :
- See and approve any expense
* Expense Officer :
- Can see and approve the expenses of employees in his department
or employees for which he is the manager (field parent_id on
hr_employee)
- Cannot approve his own expenses
* Simple user :
- Can only see his own expenses
- Can only send his expenses to a manager (either the manager of
his department, his direct manager [parent_id field] or an
expense manager)
Related to task #51520Closes#23033
Purpose of this commit to improve scheduling of meetings with activities.
If summary is empty use record's name as name of meeting to speedup the
flow.
This commit is related to task ID 1838315
This commit improves the daily use of activities through some small updates
* on hover of clock icon in kanban card display tooltip. Purpose of this
change is to clarify meaning of colors displayed in kanban view. Otherwise
just havign a color is not very meaningful;
* add days string in planned in column;
* add space between number and days in planned in field;
This commit is related to task ID 1838315.
By default, Chrome browser will block pop-up windows which will block
all actions from type act_url with a different target than 'self' (i.e.
'_blank').
This commit adds a check when such an action is called and sends a
warning in the web client when it fails to open. This mimics the
behaviour already present for the report actions.
* export benches for m2o
* tag benches instead of requiring editing the source to enable them
* dump the profiling stats intead of saving to disk (less convenient
for complex analysis but way more so for simple overview)
* add M2O benching in addition to the existing integer-based one in
order to expose problematic behaviour when exporting significant
numbers of non-shared relational records (& quantify impact of
creation v read)
Following odoo/odoo#22493 the performances of exporting XIDs was
greatly improved by batching XIDs and avoiding the ~3 SQL queries per
xid/record when no xid exists yet.
*However* the batching was done per call of _export_rows and to handle
relational fields _export_rows calls itself recursively leading to
sub-standard xid batching:
* for M2M and O2M fields, some batching would happen on a
parent-record basis, each M2M or O2M field (in a parent) would be
xid-batched, but two parent records wouldn't see their children
xid-batched together
* for M2O, there would be essentially no batching with a call to
__ensure_xml_id per record and while less queries than before in the
worst case more complex ones in fact
Change: rather than ensure XIDs exist when performing the export, add
XIDs export as a post-processing of the exported records table. This
way, each involved model can be entirely batched and exporting 10000
records's (id, value_id/id) 2 calls instead of 10001.
Also rename _export_rows's recursion parameter for clarity, it has
clearly outgrown its use as a batch invalidation flag and the name
is now less than clear.
Furthermore _-prefix & mandate kwarg usage to make it clearer it's not
really a "public" parameter, and is intended as an internal recursion
flag.
* store hashed passwords in the `password` column but gate it behind a
computed field
* make the password field essentially write-only (SQL aside)
* add a "plaintext" hash type so it's possible to set the password in
SQL directly & be able to login & have it automatically updated
Task 34211
Due to the switch from less to scss, changes were made. Especially, the
class oe_link is now 'deprecated' and interpreted as 'btn-link'. The
previous style defined on the latter removed the padding which breaks
the style when several buttons follow each other.
This commit should fix the style while maintaining the intended behaviour,
a vertical alignment between the button and the text inside the pane.
With this commit, it is now possible to delete a page directly from it's page
properties dialog.
Before this commit, you had to go into the page manager and then find your page
that could take some time.
task-1850578
Closes#24861
See https://github.com/odoo/odoo/issues/20804
We don't turn invoice_ids into a computed field, because we need it erverywhere for technical reasons. Instead, we use a new computed field only there to ensure consistency of the displayed data.
Was task: 1819501
Was PR #24290
It was very confusing for the user to distinct account.payment and payment.transaction. From now on, the transactions are
technical objects and, in the backend, we only refer to it in log messages (Front end will be adapted in the same fashion
later on). They are hidden in debug mode in accounting\configuration\payments as their purpose is now purely technical/log
This commit also aims to reduce the gap between the accounting app and the transactions: account.payment objects are
created/validated upon completion of transaction.
To ease the capture/voiding of pending transactions, the related buttons are now displayed directly on the SO/invoice
instead of the transactions.
Was task: https://www.odoo.com/web#id=35857&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
Was PR #24043
[FIX] add domain based on journal to payment tokens
Was opw: https://www.odoo.com/web?debug#id=1828206&view_type=form&model=project.task&menu_id=5200
When we selected an image/icon, there was no visual feedback explaining
to the user that the image/icon had been selected (except for images on
chrome).
task-35020
Closes https://github.com/odoo/odoo/pull/24160
Purpose
=======
The method _name_search and _search add support to search as another user.
All the overrides of name_search and search redefine the behavior of the search.
This bring inconsistencies as the result of a call to _name_search and name_search
could differ on certain modules, which is not acceptable.
Specification
=============
Example:
~~~~~~~~
If the name_search method is overridden to search also on the driver name,
then calling name_search with a label 'JF' will return all the cars with a name containing
'JF' or all the cars with a driver name containing 'JF'. Let's say that we have a ir.rule
preventing a user to read the cars of another company. Then the call to name search only returns
the cars satisfying the previous condition AND belonging to his company.
Now, we want to overpass this constraint. We call _name_search with the attribute name_get_uid=1.
Then the call to _name_search returns all the cars from all the companies with a name like 'JF',
but nothing is done about the driver_name.
Example of wrong search redefinition on a model
-----------------------------------------------
@api.model
def name_search(self, name, args=None, operator='ilike', limit=100):
domain = args or []
domain = expression.AND([domain, [('name', 'ilike', name)]])
partners = self.env['res.partner'].search([('name', operator, name)])
if partners and name:
domain = expression.OR([domain, ['|', ('driver_id', 'in', partners.ids), ('driver_id', '=', False)]])
rec = self.search(domain, limit=limit)
return rec.name_get()
Example of correct search redefinition on a model
-------------------------------------------------
@api.model
def _name_search(self, name, args=None, operator='ilike', limit=100, name_get_uid=None):
domain = args or []
domain = expression.AND([domain, [('name', operator, name)]])
partner_ids = self.env['res.partner']._search([('name', operator, name)], access_rights_uid=name_get_uid)
if partner_ids:
domain = expression.OR([domain, ['|', ('driver_id', 'in', partner_ids), ('driver_id', '=', False)]])
rec = self._search(domain, limit=limit, access_rights_uid=name_get_uid)
return self.browse(rec).name_get()
The same logic should be applied on the overrides of the search method.
With this commit, we introduce a better screen to manipulate the search
view in a mobile device.
Note: most of this work was initially done by suh-odoo, then was adapted
and moved to community by myself.
task 31464
For historical reason, purchase depends on stock module. We now
plan to add purchase feature for services. A service company will
not be interessted by having stock install when they do service
purchases. So this commit breaks this dependency by creating a
new bridge module named 'purchase_stock'.
No functionnal behavior should have changed, this commit only
move code.
However, some points need to be highlighted:
* The purchase report was split, the same way sale report is. Installing
stock will just add a few addionnal informations to the SQL views.
* Since test cases depends on stock demo data, the basic purchase
addon does not contain tests, but this will come in futur tasks.
* consu and service product's receieved quantity can be manually edited,
when stock is not installed. The same mecanism to compute this quantity
done
in sale (for delivered qty) will be implemented later.
Thanks to @amoyaux and @pimodoo for their reviews.
Task #47927
When stock is not install and using purchase alone, user
should be able to edit received quantity manually for
consummable (and services) products.
This is a direct consequence to the split of purchase
and stock module.
We want to break the dependency between stock and purchase
for our furtur developpement. For more modularity, a new
bridge module 'purchase_stock' is created.
This commti move part of business code, views, data, ...
related to stock management from purchase into purchase_stock
without changing any feature.
Task #47927
The idea is to do like the sale report: being
able for other modules to extend the report and
add their own fields. As we are going to split
stock from purchase, we will need this.
When we perform a planned transfer (which is the default behaviour now)
we are not able to set a quantity done on move lines in a confirmed
move because, the field 'is_initial_demand_editable' is true but should
not.
To fix this, we set 'is_initial_demand_editable' to true when it is not
a planned transfer AND the state of the move is draft, which is the
desired behaviour.
This behaviour come from rev:https://github.com/odoo/odoo/commit/ffb79761c1225c8a9c9303db4781f1b40b5d9944
When a picking is returned, the scheduled date stay unchanged. This date can be
in the past if the return is made at least one day after the transfer. This commit
set the return day as scheduled date
When a picking is in 'Done' state, we add the effective date on the form in
addition to the effective date. The user can know the date when the picking was effectively
made.
Purpose is to avoid mixing various data types in the same generic mail_data
file. We already have 2 crons and the upcoming moderation feature will add
some more. Let us put them in their file to ease the finding.
This commit is linked to task ID 29521.
This commit provides a test suite for sale flow and unit tests.
We split tests in different files to try regrouping them by
testing purpose:
1/ test_access_rights.py checks employee, sale person, sale manager
and portal access rights. It is executes in post-install mode to be
sure other addons does not break the security rules.
2/ test_onchange.py checks the onchange using the SFF mecanism in
order to simulate what a sale person really does in its day-to-day
job.
3/ test_sale_pricelist.py execute a sale flow with different pricelist,
as this is a delicate aspect.
4/ test_sale_to_invoice.py contains tests about refund, discount and
downpayment, as none of those were tested.
Task #43928
As 'invoice_ids' on sale.order is a computed field, creating
a refund should invalidate this field as 'invoice_ids'
should contain invoices, refunds, ...
When using the refund wizard, the credit note will be linked
to the SO lines (see `_refund_cleanup_lines` override in sale).
Without the new trigger, invoice_ids will not be recomputed, and
executing 'sale_order.invoice_ids[1]' will not return the refund
account.invoice.
This commit fixes it.
`currency_id` variable is a recordset, so stop browsing it again !
In the meantime, if those variable had a meaningfull name, this
error would never occured !
Coming from 7a282c9965
Without this commit, reading all fields of sales
order will raise an access error if user does not
have access to hr.expense documents. An since
the expense count is displayed on the form view, this
can be annoying.
This commit makes the computation of the expense
count done by 'sudo', as there is not critical
informations at stake.
Set the right employee's possible states.
Before the restyling, the main title was always “Welcome!” regardless
of the user state (checked_in or checked_out). Using conditional titles
has exposed the issue.
- Create a Finished Product tracked by SN
- Add a BoM with routing (in several steps) to that product: component A
should be consumed in 1st step and component B in 2nd step
- Create a MO, plan it, go on the first WO and produce the finished
product with SN 0001
- Then go on the second WO and produce the finished product with SN 0002
- Back on your MO, you'll see that
Finished Product = SN 0002
Component A has been consumed for SN 0001
Component B has been consumed for SN 0002
- Mark the MO as done
No blocking error is raised so I'm consuming a product for a finished
product I'm not really producing. Traceability report will be wrong too.
We raise a blocking error to avoid this use case.
opw-1832098
Co-authored-by: Nicolas Martinelli <nim@odoo.com>
Currently, layout for rating a chat is not looking so well.
This commit improves the rating layout. It will
- Center the content (including smileys)
- Enlarge the fonts (a little bit)
- Underline the link instead of using italics (more intuitive)
Task : 1838321
PR : #24413
Several contextual data is added in notification emails in their headers.
We consider as not necessary to put some of them, notably db uid. It should
not be used outside of Odoo and having Odoo-Objects should be sufficient
for people that want to categorize their emails.
Thanks to this merge, users are now able to crop their images using the
editor. This is done by clicking on a content image and then the crop
button appearing in the editor bar. Cropping an image will only crop the
image at the location it was clicked by creating a new image for that
location. Cropped images do not appear in the media dialog.
task-43706
Closes https://github.com/odoo/odoo/pull/22473