This commit adds 3 indexes targeting project_task which are not only
useful in regular RW use cases, but help tremendously when deleting
tasks.
In a production scenario, deleting a single task record went from 685ms
to 5ms.
Equivalent queries for an existing database:
CREATE INDEX account_analytic_line_task_id_index ON account_analytic_line(task_id);
CREATE INDEX project_task_parent_id_index ON project_task(parent_id);
CREATE INDEX sale_order_line_task_id_index ON sale_order_line(task_id);
- Create an activity for a crm lead
- Set the lead as lost
The activity still appears in the list.
A proper fix would be to have an `active` field on `mail.activity`. In
the meantime, simply delete activites when archiving.
opw-1817703
Uninstalling account gets rid of this view and since sale depends on account, it is uninstalled as well, which triggers the uninstall_hook.
Closes#23446
Configure a thanks message on a payment acquirer which has no automatic confirmation (none value)
(The wire Transfer will do)
Make a website sale with that acquirer
When arriving on the confirmation page on the website:
Before this commit:
The thanks message was duplicated: one at the top, just under "transaction is waiting a manual confirmation"
and one at the bottom, where the actual transaction status is displayed
After this commit:
The thanks message just appears at the bottom location
OPW 1787799
The duplication of a task crashes at the following:
`content = myPad.getHtml(path).get('html', '')`
The copy mechanism is quite cumbersome:
- In `copy` method, generate an URL of a pad which doesn't exist since
`object_id` is still undefined.
- The `create` method somehow attempts to fill in the previously created
pad thanks to `_set_pad_value`.
The logic is made simpler. The pad URL field is set as `copy=False`,
therefore the create mechanism will take care of handling the pad
creation and its synchronization.
opw-1818757
Before this commit, it was possible to create redirect with empty values.
Now, for new db, that will be required.
Fix usability according to first feedback
- Redirect / menu should be visible without debug mode
because user need it when they start their website and
dont know at the beginning how to enable it (fgi)
- fa icon in page manager was for blind people
- missing widget on sequence field
With this commit, when a phone number is clicked (in readonly),
- if voip is not installed, it opens an app according to the user
choice (e.g. skype), and on mobile, it opens the phone app to
call the number
- if voip is installed, in desktop, it opens voip, and on mobile,
it still opens the phone app to call the number, because webRTC
is not supported.
This commit also makes the employee form view use the phone widget
for the 'Work Phone' and 'Work Mobile' fields.
Task #30369
Someone insisted for a refactoring to land in master. Because of his
stubborness, a mistake was introduced... Thank you, mister someone... I
hope that you're happy...
The computation of residual amounts on account.move.line does not use account_id.currency_id... and should not. Never.
The previous implementation was thus stupidly recomputing the amount_residual fields on all journal entries of an account as soon as its currency field was touched, for nothing.
- On 'website_payment/pay' if the reference contains a '/' the payment will never succeed.
It is due to the fact that in the template "payment.pay" were setting "prepare_tx_url" and "form_action" using this reference.
But having a '/' in the reference breaks the URL to call to create a transaction.
So when creating a transaction (or even paying in S2S) the payment never succeed and returns a HTTP 404 error.
The Project Plan code is quite new, but does some unconventional stuff.
It looks like a form view, but it is actually a client action with a
custom search view. The problem fixed by this commit is that when we
try to open the project plan from the project kanban view, it crashes.
It was caused by a bad interaction between the dashboard search view and
the action manager. The dashboard search view trigger a search event,
which bubbles up to the action manager. Since the project plan is not
loaded yet, the action manager assumed that the search event was for the
kanban view instead of the project plan.
The fix is to prevent the event from bubbling up, since the project
plan already handles the search event anyway.
Note that we also set the title in this commit to a default value, to
make sure that if we reload the client action, its title is set to a
more interesting value than 'Undefined'.
We also added a few tests, which could have prevented this mess. Now it
should be easy to add more tests whenever needed.
The Project Plan code is quite new, but does some unconventional stuff.
It looks like a form view, but it is actually a client action with a
custom search view. The problem fixed by this commit is that when we
try to open the project plan from the project kanban view, it crashes.
It was caused by a bad interaction between the dashboard search view and
the action manager. The dashboard search view trigger a search event,
which bubbles up to the action manager. Since the project plan is not
loaded yet, the action manager assumed that the search event was for the
kanban view instead of the project plan.
The fix is to prevent the event from bubbling up, since the project
plan already handles the search event anyway.
Note that we also set the title in this commit to a default value, to
make sure that if we reload the client action, its title is set to a
more interesting value than 'Undefined'.
We also added a few tests, which could have prevented this mess. Now it
should be easy to add more tests whenever needed.
When creating an invoice from POS order having a negative amount (due to return products), a credit note must be
generated instead of a customer invoice.
-github issue 23167
Before this commit, when a user open an existing link in the editor
he cannot check/uncheck the option "Open in new Window" while he don't
update the url.
The field was hidden while keyup was not called.
After this commit, if the url contains a url, we show directly the checkbox.
This commit fixes opw-1819601
Use case to reproduce:
- Create a Product MTO that should be buy
- Create a SO with this product and confirm it
- Confirm the RFQ
- Increase the ordered quantity on the SO
- Confirm the new RFQ
- Receive product from the 2 PO
-> Unable to reserve the quantity on the destination moves
It happens because the link between the reception move from the second PO and the delivery move is missing.
Update the quantity on the SO will create a new move with the missing quantity that will generate the new RFQ
then this move is merged in the main move. However the reception move is only created when the RFQ is confirm
and the move_dest_ids is stored on the purchase order line during this time.
Thus merge moves will unlink the new move with its reference on the purchase order line and the link is lost.
This commit do not merge move that have different RFQ/PO in order to avoid losing MTO information.
Use case to reproduce
- Create a planned transfer with 2 move lines (details operations)
- Leave the form view in order to lose the context then go back on the picking form view
- Delete a move line and save
The picking state change from draft to ready
It happens because planned_transfer is not in the context
then the autoconfirm is triggered.
This commit only autoconfirm if there's at least an intial demand in one of the move.
Closes#22834
The invoice printout would display taxes as floats instead of monetary
widgets, and as such display numbers such as 3.0500000000000003
instead of 3.05.
opw-1817230