open a pos,
change cashier
hit F5
Before this commit, the previous user was set as cashier, forgetting about the change we made
This was because of two things:
- The original fix to do just this use case was pushed in v9.0 as e14ab69772
- In v11.0 the commit f5f60599bf introduced full usage of Backbone's set and get
which meant that self.cashier was no longer relevant
- In v10.0 the commit 475027b988
(For v11.0: a9caef0ebb)
Was intended to update the res.users objects at their loading to ensure that their access rights were loaded too
But it did this using the wrong condition
After this commit, it reworks fine
OPW 1844006closes#24762
open a pos,
change cashier
hit F5
Before this commit, the previous user was set as cashier, forgetting about the change we made
This was because of two things:
- The original fix to do just this use case was pushed in v9.0 as e14ab69
- In v10.0 the commit 475027b
(For v11.0: a9caef0)
Was intended to update the res.users objects at their loading to ensure that their access rights were loaded too
But it did this using the wrong condition
After this commit, it reworks fine
OPW 1844006
related #24762closes#24764
When creating a db with only website_quote and payment_paypal you end
up with:
AttributeError: 'payment.transaction' object has no attribute '_check_or_create_sale_tx'
when clicking on 'Pay & Confirm' in an online quote.
This is because various controller methods in website_quote use this
method and it is defined by the sale_payment module.
opw-1847977
It sounds like a bad id to mix fa class with others class.
Some css rule change the style (eg: font family) for other class
and fa become ugly or just a square.
- When changing the project_id of an analytic line, the account_id is updated to the project's one, we need to update the company_id according the one set on project's analytic account.
We used to only log failed logins, and did not include the IP, which
makes it much less useful for intrusion detections systems (e.g. fail2ban)
For example, the following fail2ban filter definition should match a
failed login (in /etc/fail2ban/filter.d/odoo-login.local):
[Definition]
failregex = ^ \d+ INFO \S+ \S+ Login failed for db:\S+ login:\S+ from <HOST>
ignoreregex =
This could be used with a jail definition to block the IP on HTTP(S).
Here is what it could look like for blocking the IP for 15 minutes when
10 failed login attempts are detected from the same IP within 1 minute:
[odoo-login]
enabled = true
port = http,https
bantime = 900 ; 15 min ban
maxretry = 10 ; if 10 attempts
findtime = 60 ; within 1 min
logpath = /var/log/odoo.log ; set the actual odoo log path here
Before that, the following scenario failed due to FIFO handling of stock:
- make PO 1 for 10 x product A at 10€/piece, receive and invoice everything
- make PO 2 for 10 x product A at 20€/piece, receive and invoice everything
- refund and send back PO 2
=> With FIFO handling, it means the valuation corresponding to the return of product A consists of the first received products, hence 10x10=100€. The credit note, though, was made with the price of the invoice (200€) and did not (because of a too simple check) use the price difference account to post the missing amount (100€).
Test test_fifo_anglosaxon_return (purchase/tests/test_stockvaluation.py) failed because of that.
- When creating analytic account lines when posting account moves, the lines' company id were set to the current user's company.
If the analytic account has a company set, the lines must be set on the same company (due to a python constraint).
So when creating the lines, we now check if the analytic account has a company, if so, we use it to create the lines.
Suppose we have a delta between two datetimes:
delta = dt1 - dt0
If delta is negative but less than a day, ``delta.days`` returns -1 (which is
compensated by positive seconds). In order to avoid this surprising effect,
use ``delta.total_seconds()`` to compute the number of days.
Previously to this commit needaction used by JS was not taking into account
read notifications. It means notably Inbox counter could be higher than
expected as taking into account read messages while Inbox displays only
unread messages. This commit fixes that by checking notification state when
giving needaction_partner_ids to message_format result.
This fix has a small impact on performances as message_format is used in
notification process for chat or push. A better implementation of message
format and its postprocess could probably lessen this fix impact. As we
target stable version we avoid rewriting other part of the code. Optimization
will be done in development version.
Related to task ID 1841243. This is a manual forward port of commit 69714fbeee
done in saas-11.2.
Previously to this commit needaction used by JS was not taking into account
read notifications. It means notably Inbox counter could be higher than
expected as taking into account read messages while Inbox displays only
unread messages. This commit fixes that by checking notification state when
giving needaction_partner_ids to message_format result.
This fix has a small impact on performances as message_format is used in
notification process for chat or push. A better implementation of message
format and its postprocess could probably lessen this fix impact. As we
target stable version we avoid rewriting other part of the code. Optimization
will be done in development version.
Related to task ID 1841243. This is a manual forward-port of commit 69714fbeee
done in saas-11.2.
Previously to this commit needaction used by JS was not taking into account
read notifications. It means notably Inbox counter could be higher than
expected as taking into account read messages while Inbox displays only
unread messages. This commit fixes that by checking notification state when
giving needaction_partner_ids to message_format result.
This fix has a small impact on performances as message_format is used in
notification process for chat or push. A better implementation of message
format and its postprocess could probably lessen this fix impact. As we
target stable version we avoid rewriting other part of the code. Optimization
will be done in development version.
Related to task ID 1841243. This is a manual backport of commit 69714fbeee
done in saas-11.2.
Previously to this commit needaction used by JS was not taking into account
read notifications. It means notably Inbox counter could be higher than
expected as taking into account read messages while Inbox displays only
unread messages. This commit fixes that by checking notification state when
giving needaction_partner_ids to message_format result.
This fix has a small impact on performances as message_format is used in
notification process for chat or push. A better implementation of message
format and its postprocess could probably lessen this fix impact. As we
target stable version we avoid rewriting other part of the code. Optimization
will be done in development version.
Related to task ID 1841243.
- Portal users do not have the rights to read on project.project.
This causes issues on the page "/my/tasks" as it is trying to read the label_tasks and the name of the tasks' project.
To address this issue we read those two fields using sudo
- Create a product where the associated product category has Costing
Method "Average Cost (AVCO)"
- Create a PO. Order 1 unit at $1000.
- Receive that unit. (System now has 1 unit at $1000).
- Create another PO. Order 3 units at $500 each.
- Receive only 1 unit and don’t create any back order.
System has 2 units @ $625, instead of $750.
The quantity computed should take into account the quantity actually
done.
opw-1843998
In case we define a field like,
<field name="my_domain" widget="char_domain" context="{'active_test': False}"/>
when selecting records the dialog should display all records (as asked by the
context), but it's not the case.
This commit ensure the field context is passed to the selection dialog.
opw-1831902
Revision 054c68689b added by mistake the
password of the new user in the welcome message that is sent to users
who signed up with an invitation token.
There is no need for this, the user has just chosen their password, and
we should not send them a copy which could be compromised on the way to
their inbox or later in their inbox.
It may also give users the impression that their passwords is stored in
cleartext in the database, even when that is not the case.
This patch minimalizes changes to the template and its translations.
For existing databases where the code is updated without re-syncing the
template, the password will simply be missing in the message (until a
resync of auth_signup module is done)
Before this commit, when a scheduler fail for one event (eg: error in send_mail),
the cron stop and don't continue to process all others event's scheduler.
Now we try to warn (~ randomly once by hour) the responsible/organizer/write_uid
that an error occurs with this scheduler, and we continue to process the others.
opw-1840497
closes#24741
- Create a tax included of 7.7%
- Set the company rounding to 'Round Globally'
- Create a bank statement of 10.70, reconcile
- Add a manual line with the 7.7% tax
An extra line of 0.01 remains.
The remaining amount after subtracting the tax is `0.00499...`, which
is rounded to `0.005` by `Math.round(total*1000)/1000`, and finally
displayed as `0.01`.
The 'Round Globally' setting makes sense for objects containing multiple
lines, such as SO, PO or invoice. In the case of a reconciliation, we
can switch to the 'Round per line' config.
opw-1837986
The field signup_valid is a non stored computed field based on signup_token.
The cache is filled with prefetched values, so in a loop the field is read from
the cache and not recomputed due to the missing dependency.
opw 1843442
When sorting records according to a many2one field in a list view
embedded in a form view, the js would sort according to their ids,
in a seemingly arbitrary order.
Thus sorting records according to a field with values in ("a", "b", "c")
could be sorted as "a", "a", "c", "b" instead of "a", "a", "b", "c".
We make the comparison on the name of the field instead.
opw 1838860
If a country is specified, we show also all our online events to promote it since
they can be followed from anywhere. But we show in priority the physical event.
opw-1845012
Until this revision,
this was possible to set as parent task the current task.
From then, it was impossible to compute the field
`subtask_count` because of an infinite loop.
This resulted to the inability to open the task
form, which contains this field.
opw-1847982
When adding a SO line with a delivery method (e.g. The Post) for a customer
with a different language that the one set on the current language, the description
of the SO line was not translated. Inspired from function 'product_id_change' in
model 'sale.order.line'
opw:1843934
- The code to remove mentionned users on the chatter isn't robust enough.
It crashes when trying to remove a link added from a copy/paste as if it was a mention.
Mentions have an id defined on their "a" html node, linked copied and pasted don't.
Which crashes the javascript code because it is trying to use the id.
This fix, make sure to delete the node without using its id (we already have the node) and make sure to remove it only if it starts with a '@' (meaning it is a mention).
This commits removes a disambiguation on the choices of the 'Adjustment Type' selection as 'in your favor' could be achieved by debitting the 'Collected Tax' account or creditting the 'Paid Tax' accounts (respectively for 'in favor of the Estate'). The choices now refers directly to the journal item where the tax is gonna be copied
Related to https://github.com/odoo/odoo/commit/c58ef14a01f600d75391f2a9c38bb2b30e0e2528
Related to OPW 1826242
Before this commit there was an unexpected behavior of chatter in Note module
on Zoomin/Zoomout. Putting the html field memo in the sheet solves it and
chatter now properly behaves.
Related to task ID 1837177. Closes#24295.
* budgetary position nor analytic account aren't required anymore (although one of the 2 have to be given)
* by extension, the computation of practical amount is not either based on the analytic lines or the account.move.line
* usability improved (for eaxmple: there's a button to open the list of items on which the practical amount computation is done)
* addition of a pivot and graph views of the budget lines
Was PR: #22342
Was task: 31995