Currently, when inviting members to a mail.channel using the "add_members"
method, it is not possible to signal to web client to automatically open that
conversation in a chat window.
This commit adds a parameter to that method to allow that behavior, and also
slightly adapts the notification handling to open the chat window accordingly
on the web client side.
This is necessary for the upcoming chatbot, where we want to invite operators
to the channel and make them see the new conversation immediately.
Task-2030386
Part-of: odoo/odoo#84000
Currently, when adding members to a mail.channel using the add_members method,
we always post notification message on the channel mentioning that someone has
joined the channel / was invited to join by another user.
This commit simply adds a method parameter allowing to disable that behavior.
This change is necessary for the upcoming chatbot, where we want to add members
but handle the join notifications differently.
Task-2030386
Part-of: odoo/odoo#84000
Currently, when creating a partner, there could be a situation
in which a commerical field has some access restriction
due to `groups` being set on a the field declaration.
The `sudo()` makes sure it does not happen.
closesodoo/odoo#83205
Related: odoo/enterprise#25828
Signed-off-by: William André (wan) <wan@odoo.com>
The basic idea of this functionality is for users
to be able to put limits on Partners that would
trigger non-blocking warnings when trying to confirm new:
- Sales Orders
- Invoices
when that partner has too many open invoices.
task-2722165
Part-of: odoo/odoo#83205
In case you applied inventory in batch the system would create a lot of useless
stock moves and stock move lines.
closesodoo/odoo#87771
X-original-commit: 07f18f62db490608b316cc9482f228252ed8fc63
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
Current behavior:
In some particular cases bootstrap was throwing an error "Uncaught Error: Please use show on visible elements"
wich appeared on the users screens.
Steps to reproduce:
- Could only reproduce on copy of clients Db
- Go in CRM and go in any lead
- Create a new activity
- Swap to an activity with less fields
- Then quickly put your mouse on the top of a field that just disappeared
- The "Please use show on visible elements" error appears.
Here's a video where I reproduce it on clients Db : https://watch.screencastify.com/v/gksBwwF0McirZzSFwaAP
opw-2720853
closesodoo/odoo#87770
X-original-commit: 3404c9500fad4004d6d8beef6041ac51439078cd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Current behavior :
When you delete a record (for example project.task), all the messages related
to this record aren't deleted.
This, in case a user has his notifications managed in Odoo, may prevent him
from accessing the History tab in the Discuss app because these messages are
linked to a record that doesn't exist anymore and it will raise a Missing Record
error
Steps :
*with demo data*
- Install Project
- Make Marc Demo notifications managed in Odoo
- Delete a task project to which Marc Demo is assigned
(*with Marc Demo*)
- Go to Discuss and try to access History tab
OPW-2764855
closesodoo/odoo#87732
X-original-commit: ee8feeb73c920827090b1a5ecf78e8b1d21bbae4
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
Steps to reproduce:
1) start from a clean database (http_routing should not be installed).
2) go to the app menu and install project (don't install via `-i`!!).
3) traceback: `request` has not attribute `is_frontend` while rendering
a template.
The `is_frontend` attribute on request is set by the http_routing
module. At the moment the "install now" button is clicked, http_routing
was not installed so the `is_frontend` attribute was not set.
FF to the end of the installation: the registry is reloaded to include
the modules that have been installed, http_routing among them.
We are in a tricky situation: (1) there is a request, (2) http_routing
is installed and (3) the `is_frontend` attribute is missing from the
request.
This situation is illegal, when http_routing is installed, the
`is_frontend` attribut should always be set. In this work we reset the
missing attributes using sensitive default values via post-init hooks.
closesodoo/odoo#87684
Signed-off-by: Julien Castiaux <juc@odoo.com>
Improve a few things in accounts modules:
- Users wants to be able to change the account in the general ledger
list view
- Do not group by date by default when auditing a tax line.
- Make the currency fields only show in debug mode for accounts and assets
- Disallow to delete taxes linked to a tax repartition line, and
clarify the error message when trying to delete one linked to a
fiscal position's account mapping
Task id # 2810379
[IMP] account_*: some Back2Basics improvements
Improve a few things in accounts modules:
- Users wants to be able to change the account in the general ledger
list view
- Do not group by date by default when auditing a tax line.
- Disallow to delete taxes linked to a tax repartition line, and
clarify the error message when trying to delete one linked to a
fiscal position's account mapping
Task id # 2810379
closesodoo/odoo#87659
Related: odoo/enterprise#25770
Signed-off-by: Laurent Smet <las@odoo.com>
* = website
Change the wording of the sms reminder template to make it sound friendlier and
more complete. The sms will include the event address if it is defined.
Otherwise, it will link to the event page if website is installed.
A one line-formatted version of the venue is added to the model to be used in
the template and other places.
This required to update `event_registration.get_date_range_str` to not include
the time when describing an event happening more than a month from the current
date, which makes sense as there is no reason to specify the time only in that
case, and we add the time somewhere else when it's useful anyway.
For consistency, Wembley Stadium is updated to London timezone in the demo
data.
Task-2777183
closesodoo/odoo#85664
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Skip the confirmation step when wanting to get rid of a notification
for emails, sms or letters that were not sent.
Technical:
- All 3 wizards to confirm the discarding of the notification have been removed
(the ones for mail, sms and letter) have been removed
- The method to discard notification has been centralized in MailThread
(notify_cancel_by_type in addons/mail/models/mail_thread.py)
- This centralization has been done as well on the client code as the same
server code is called whether it is a mail, a sms or a letter
(in addons/mail/static/src/models/notification_group/notification_group.js)
- Existing front and back test have been adapted
- A test of notify_cancel_by_type for mail has been added
(addons/test_mail/tests/test_mail_management.py)
- add missing author_id in mail_notification demo data
Task-2752190
closesodoo/odoo#84452
Related: odoo/upgrade#3246
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
A reorganization of the calendar alarm form view was necessary for easier
extension with new fields
(such as the one from appointment, see links).
The partner is now the author of notifications about their invitation
(instead of public user).
Task-2709580
See odoo/enterprise#23191closesodoo/odoo#82387
Related: odoo/upgrade#3383
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Create a fiscal position [FPOS]
- Assign [FPOS] to a customer [DEMO]
- Add [FPOS] to the available fiscal positions of POS
- Open pos session, add a product, select [DEMO], [FPOS] will be
automatically selected. Confirm order and pay
- Click on refund button and select the previous order
[FPOS] will not be automatically selected for the refund order
opw-2799179
closesodoo/odoo#87503
X-original-commit: 4f8e257f2fc8e3d505342f9e1d6cb243a25e83e2
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Before this commit, the order of rows shown in costs and revenues is not
fixed and depends on the order of the modules.
This commit adds a sequence on each row and then sort the rows to fix
the order of those rows.
task-2710808
Before this commit, the components created and used in the right side
panel are components for the `project.milestone` and we cannot reused
some components for another context.
This commit refactors a little bit to create a parent component with the
common code useful for another components than `project.milestone` ones.
task-2710808
Before this commit, the domain used to find the SOLs inscreasing the
revenues of the project is fixed, so it is not possible to override the
domain without rewriting the method which computes the revenues from the
SOLs linked to the project.
This commit adds a hook to easily modify the domain used.
task-2710808
Before this commit, when all projects in `self` have no AA set, the
`read_group` used to `_compute_expense_count` is called. However, if AA
is in projects in `self` then `expense_count` field is always equal to
0 for each project because the link between the project and the expense
is made with AA.
This commit checks if at least a project has a AA set before calling the
`read_group` otherwise `expense_count=0` for all projects contained in
`self`.
Before this commit, the label is giving with the data computed for the
project profitability.
This commit separes the label with the data to avoid translating many
times the same things.
task-2710808
Before this commit, the Manufacturing orders are displayed in the costs
but the user sees which MO impacts the costs of the project
profitability.
This commit adds an action to allow the users to see all the MO related
to the project. However, the MO section will be clickable in the project
profitability only if the user has access to the MO.
task-2710808
Before this commit, the project profitability shows the total due to the
purchase orders linked to the project. However, the user cannot easily
sees which purchase orders impact the project profitability.
This commit adds an action to see all purchase orders related to the
project. However, the 'Purchase Orders' section in the costs will be
clickable only if the user has access to the purchase orders
task-2710808
Before this commit, the project profitability takes into account all
timesheets related to the project but the user cannot see which
timesheets for which row in the revenues or costs for a project.
This commit adds an action for each row containing timesheets to
correctly see which timesheets are found for an exact row. For instance,
the user will be able to see all timesheets for the 'Timesheets (Non
Billable)' row. The name of each row will be clickable only if the
user has access to the timesheet app.
task-2710808
Before this commit, the materials row displayed in the revenues of the
project profitability in the right side panel shows only the result of
all SOLs containing a material product. The user cannot see which SOLs
give that result.
This commit adds an action to see all SOLs related to that row. If the
user has access to the Sales app then the name in that row (that is,
'Material') will be clickable to redirect the user to the view of SOLs
found for that row.
task-2710808
Before this commit, the expenses inscreasing the revenues or the costs
in the project profitability are not visible for the user because he can
just see the result and not which expenses are related to that result.
This commit adds the action to see the expenses related to the revenues
that is, all expenses reinvoiced to the customer for that project or the
expenses related to the costs of the project. However, the user needs to
have access to the expenses to access to the action, otherwise the name
section is not clickable.
task-2710808
Before this commit, the expense costs are not clickable to see the
expenses impacting the project profitability in that row.
This commit adds the action to allow the user to click on the name on
the row to see all the expenses related.
task-2710808
This commit adds a generic method for all sections in the project
profitability to get the correct action based on the which section the
user clicks. Moreover, a new parameter is added into
`_get_profitability_items` method to add the action data in the
profitability items or not. This parameter will be useful for the unit
tests.
task-2710808
Before this commit, the profitability section is shown even if data is
found. That is, no cost and/or revenue are found to display the project
profitability.
This commit hides this section in the case where no data is found.
task-2710808
Before this commit, the reinvoice expenses are not takken into account
for the project profitability.
This commit adds a new module called `project_sale_expense` to make the
bridge between the sale_expense and project_hr_expense and so in this
module, the revenues impacted by the reinvoice expenses will be computed
and takken into account for the project profitability.
task-2710808
This commit continues to compute the project profitability with the
AAL models, it is essentially the timesheets related to the project
in which the profitabily is computing to get the costs impacted by those
timesheets related.
task-2710808
Before this commit, we don't have any method to get a dict containing
the mapping with the invoice_policy and the service_type to get the
service_policy. A mapping method exists for that use case but this
method creates the dict each time and we need to map more than one time.
For those reasons, this commit adds a method to get the dict containing
the `(invoice_policy, service_type)` as key and `service_policy` as
value.
task-2710808
Before this commit, the SOLs displaying in the Sales section of the
right side panel is 25, but if there are more than 25 SOLs linked to a
project, it is not possible to see the others.
This commit adds a button to load the others SOLs if there are more than
25 SOLs linked to the current project.
task-2710808
This commit reviews the project profitability displayed in right side
panel of project update kanban view. The goal of this commit is to add
more information to allow the user to see all information concerning the
profitability of his project.
task-2710808
Before this commit, when the `purchase_orders_count` field is computed,
we do a search in `purchase.order.line` to get the purchase order linked
to the projects in `self` of the `_compute_purchase_orders_count`
method. However, if no project has AA set this search is useless, we can
directly set `purchase_orders_count` to 0 for all projects because the
linked between the POs and the projects is made with AA of the project.
This commit changes the method to search the PO linked to the projects
only when at least one project has AA set, otherwise we directly set the
`purchase_orders_count` to 0 for all projects contained in `self`.
task-2710808
Before this commit, when the user creates an expense for the project and
reinvoice it. When this expense is approved and a post entry is
generated. An SOL is created in the SO and also a AAL to take into
account the cost. However, the `timesheet_invoice_type` for this AAL is
equal to `service_revenues` even if the amount is less than 0. The
reason is when the AAL is not a timesheet and linked to a SOL
containing a service product than the AAL is considered as a service
revenue even if the amount is less than 0 but in this case, the AAL is a
cost and not a revenue.
This commit fixes this issue by checking if the amount is greater or
equal to 0 to set the `timesheet_invoice_type` to `service_revenues`
otherwise we set to `other_costs`.
task-2710808
This commit renames some methods and add a query into timesheets to also
fetch the SOLs linked to the timesheets linked to the projects. So, now
all SOLs selected in the project app for that project will be take into
account.
task-2710808
This commit adds an action to allow the user to click on SOL contains
other project than product one to see the `stock.move` related of the SOL
clicked.
task-2710808
This commit completly reviews the Sales section. This section will
display all Sales Order Items linked to the current project shown
instead of displaying the sold section with the total sold section.
This section will shown the name and ordered, delivered and
invoiced quantities for each Sales Order Item related.
The name displayed in this section will be clickable if the product linked to
the Sales Order Item is a service one and if there is at least one
timesheet linked.
Finally, this commit also moves the Sales section initially defined in
sale_timesheet module into the `sale_project` one.
task-2710808
This commit removes stat buttons displayed in the right side panel in
project update kanban view to prepare the revamp of the content
shown in that project update. Indeed, the content in the right side
panel will show the information shown in those stat buttons but with more
details.
task-2710808
Have a Reconciliation model [DEMO] without tax
Create a bank statement
Open reconciliation widget
Select 'Manual Operation', select [DEMO], add any tax
Traceback will raise
This occur because the server will generate a line without `tax_ids`
field, that will remain undefined in the frontend
opw-2777191
closesodoo/odoo#87704
X-original-commit: 08f5dc605ccf42429d6405ec6c192322909c6c34
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>