Search
Navigate
Branch
Tuesday, October 24, 2023
33 changes
New functionality added to Odoo
Odoo can now manage multiple email alias domains, allowing each company in a multi-company setup to use its own reply-to and incoming email domain. This improves email routing, company separation, and configuration consistency across apps such as Documents, Helpdesk, Knowledge, Manufacturing, Quality, and Studio.
Original PR description
RATIONALE Currently only one alias domain is possible when using Odoo. Even if several outgoing and/or incoming email servers can be used, all "reply-to" email addresses belong to the same global email domain. Moreover incoming emails cannot be cleanly limited or checked against a company as we accept all incoming emails sent to aliases to ease notably email forwarding. PURPOSE Allow alias domains to be multiple, notably to be used in a multi company environment where each company has its own alias domain. SPECIFICATIONS See linked community PR for a more detailed global explanation on PR message, as well as detailed explanations on each sub commits. Task-36879 (Mail: Support Multi Domains Aliases)
Adds optional billing-rate indicators, total-time tracking, and monthly leaderboards to help employees and managers monitor timesheet progress. It also introduces editable tips to encourage better timesheet habits and excludes time off from rankings for fairer comparisons.
Original PR description
Purpose ======= The goal of this task is to help timesheets users to have a better control of the app, and to encourage them to record their timesheets by introducing tips and a monthly ranking…
Purpose
=======
The goal of this task is to help timesheets users to have a better control of the app, and to encourage them to record their timesheets by introducing tips and a monthly ranking system that ranks users accordingly to their billing rate or to their total recorded time.
Changes introduced
==================
- Added a billing rate and a total time indicator.
- These informations are displayed on the "My Timesheets" grid/list/kanban view once the setting "Billing Rate Target" is activated in the settings.
- The billing rate formula is as such : billable_time / billable_time_target * 100. The billable time target is unique to each employee, and can be changed in the employee's HR settings.
- Once the "Billing Rate Target" setting is activated, a billing rate target can be set for the company. If the current employee's billing rate falls below the company's billing rate target, the billing rate indicator is displayed in red, else it is be displayed in green.
- If the current employee's total recorded time does not correspond to the theoretical total recorded time according to their working hours, then the total time indicator is displayed in red.
- Timeoff entries are excluded from the ranking calculation.
- Added a leaderboard on the My Timesheets grid/list/kanban views.
- This leaderboard is displayed once the setting "Billing Rate Leaderboard" is activated in the settings.
- It displays the top three employees of the selected month for the grid view, and the top three employees of the current month for the list/kanban view. If the current user is in the leaderboard, then only the 2 first employees are displayed along with the current employee.
- When clicking on the leaderboard, a Dialog is opened showing more details about the leaderboard.
- The leaderboard disappears once the timer starts.
- Added a leaderboard dialog window.
- This dialog window displays many informations about the ranked employees, such as their total billable time, their billable time target, their total recorded time and their billing rate.
- Three buttons allows the user to change the selected month, and display the leaderboard for the selected month.
- There are two types of ranking criteria : rank by billing rate, and rank by total recorded time. The criteria can be changed through the dialog view, and changes the leaderboard's ranking.
- Added "Timesheets Tips".
- These tips are fully editable by timesheets managers, and a random one is displayed on the right of the leaderboard dialog window.
Technical details
=================
sale_timesheet_enterprise
---------
- Added a SQL request in `res.company`. This request fetches the employees id, their name, their billable time, their billable time target, their total recorded time, their recorded time as of today, and their billing rate, for the selected company in the selected period of time.
- Added two different groups `group_timesheet_leaderboard_show_rates` and `group_use_timesheet_leaderboard`. The former allows users to see the billing rate and the total time indicators, and the latter allows users to see the leaderboard.
- Added two different settings in `res.company`: group_timesheet_leaderboard_show_rates` and `group_use_timesheet_leaderboard`. The former gives the `group_timesheet_leaderboard_show_rates` group to all employees, and the latter gives the `group_use_timesheet_leaderboard` group to all employees.
- Added a `TimesheetLeaderboard` component. This component is added on the `TimerGridRenderer`, the `TimesheetTimerListRenderer` and the `TimesheetTimerKanbanRenderer` views, and is visible if the user has the `group_timesheet_leaderboard_show_rates` group. Note that only the billing rate and total time indicators are visible if the user only has this group ; for the leaderboard to be visible, the user has to have the `group_use_timesheet_leaderboard` group.
- Added a `Many2OneAvatarRankField` component. This component displays the rank of the employee, and its profile picture.
- Added a `TimesheetLeaderboardDialog` view. This Dialog can be opened by clicking the leaderboard.
- Added `hr.timesheet.tip` model to store tips, and a `_get_random_tip` method to fetch a random tip from the table.
- Added field `billing_rate_target` on res.company model. This field can be edited through the settings, and is constrained to stay between 0 and 100 included.
- Added field `billable_time_target` on hr.employee model. This field can be edited through the employee's HR Settings, and is constrained to stay positive.
- Changed the `TimesheetTimerHeader` component to separate it from the div containing it, so that the leaderboard can be placed onto it without depending from this component.
- Patched the `TimerTimesheetGridDataPoint`, the `TimerTimesheetGridModel` and the `TimesheetTimerRendererHook` classes so that they can contain all the leaderboard data.
sale_timesheet_enterprise_holidays
---------
New module, its purpose is to create a bridge between the sale_timesheet_enterprise and project_timesheet_holidays modules to edit the SQL request in res.company so that it excludes timeoff entries.
task-3436872Knowledge articles now support comment threads tied to specific parts of an article, making it easier for teams to discuss, resolve, and revisit feedback in context. Resolved discussions can be hidden from the editor and are automatically cleaned up after a month to keep the system tidy.
Original PR description
This commit adds a brand new system to Knowledge, which is the ability to add comments to a specific article. In order to do that, we are using the `mail.thread` mixin with a brand new model…
This commit adds a brand new system to Knowledge, which is the ability to add comments to a specific article. In order to do that, we are using the `mail.thread` mixin with a brand new model `knowledge.article.thread` which is used to keep every comment as its own thread. This model keeps track of its state, it can be resolved and unresolved. A resolved thread is a thread that is not directly visible in the editor and is considered as closed: no message should be sent on this thread. If a thread has been resolved for longer than 1 month, it is removed from the DB in order to not clog it with stale threads. In order for user the user to create and handle threads we created 3 Component: * `KnowledgeCommentsThread` * `KnowledgeCommentsHandler` * `KnowledgeArticleCommentsPanel` `KnowledgeCommentsThread` represents a singular comment thread inside the article and is used by both the Panel and the Handler. Each Comment uses a Thread and a Composer that interacts using a thread object. You can send new comments, react to messages, reply to a specific one or edit one of your own. When using a smaller UI the box is replaced by the face of the last person who commented in the thread. When clicking on it you open a popover that contains the same elements as the box. `KnowledgeCommentsHandler` is the link between the editor , the panel, the DB and the comment system. It handles the creation and destruction of comments, the changing of state for each comment. It only displays unresolved threads but keeps track of all the comments. `KnowledgeArticleCommentsPanel` is a panel similar to the ChatterPanel or the PropertiesPanel that displays the comments following 3 modes: all, unresolved and resolved. You can interact inside the panel like you would with the handler, you can answer comments, resolve them, etc. but you can also see unresolved comments and reopen them to relaunch a discussion on a specific part of the article. COM PR: odoo/odoo#127380 task-3317056
Businesses can now require customers to pay a booking fee before an appointment is confirmed. Unpaid bookings stay pending and only become calendar events after payment, reducing no-shows and preventing unpaid appointments from blocking availability.
Original PR description
This commit adds modules to allow configuration of an up-front payment for appointments as well as the payment flow on the front-end. When eCommerce is not installed, it uses account_payment tools to…
This commit adds modules to allow configuration of an up-front payment for
appointments as well as the payment flow on the front-end. When eCommerce
is not installed, it uses account_payment tools to manage payment. Otherwise,
it is fully managed by classical eCommerce Flow.
*** APPOINTMENT_ACCOUNT_PAYMENT ***
You can now configure a product on appointment_types, of type 'booking_fees'.
This will be the product to buy when booking the appointment. This is a
single 'booking fee' (not per capita atm).
The calendar event linked to the booking should NOT be created until it is paid.
We want to avoid synchronizing calendar events that are not really settled in
terms of payment. Therefore, two new models are created to carry all necessary
booking data. We try to avoid new fields on the calendar.event and to keep new
stored fields introduced in the feature on those new models.
- CALENDAR.BOOKING: counterpart to calendar event, carrying all information linked
to an appointment booking process.
- CALENDAR.BOOKING.LINE: counterpart to appointment.booking.line, this is used
only to store resource booking information (for instance, booking 3 tables adding
up to a certain capacity...)
(Those are technical models and should not be manually updated in most cases)
Availabilities will NOT be modified according to these models, as their existence
should be equivalent to a 'pending' booking, as long as no calendar_event_id is
linked to them. A not paid booking does not reserve any space.
FLOW:
1) On Appointment Form Submission: we create a calendar.booking and link it
to the booking. An invoice should only be linked to one booking, in this flow.
2) On invoice payment => create calendar.event from booking values
When do we trigger a 'paid' invoice? On _invoice_paid_hook: this hook is called
on both backend account.payment registration and successful transaction as well
from the payment flow.
And what about collisions?
If we cannot create an event because the user / resource are not available or
configured correctly anymore, we do not create the event, and log a link to
the form view of failed bookings on the invoice. Manual action will be needed.
A check method _filter_unavailable_bookings is callable on a recordset of
bookings and will try to fit the most bookings according to user / resource
availability. It returns the other ones. This method should be used whenever
an availability check is necessary on bookings. (*)
How does the front-end payment flow work?
We override payment_pay rendering values to add custom routes and design. We add
a simplified custom payment screen as well. We specify custom cancel and landing
routes. The rest is handled by account_payment and payment tools to pay an
invoice with an access_token, using invoice routes.
On cancelling, the user will have to take another appointment and create another
booking (on a new invoice) The invoice posting is handled by providers and
transaction flow (see existing account_payment controllers)
The landing route is still the page of calendar.event when successfully paid, and
a similar page for the booking otherwise. A new template is added to do so.
When are bookings removed?
They are collected and removed by the garbage collector, if its stop datetime
was at least 2 months ago, or if created 6 at least months ago. Payments should
be done in that time window.
*** WEBSITE_APPOINTMENT_ACCOUNT_PAYMENT ***
Just a small bridge module to publish data, and payment chevron and update ui
to fit what exists already in website_appointment
*** WEBSITE_APPOINTMENT_SALE ***
When eCommerce is installed, its flow takes over completely. Now, when creating
the booking, we link it to a sale order line. This means someone can book
different slots or appointments in the same cart. We use the request session
if available as we want the description tz and dts to match the one picked
by the user, if any. The lang is the order partner's as per usual sale flow.
When do we trigger a 'paid' SO? We consider that we can do so as soon as
the Sale order is confirmed. This is a bottleneck that is sufficient for
both the case of successful front-end transaction and backend actions.
FLOW:
1) On appointment form submission, adds a line to cart linked to new booking.
2) On SO confirm: create calendar.event from booking values
And what about collisions?
When trying to pay the cart, a check is done to make sure booked slots are
still available (*). Quantity is always set to 1 as fee is unique per booking.
We also log links to failed bookings on SO.
Confirmation Page
We add a card on SO confirmation page for events and bookings, with appropriate
status, date and apt intro msg, as well as a link to the calendar.event/booking
page depending on whether the SO was confirmed through the transaction and
calendar event was successfully created. For instance if SO had two lines (-> two
bookings), one failed due to collision, one succeeded, then we have one card of
a calendar event, and one of calendar booking (mostly the same)
OTHER CHANGES
- phone is now used in place of mobile in appointment booking flow.
- controllers of appointment (submission...) are restructured for easy overrides.
- constraint added to have either calendar event or booking on answer inputs.
Task-3079302
UPG PR: odoo/upgrade#5289Enhancements to existing features
Resolved issues and error corrections
Fixed an issue where reports did not automatically hide zero-value lines when that setting was meant to be enabled by default. This ensures users see cleaner financial reports immediately, without needing to manually reapply the filter.
Original PR description
In pull request https://github.com/odoo/enterprise/pull/45291, we introduced a new feature that allows you to apply a filter on a report, enabling the ability to hide lines with zero values based on certain conditions. With this enhancement, you can now configure the filter to have one of three settings: "enabled by default," "optional," or "never." Prior to this commit, the "enabled by default" setting was not functioning as expected. This issue came from an initial check within the first if statement that evaluated previous options. The problem was that when you initially entered the report, the previous options dict were empty, and so the options is put to false which was not the intended behavior. task: 3568441
Code cleanup and technical improvements
Updated several Odoo screens to use simpler title styling for kanban cards. This reduces unnecessary styling rules behind the scenes, helping keep the interface code lighter without changing business workflows.
Miscellaneous changes
Depending of the type document, the logic that handles the background OCR status check was different, but it shouldn't have been the case. The logic that is implemented for invoices should be used for expenses and resumes as well. See commit fcb7fdf for the reasons behind the cursor commit. Forward-Port-Of: odoo/enterprise#49420
Original PR description
Depending of the type document, the logic that handles the background OCR status check was different, but it shouldn't have been the case. The logic that is implemented for invoices should be used for expenses and resumes as well. See commit fcb7fdf for the reasons behind the cursor commit. Forward-Port-Of: odoo/enterprise#49420
This update standardizes how formatted text is handled inside translated messages across several Enterprise apps. It helps keep translated content displayed correctly and safely while reducing inconsistencies for users in different languages.
Original PR description
The _() method now supports having a Markup as parameter and automatically escape the translation Enterprise part of odoo/odoo#139316
Sendcloud shipping carriers are now configured around Sendcloud products, which group available delivery methods, instead of being tied to one method. This gives businesses more flexible shipping options while still selecting the right method when parcels are shipped or customers choose pickup delivery online.
Original PR description
A Sendcloud delivery carrier now relies on a Sendcloud's product (that is a set of Sendcloud's methods) rather than on a single Sendcloud's method. As the parcel's shipping however still rely on a defined method, some models were enhanced/redefined as some functions and checks were added to handle the method selection. Task #3109757 Upgrade : https://github.com/odoo/upgrade/pull/5034
Companies can now enable a setting to copy lot names from a cross-company delivery to the matching receipt in the other company. This helps keep product traceability aligned between related companies and reduces manual re-entry during intercompany transfers.
Original PR description
Adds a setting that allows a company to try to sync its lot names when validating a cross-company delivery on its corresponding receipt in another company. task-3339667
Adds a place to store detailed information about the latest bank connection status. This prepares a follow-up improvement that will show users clearer error messages and help support teams receive the right context when assistance is needed.
Original PR description
The aim of this commit is adding a simple JSON field on account online link model to handle a future flow where we save the last connection state details (if the connection is in error for example) to know what we have to do for the user. We need to implement this flow because the commit (ed7d7486f30e076e6040a2d528a2c4926225bfa9) that adds the new asynchronous flow (by using cron) doesn't handle all the error messages. It means that the user won't see that he/she receives an error and it won't trigger the redirect warning error that allows the user to open a support ticket directly (with useful info for support team). The feature is divided in 2 commits, one to add the freeze dependent things (the new field) and another one to add all the logic. task-3568712
The spreadsheet editing experience has been adjusted to make better use of available screen space. Users should have more room to work with spreadsheets and dashboards, making editing more comfortable and efficient.
Original PR description
This revision adapts the spreadsheet edition actions to optimize the screen space. Task: 3329419
Resource appointments no longer automatically use a default work schedule, reducing confusion about why certain time slots appear unavailable. The appointment setup screens also provide clearer guidance for default opening hours and hide irrelevant work-hours settings for resource-based appointments.
Original PR description
People often misunderstand why certain time slots are unavailable. The reason behind this is we currently always apply the default work schedule. **Secifications**: -> Stop giving resources a default work schedule. -> Add the placeholder and helper for the "Default Opening Hours". -> Hide the "work_hours_activated" field when the appointment is of type resource. **Task**-3535680
Spreadsheet users can now apply global date filters using a clear “From / To” option. This makes it easier to analyze reports and dashboards for a custom date range without needing technical domain setup.
Original PR description
Adds in date type global filters a new category "From / To" allowing to define a domain between two dates. Task: [3516362](https://www.odoo.com/web#id=3516362&menu_id=4720&cids=1&action=333&active_id=2328&model=project.task&view_type=form)
Shipping labels and related documents now use clearer, consistent names, making them easier to identify and manage. Printer settings are being moved to report-level configuration, and manufacturing/barcode workflows gain better auto-print support for serial and lot labels.
Original PR description
Enterprise changes for auto-printing/report cleanups: - change existing shipping connectors to use consistent doc filename prefixes - cleanup the inheritance logic (i.e. for "Barcode App" tab) so…
Enterprise changes for auto-printing/report cleanups: - change existing shipping connectors to use consistent doc filename prefixes - cleanup the inheritance logic (i.e. for "Barcode App" tab) so that the "Hardware" tab can be cleanly added into operational types - Add support for Enterprise Shop Floor + MRP barcode auto-printing of generated SN/Lot - create shell report actions for the shipping connector provided documents so their printer can be specified via the report rather than the custom field that previously existed Note that separate IoT PR (see: https://github.com/odoo/enterprise/pull/44398) will allow users to select a specific printer when more than 1 printer is assigned to a report when it is merged. This PR removes the ability to assign printers for each operation type's "Shipping Labels Printer" field, therefore in order to save this printer assignment data during the upgrade script, this PR also adds in the ability to assign multiple printers to a report even though we will always default to the first printer. Of course a follow up PR will be needed to ensure the upcoming multi-printer assignment works with the multi-print feature this PR is adding in. Task: 3046178 COM PR: odoo/odoo#126791 Upgrade PR: odoo/upgrade#5298
Timesheet grids now use more consistent colors to show missing time, exact time, and overtime. This makes it easier for users and managers to quickly spot underreported hours, overtime days, and overall period totals.
Original PR description
before this commit, color codes used for represent overtime, exact time and missing hour are not consistent with everywhere else. make changes in color code to get better understanding of worked time. highlight negative overtime in red, highlight day total in orange if there is overtime, highlight the total time for the period in red, green and orange according to overtime. task-3251683
Work schedule entries can now store their day-based duration explicitly, rather than relying on hours-to-days conversion. This helps payroll and attendance calculations better reflect local practices where morning and afternoon periods may have different hour lengths but still count equally as half days.
Original PR description
Before this commit, conversion between worked hours and days in resource_calendar_attendance was calculated but in reality there is no unambigous way to do this. Eg in Belgium the morning working period is 4 hours, the one in the afternoon is 3 hours 36 minutes, while both of them are still counted as half days. To mediate this, the duration in days is explicitely added to resource.calendar.attendance, with sensible default being provided (half a day for morning and afternoon periods, 0 for lunch). task-3131517
The signing app has been updated to work with the latest SMS service interface. This keeps SMS-based signing communications compatible and updates related automated marketing and mail tests to match the new behavior.
Original PR description
\* = marketing_automation_enterprise, test_mail_enterprise See COM PR (odoo/odoo#133392) Task-2560666
The Luxembourg annual VAT declaration now uses Odoo's standard reporting engine instead of a separate custom report. This reduces maintenance complexity while keeping the annual declaration fields available in the main Luxembourg reporting module.
Original PR description
Currently, the LU annual VAT declaration is a large custom model, because it was not possible to add manual values in the regular reports, default values, and sections. Now it is finally possible to get rid of that custom report and use the account report engine to create the Annual VAT declaration. `l10n_lu.yearly.tax.report.manual` model and its views can be deleted. The l10n_lu_reports_annual_vat_2023 module can be deleted as well, as the new fields have been added in the new report. task-3074547
This update modernizes the underlying editor and dialog components so they can be shared across more parts of Odoo, including Website and Studio. Business users should see little direct change, but it supports a more consistent editing experience and reduces duplicated legacy code.
Original PR description
This PR is the counterpart of odoo/odoo#139154 which converts the AceEditor widget to owl. Doing so required to move the ResizablePanel from web_studio to web, s.t. it can be used in website to wrap the newly introduced ResourceEditor.
The Send & Print wizard has been reworked to avoid concurrency problems during asynchronous invoice processing. Relevant send-and-print choices are now saved with the invoice itself, improving reliability for inter-company flows and Mexican electronic invoicing.
Original PR description
…d & Print wizard (part 1) Currently the Send & Print wizard is stored as regular model and not a TransientModel. This cause multiple problems including concurrency ones. This PR switches the wizard back to a regular transient one. We instead store the values of the wizard that needs to be processed asynchronously in the related move. task-id: 3415101
This will greatly help the support to know why something did or didn't happen, as Amazon sometimes send strange information in the payload, which are not documented. task-3077540 Forward-Port-Of: odoo/enterprise#49395
Original PR description
This will greatly help the support to know why something did or didn't happen, as Amazon sometimes send strange information in the payload, which are not documented. task-3077540 Forward-Port-Of: odoo/enterprise#49395
The tour could fail at this step if the click on the line happened before the sort. You can reproduce it by adding a time.sleep(2) in the python function sort_lines. We just define the line that should be clicked so we're sure the sort has happened. Linked to runbot error 27633, 27819 Forward-Port-Of: odoo/enterprise#49388 Forward-Port-Of: odoo/enterprise#49325
Original PR description
The tour could fail at this step if the click on the line happened before the sort. You can reproduce it by adding a time.sleep(2) in the python function sort_lines. We just define the line that should be clicked so we're sure the sort has happened. Linked to runbot error 27633, 27819 Forward-Port-Of: odoo/enterprise#49388 Forward-Port-Of: odoo/enterprise#49325
This commit's purpose is to fix the display of progress bar in the gantt view. before this commit: When the planning view is grouped by project, the progress bar is not correctly displayed for some project after this commit: The progress bar is now correctly displayed step to reproduce: - go to the project setting - enable the planning option - open the planning app - click on the 'schedule by project' menu The progress bar of project with allocated hours but without any slot on t
Original PR description
This commit's purpose is to fix the display of progress bar in the gantt view. before this commit: When the planning view is grouped by project, the progress bar is not correctly displayed for some…
This commit's purpose is to fix the display of progress bar in the gantt view. before this commit: When the planning view is grouped by project, the progress bar is not correctly displayed for some project after this commit: The progress bar is now correctly displayed step to reproduce: - go to the project setting - enable the planning option - open the planning app - click on the 'schedule by project' menu The progress bar of project with allocated hours but without any slot on the date range of the view is not displayed. solution: update the data send to the js rpc call of the gantt_progress_bar method. detail of the implementation: The dict send to the javascript side is created in the method gantt_progress__bar_project_id of the 'planning.slot' moduel. It used to only use the result of the read_group of the 'planning.slot' to create the return values. It was updated to also take into account the project that were not in the read_group result. task - 3485773 Forward-Port-Of: odoo/enterprise#49183 Forward-Port-Of: odoo/enterprise#46638
When we used to create appointments resources, we called them "table name - floor name", the problem was that table names were often a number. Some applications rely on resources (e.g. Appointments, Scheduling) and because we start with a number, the list of resources looks messy. Now we've changed the name format of the resources created like this: "floor name - table name". Forward-Port-Of: odoo/enterprise#49328
Original PR description
When we used to create appointments resources, we called them "table name - floor name", the problem was that table names were often a number. Some applications rely on resources (e.g. Appointments, Scheduling) and because we start with a number, the list of resources looks messy. Now we've changed the name format of the resources created like this: "floor name - table name". Forward-Port-Of: odoo/enterprise#49328
Before this commit, the clickbot avoid testing modal menus. Now, the clickbot open and closed the modal menus. task-id 3535596 Forward-Port-Of: odoo/enterprise#49316 Forward-Port-Of: odoo/enterprise#49283
Original PR description
Before this commit, the clickbot avoid testing modal menus. Now, the clickbot open and closed the modal menus. task-id 3535596 Forward-Port-Of: odoo/enterprise#49316 Forward-Port-Of: odoo/enterprise#49283
When the user analyzes the "Timesheet and Planning Analysis" pivot report from the project module and adds it to the "Timesheet vs Planning" filter from the Favourites at the time traceback was generated. Steps to reproduce: - Install the "project_timesheet_forecast" module. - Project > Reporting > Timesheet and Planning Analysis - Click on the pivot icon and add it to the "Timesheet vs Planning" filter from the Favourites. - After that, a traceback will be generated. - Error: ValueError
Original PR description
When the user analyzes the "Timesheet and Planning Analysis" pivot report from the project module and adds it to the "Timesheet vs Planning" filter from the Favourites at the time traceback was…
When the user analyzes the "Timesheet and Planning Analysis" pivot report from the project module and adds it to the "Timesheet vs Planning" filter from the Favourites at the time traceback was generated.
Steps to reproduce:
- Install the "project_timesheet_forecast" module.
- Project > Reporting > Timesheet and Planning Analysis
- Click on the pivot icon and add it to the "Timesheet vs Planning" filter from the Favourites.
- After that, a traceback will be generated.
- Error: ValueError: Invalid field 'date' on model 'project.timesheet.forecast.report.analysis'
As per the base code, the "date" invalid field existed in the user-defined filter context, so when the user tried
to analyze the "Timesheet and Planning Analysis" pivot report and add to the "Timesheet vs Planning" filter from
the Favourites at the time, a traceback was generated. The "date" field does not exist in the "project.timesheet.forecast.report.analysis" object, so instead of the "date" field in this filter, We used the "entry_date" field.
Code reference:
https://github.com/odoo/enterprise/blob/91426a8c4cfd26a5b8eadeafaf4687e47b7366e3/project_timesheet_forecast/report/timesheet_forecast_report.py#L16
Sentry Traceback:
```ValueError: Invalid field 'date' on model 'project.timesheet.forecast.report.analysis'
File "odoo/http.py", line 2134, in __call__
response = request._serve_db()
File "odoo/http.py", line 1710, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1737, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1938, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 233, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 191, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 717, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 30, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 457, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "odoo/api.py", line 430, in _call_kw_model
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.4/project_timesheet_forecast/report/timesheet_forecast_report.py", line 144, in read_group
return super().read_group(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
File "odoo/models.py", line 2513, in read_group
raise ValueError(f"Invalid field {field_name!r} on model {self._name!r}")
```
sentry-4410474697
Forward-Port-Of: odoo/enterprise#46203
Forward-Port-Of: odoo/enterprise#46088This fix is necessary for this PR: https://github.com/odoo/odoo/pull/135865 Because the "test_multiple_fsm_task" fails at this line: https://github.com/odoo/enterprise/blob/16.0/industry_fsm_stock/tests/test_fsm_stock.py#L739-L740 When the "action_fsm_validate" function is called, the "qty_delivered" is computed: https://github.com/odoo/enterprise/blob/0025b1295319f69feb70d5cb5ec80acf92d76ec9/industry_fsm_sale/models/project_task.py#L236 https://github.com/odoo/enterprise/blob/21ba5
Original PR description
This fix is necessary for this PR: https://github.com/odoo/odoo/pull/135865 Because the "test_multiple_fsm_task" fails at this line:…
This fix is necessary for this PR: https://github.com/odoo/odoo/pull/135865 Because the "test_multiple_fsm_task" fails at this line: https://github.com/odoo/enterprise/blob/16.0/industry_fsm_stock/tests/test_fsm_stock.py#L739-L740 When the "action_fsm_validate" function is called, the "qty_delivered" is computed: https://github.com/odoo/enterprise/blob/0025b1295319f69feb70d5cb5ec80acf92d76ec9/industry_fsm_sale/models/project_task.py#L236 https://github.com/odoo/enterprise/blob/21ba5cca5107f2ac16e956d669338ecb44622d00/industry_fsm_stock/models/project_task.py#L32 https://github.com/odoo/enterprise/blob/21ba5cca5107f2ac16e956d669338ecb44622d00/industry_fsm_stock/models/project_task.py#L41 However, in the "_compute_qty_delivered" function, since the moves are in the "confirmed" status, the "qty_delivered" is set to 0: https://github.com/odoo/odoo/blob/8a3284685856b6980e3b620abdbbb3e2c79f57c4/addons/sale_stock/models/sale_order.py#L215 But then, this quantity is modified with "so_line.product_uom_qty": https://github.com/odoo/enterprise/blob/21ba5cca5107f2ac16e956d669338ecb44622d00/industry_fsm_stock/models/project_task.py#L65-L66 However, since move lines are created afterward: https://github.com/odoo/enterprise/blob/21ba5cca5107f2ac16e956d669338ecb44622d00/industry_fsm_stock/models/project_task.py#L67 The "qty_delivered" field must be recomputed because it now depends on "qty_done." But since the moves remain in the "confirmed" status, the "qty_delivered" is set to 0, whereas it should remain at 2 **Solution:** Set the "qty_delivered" with "so_line.product_uom_qty" after the creation of move lines. This way, the "compute_qty_delivered" will not be triggered. OPW-3504138 Forward-Port-Of: odoo/enterprise#48500 Forward-Port-Of: odoo/enterprise#48246
Steps to reproduce: - Install Accounting, Sales, Contacts & AvaTax - Setup AvaTax in Accounting settings - Activate CAD currency - Create a CAD pricelist - Create a fiscal position: * Use AvaTax API: checked * Detect Automatically: checked * Country: Canada - Create a Canadian contact: (e.g. Contact X) * Street: 2 Rue des Jardins * City: Quebec * State: Quebec (CA) * ZIP: G1R459 * Country: Canada - Create a product with "[FR] Shipping only common carrier - fob dest
Original PR description
Steps to reproduce: - Install Accounting, Sales, Contacts & AvaTax - Setup AvaTax in Accounting settings - Activate CAD currency - Create a CAD pricelist - Create a fiscal position: * Use AvaTax API:…
Steps to reproduce:
- Install Accounting, Sales, Contacts & AvaTax
- Setup AvaTax in Accounting settings
- Activate CAD currency
- Create a CAD pricelist
- Create a fiscal position:
* Use AvaTax API: checked
* Detect Automatically: checked
* Country: Canada
- Create a Canadian contact: (e.g. Contact X)
* Street: 2 Rue des Jardins
* City: Quebec
* State: Quebec (CA)
* ZIP: G1R459
* Country: Canada
- Create a product with "[FR] Shipping only common carrier - fob destination (backward compatibility)" as Avatax Category. (e.g. Product X)
- Create a SO:
* Customer: Contact X
* Pricelist: CAD pricelist
* Order Lines:
- product: Product X
- Unit Price 100.00
- Save SO
- Click on "COMPUTE TAXES USING AVATAX"
- => 2 taxes are added ("CANADA GST/TPS [CA] (5.0000%)" and "QUEBEC QST/TVQ [QC] (9.9750%)"). The 2nd one is exempted. So the total taxes are 5.00.
- Confirm SO
- Deliver the product if needed
- Create an invoice from SO (Regular invoice)
- Click on "COMPUTE TAXES USING AVATAX"
1st issue:
The total taxes are 14.98, which are different from the taxes computed in SO (i.e. 5.00).
The exempted tax is not exempted in the total taxes of the invoice.
2nd issue:
When checking the tax lines in "Journal Items" tab, we can see that the amounts of the debit/credit columns are not consistent.
For "CANADA GST/TPS [CA] (5.0000%)" tax, the credit has the same value than the absolute value of "Amount in Currency", when the currency rate should be applied.
For "QUEBEC QST/TVQ [QC] (9.9750 %)" tax (that should be exempted), debit and credit are 0, but "Amount in Currency" is not.
Cause:
When checking if the tax should be manually fixed, we are comparing tax line balance with the amount provided by AvaTax.
However, these 2 amounts are not always in the same currency. Also, when fixing the tax amount manually, amount_currency field is not updated and debit/credit fields are updated with the values coming from AvaTax without conversion to the company currency.
opw-3439742
Forward-Port-Of: odoo/enterprise#49292
Forward-Port-Of: odoo/enterprise#48221## Task Description `o-spreadsheet` now allows to insert images in a spreadsheet, and we also allow to export them inside .xlsx file. However, while this works as intended in a standalone o-spreadsheet server, it doens't work correctly in Odoo as the data of the image are not found while we try ton convert the spreadsheet to an xlsx file. This PR aims to simplify the request made to get the binary data of the image file. ## Related Task/PR(s): - https://github.com/odoo/odoo/pull/136774 -
Original PR description
## Task Description `o-spreadsheet` now allows to insert images in a spreadsheet, and we also allow to export them inside .xlsx file. However, while this works as intended in a standalone o-spreadsheet server, it doens't work correctly in Odoo as the data of the image are not found while we try ton convert the spreadsheet to an xlsx file. This PR aims to simplify the request made to get the binary data of the image file. ## Related Task/PR(s): - https://github.com/odoo/odoo/pull/136774 - Task-3524473 Forward-Port-Of: odoo/enterprise#49066 Forward-Port-Of: odoo/enterprise#47928
Steps: - Install sign - Install `FreeSerif` font (with `apt-get install fonts-freefont-ttf` for example) - Use custom font with system parameter key: `sign.use_custom_font` and value: `FreeSerif` - Upload a new pdf in sign module - Add a new item type Selection - Add two options in the previous item one with special chars for example `ąčęėįšųūž` - Click `Sign now` - Select a random option in the previously created selection item - Sign In the navigator pdf viewer special chars
Original PR description
Steps: - Install sign - Install `FreeSerif` font (with `apt-get install fonts-freefont-ttf` for example) - Use custom font with system parameter key: `sign.use_custom_font` and value: `FreeSerif` -…
Steps:
- Install sign
- Install `FreeSerif` font (with `apt-get install fonts-freefont-ttf` for example)
- Use custom font with system parameter key: `sign.use_custom_font` and value: `FreeSerif`
- Upload a new pdf in sign module
- Add a new item type Selection
- Add two options in the previous item one with special chars for example `ąčęėįšųūž`
- Click `Sign now`
- Select a random option in the previously created selection item
- Sign In the navigator pdf viewer special chars string is correctly rendered This is not the case in the downloaded document
Cause:
Selection item is rendered using a `Paragraph` (from `reportlab` lib). The problem is this `Paragraph` uses a different stylesheet given by `getSampleStyleSheet()["Normal"]` defined in the `reportlab` lib here
```py
stylesheet.add(ParagraphStyle(name='Normal',
fontName=_baseFontName,
fontSize=10,
leading=12)
)
```
https://github.com/eduardocereto/reportlab/blob/master/src/reportlab/lib/styles.py#L251-L255
but it doesnt use the right font, this commit use a custom `ParagraphStyle` with the right font and size
Forward-Port-Of: odoo/enterprise#49106
Forward-Port-Of: odoo/enterprise#48422A view editor's panel will present the fields that are not yet in the arch for a user to add them in the view via DragAndDrop. It filters out the field in the arch from the fields of the model Before this commit, the fields in the arch were not correctly computed, and may generate inconsistencies. After this commit, this works correctly. Forward-Port-Of: odoo/enterprise#49309
Original PR description
A view editor's panel will present the fields that are not yet in the arch for a user to add them in the view via DragAndDrop. It filters out the field in the arch from the fields of the model Before this commit, the fields in the arch were not correctly computed, and may generate inconsistencies. After this commit, this works correctly. Forward-Port-Of: odoo/enterprise#49309
In the Contract reporting view, we have access to integers fields: - # Departure Employee - # New Employees but this information is just giving us for the employee of a given period that are new or departed, but we have no easy way to know which employee this concerns. If someone wanted to see which employee are new for a given month, there is no easy way from this view => the information is available in the SQL view, but not made available in the model fields. This commit proposes
Original PR description
In the Contract reporting view, we have access to integers fields: - # Departure Employee - # New Employees but this information is just giving us for the employee of a given period that are new or departed, but we have no easy way to know which employee this concerns. If someone wanted to see which employee are new for a given month, there is no easy way from this view => the information is available in the SQL view, but not made available in the model fields. This commit proposes to make the field available, so the information is more easily accessible (eg. you could group by "Date First Contract Started" to get the contract start of the employees). opw-3444718 Forward-Port-Of: odoo/enterprise#46480