Purpose: new menu organization
* Dashboard (only for officer and manager like currently)
* New Request (= leave requetss in calendar view)
* My Leaves
* Leaves Summary
* Leaves Requests (in list view)
* Allocation Requests
* Managers (current menu is ok)
* Reporting (current menu is ok)
* Configuration (ok)
This commit is linked to task ID 1871812 and PR #26180.
Purpose: better display duration. Label for hours / days is not very user
friendly when displayed left compared to the value. In this commit we
move the unit display right of the value and correctly display choices
related to the leave request date options.
Part of the spec: https://drive.google.com/file/d/1XQtw5ZiAebycXbeHmfbDYYwrFTRmkBNU/view
This commit is linked to task ID 1871812 and PR #26180.
Due to the side effect on related fields that are not readonly, the value is saved
in project although not changed. Putting it readonly avoids the problem.
Fixes#26156Closes#26171
* product_product, product_template :
- Add `uom_name` field to display stat buttons with UoM's name.
* delivery:
- Move field 'HS Code' from `General Information` to `Accounting`.
* hr_expense:
- Make checkbox `Can be Expensed` visible for all products.
* mrp:
- Stat button update, we now count the uom quantity of product we have in our MOs
limited to the last 365 days. Before that we were counting all the MOs.
To achive this,
- Add a stored compute field `product_uom_qty` on `mrp.production`.
- Stat button now uses `action_view_mos`
- The field was called `mo_count`, renaming it to `mrp_product_qty` as its
function changed.
* point_of_sale:
- Add a new tab (`Point of Sale`) and moved the `Point of Sale` section
previously located in `Sales` to this newly created tab.
* product_email_template:
- Renamed header 'Email' to 'Automatic Email at Invoice'.
* purchase:
- Improved tooltip of field 'property_account_creditor_price_difference'.
- Set `product_uom` to `uom.product_uom_hour` instead of
`uom.product_uom_unit` in demo data.
- Add a stored compute field `product_uom_qty` on `purchase.order.line`.
* report_intrastat:
- Move field `Intrastat` from `General Information` to `Accounting`.
- For product template's form view, inherit from
`product.product_template_form_view` instead of 'stock.view_template_property_form'.
* sale:
- Move `expense_policy` from `Purchase` to `Sales`.
* stock:
- Add a new section in `Inventory` called `Logistics`, and put fields
- `Weight`, `Volume` and `Responsible` in it.
- `incoming_qty` is now only visible in debug mode.
* website_sale:
- Add a new tab 'eCommerce' and move 'eCommerce' section from 'Sales' tab to this newly created tab.
- Rename 'eCommerce Categories' to 'Categories'.
Task: #51125Closes: #23868
In purchase we add a stat button that counts the number of purchase
orders linked to the product.
In this commit we change this count to count the quantity of products
linked to a purchase order.
We basically do the same thing with the stat button of sale (sale
orders) and mrp (manufacturing orders).
This is not expected since it leads to an inconsistent result: the user
and the access rights do not match. Better add a PIN to the manager.
This reverts commit bb8bb3cbfe.
- Create an order from the eCommerce
- Choose to pay with Stripe
- Enter the credit card info, validate
There is a short window of time (before the reload of the page) where
the user can click on 'Pay Now' again.
This is because the HTML is completely replaced, including the button.
We restore it when necessary.
opw-1866332
Introduced at e434690fe3
The button should be displayed when the order is paid to generate the invoice
Once the invoice is generated, the state is invoiced and a statbutton lead to
the generated invoice.
Remove the readonly attrs as it has no effect on a button
Before this commit, the only way to deal with the same tax either with price included or not was to duplicate it, one with the price included checked.
This commit add a new boolean on the reconciliation widget propositions to decide if the tax must be used like a price included tax or not.
PR: 17040
task: 32717
Create an account_move, with at least one move line having an analytic account on it
AND no label
Save and Post
Before this commit, the post failed because an analytic.line should have a label (required)
After this commit, we fill in a default name for the analytic line, composed of the data of the line,
if available, or '/'
OPW 1863418
closes#26013
Before the fix price control only worked like should on initialisation of a pos section. On switching cashier during a setting manager would lose price change rights and normal users would gain them.
Same reason as 8d948d92.
In firefox if barcode is installed, for example on a form view the keys
to navigate the possible scrolling PageUp/PageDown/Home/End don't work
at all.
This is caused by the interface barcode catching and differences of the
key event handling between firefox and other browser.
So in this change, we add these keys so they are not catched by barcode.
note: aso backport 5bc29744c so the code is the same between 10 and 11.
related to opw-706352
closes#26219
The to_refund attribute is set to copy=False.
However when splitting a move to create a backorder, a new move is created as
a copy with the remaining work to do.
This attribute is needed so that the backorder refund is consistently applied.
Essentially a backport of commit:
https://github.com/odoo/odoo/commit/c5ffca151160f9d99bec036330def108e4e91e0b
opw 1865324
Steps to reproduce the bug:
- connect as the demo user
- go to the Leaves app
- check the Leaves Summary menu: by default, it is empty
- go to Allocation Request
- create one Allocation Request for 1.00 day using the Compensatory Days type
- repeat the operation several time
Bug:
Only the first Allocation Request appears in the Leaves Summary
opw:1872365
- Set the currency to a rounding of 0.001
- Create a POS order:
Unit Price: 0.12
Quantity: 0.1
- Pay and validate
- From the backend, return the products on the create order
- Click on 'Payment'
The proposed amount is 0.01, not 0.012. It is not possible to complete
the payment process since the field is rounded at DB level to 2 digits
of precision.
We make consistent the `amount` field with the various amounts on the
`pos.order`. By using a `digits=0` and forcing the rounding, we avoid
inconsistent rounding between the order and the payment.
opw-1864344
It would probably be even better to iterate the file content and get
the non-quoted non-alphanumeric characters as separator
candidates (instead of a hard-coded list) however Python does not seem
to have a decoding iterator (taking bytes and yielding an iterator of
codepoints or even grapheme clusters) — incidentally uniseg seems to
require up-front decoding as well — so that's not really convenient as
we may be dealing with large-ish files and not want to load it
entirely in memory.
An alternative would be to use TextIOWrapper and iterate the file by
buffers of a few ks, and classify that based on either codepoints or
grapheme clusters.
This merge optimizes and lessens query count of notification process. When
posting a message some computation is done to fetch followers and/or people
and channels to notify, then notify them on their Inbox or by email. This
process now takes less queries thanks to several improvements :
* fetching followers / recipients data is now done manually in SQL allowing
to fetch data across several models in less queries;
* computing recipients is now separated from notifying them. Notification
better uses precomputed data in order to avoid fetching and browsing
several time the same data;
When possible code has been made more readable through code inlining. Several
methods have been removed because they are not used in inheritance. Some code
is now more low-level. Optimizing part of the process can make it harder to
inherit or modify.
Performance counters are updated showing gain in nearly all tested cases.
An enterprise branch is linked to this one that also improve notification
process.
This merge is linked to task ID 47934 and closes PR #24033. No functional
change should occur with this merge.
Purpose of this commit is to avoid browsing and prefetching data about
recipients when notifying a message to partners and channels. Mail message
_notify computes all necessary data in a single query. This commit allow
to re-use this data by propagating it through the call chain.
Addons inheriting from classification methods used when sending notification
emails are updated accordingly to the API and data update.
This commit is linked to task ID 47934 and PR #24033. No functional change
should occur with this commit.
This commit cleans code about sending email notification to recipients.
Purpose of this code is to prepare notification emails, group recipients
and finally send emails. In this commit we clean and optimize a bit by
* propagating some additional parameter to simplify code, like record
on which the notification process runs;
* inlining some code currently located in sub-methods. It eases code
understanding as there are less code jumps. As those methods are not
inherited inlining them can be done;
* simplifying a bit notification emails preparation and computation;
It allows to save a few query by avoiding to fetch and browse again some
data that were already computed.
This commit is linked to task ID 47934 and PR #24033. No functional change
should occur with this commit.
This commit is related to enterprise commit that updated mail_push. It is about
[REF] mail_push: optimize mail.message notification process override
It updates code of mail_push to lessen its impact on mail-related code. It
allows to change a few counters in test_mail. Indeed counters are impacted
by code located in enterprise because those are "maximum queries" counters.
As mail_push is an auto-install module enterprise runbot would be broken
if the counters weren't updated.
This commit is linked to task ID 47934 and PR #24033. No functional change
should occur with this commit.
In this commit we update _notify method of mail.message to fetch most data
related to notification process in a single query. Indeed posting a
message can be a costly process, especially when involving several partners,
channels, depending on their notification status, user groups, ... Most
of the required data can be fetched in a single hand-tuned query.
Purpose is to lessen query count. Side effect of this commit is that code
is less recordset based and therefore more low-level. It is also harder to
customize the behavior through inheritance as it implies rewriting a bit
more of code.
This query is located in a private method on follower model. It takes
parameters allowing to either fetch data related to followers of a given
subtype, either related to some partners and channels. First use case is
related to the process of posting a message with a subtype that triggers
notification of followers. Second use case is related to notifying some
specific partners or channels of a given message. It takes notably into
consideration internal subtypes and active field of partners, allowing to
correctly handle corner case for deactivated followers and portal / share
partners.
Notification process is divided into two steps. First one is to compute
recipient data. Second one is to apply the result of this computation and
call the various notification mechanisms accordingly. Doing so allows to
easily re-call notification process or compute some data differently
if necessary.
API of notification methods is updated to allow passing notably the values
used to create the newly-posted message. It allows in some simple case to
avoid browsing message and partners when no notification is necessary. It
saves some queries in simple case like posting messages with specific
subtypes not often followed or logging notes without mentioning people.
This commit allows to save a few queries on several performance tests as
indicated by updated performance counters. Future commits will gradually
propagate the use of this data to further lessen query count.
This commit is linked to task ID 47934 and PR #24033. No functional change
should occur with this commit.
Since date / datetime refactoring done at 960360afe4 we cannot
encode new leave requests or new allocation requests anymore. This commit
fixes that by correctly setting date / datetime on date / datetime field
and correctly computing one from the other.
The other overrides are working with multiple records but not event_sale.
The ensure_one() is not needed if you make a proper loop
Replaces and closes#26078
Various bits would lead to odd tracebacks or a complete lack of
actionable feedback.
Discover that a binary field set to b'' will return None when read back,
handle that, then handle reading an empty CSV file, then handle the
resulting iterator having no lines whatsoever when trying to match
headers.
At least for CSVs, we're now properly telling users that their file
seems to have no content when they literally upload an empty file.
Payments older than the chosen date won't be proposed in the widget allowing to match payments with bank statements. This is useful if the db used invoicing for years and then installed accounting : users don't want to have to match all the old payments that were generated by invoicing with bank statements.
Was task 1829536
Was PR https://github.com/odoo/odoo/pull/24728