This commit aims at:
1. Fixing a bug where the invoice would be uploaded in the wrong journal
------------------------------------------------------------------------
To reproduce:
- Go to Customer invoices
- Upload an invoice (with an embedded FacturX)
- The journal is set to Vendor Bill
2. Letting the FacturX move type override the user-chosen move type
-------------------------------------------------------------------
Currently, if the user uploads a credit note in a customer invoice journal,
the document is not created and set to the OCR. This is due to a restrictive check
which has been removed. Therefore, when the move type is defined in the FacturX XML,
we will use it to override the user choice so that the document is always created
within the right journal.
3. Harmonizing the invoice upload between the Accounting and the Documents apps and avoid code duplication
----------------------------------------------------------------------------------------------------------
Currently, the flow of uploading an invoice from the Accounting app and the Documents app is different.
Indeed, if one uploads an invoice in the Document app and click on the "Create invoice",
the document is sent directly to the OCR. Now, instead, we will pass this document to the same upload method
of the Accounting (which will try to create the invoice from the FacturX XML if present).
Therefore, the flow will now be the same from the two apps for better harmonization.
4. Adding a 4th button in the Documents app to create a Vendor refund
---------------------------------------------------------------------
Currently, there are 3 buttons to create a customer invoice, a credit note, a vendor bill, but no vendor refund.
This is due to a duplicate xmlid which has now been fixed allowing the 4th button to be seen in the UI.
5. Adding a button "Switch into customer invoice/vendor bill" button in the account.move's form view
----------------------------------------------------------------------------------------------------
Currently, the user has access to a "Switch into credit note/refund" but not the reverse button to
go from a credit note/refund to an invoice/bill. This is now the case.
Task id 2961932
closesodoo/odoo#103427
Related: odoo/enterprise#32890
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit:
There is no debug icon in Discuss Public Page to show whether debug mode
is on or not.
After this commit:
Added a debug icon which will be visible when debug mode is on.
Task-2664824
closesodoo/odoo#97178
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit removes unnecessary spaces from the XML of the table of
content block.
Related to opw-3047375
Related to opw-3035502
task-2948895
closesodoo/odoo#107732
X-original-commit: 7ee4cc7d02158c63e6e2bd5eacc94371040872a8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since the Bootstrap 5 merge, when there were several TOCs on the same
page the scrollSpy only worked for one of them. This commit fixes that.
Steps to reproduce the bug:
- Drop two TOC blocks on the same page
- Save the page
=> The second TOC is not working properly, it does not highlight the
current section.
Related to opw-3047375
Related to opw-3035502
task-2948895
X-original-commit: c182691bbfd6be8cc9aed26162635f5fdb117991
Part-of: odoo/odoo#107732
The table of content (TOC) has two mechanisms that interest us here:
The first one is scrollSpy (from Bootstrap) which allows (among other
things) to bold the menu elements according to the scroll. The second
one is a mutation observer which is implemented to regenerate the menu
when the content of the TOC changes.
This being said, when we edit the TOC and scroll at the same time, there
is a race condition that makes scrollSpy want to add a class to a menu
element while this menu has just been regenerated by the observer. The
error is only visible since the migration from Bootstrap 4 to Bootstrap
5 because to add the class, Bootstrap 4 did it with the jQuery
`addClass()` function which does not cause an error if the element on
which it is called does not exist. Now, Bootstrap 5 does the same thing
in pure JS with `classList.add()` which causes an error if the element
on which it is called is not defined. This commit fixes this error by
disposing the scrollSpy when the menu is regenerated.
Steps to reproduce the error:
- drop a table of content block
- drag a snippet around and go over the drop zones
=> traceback. It can appear directly or after some tries.
opw-3047375
opw-3035502
task-2948895
X-original-commit: a05f782871c61b2d58ca2fd4277cb7aed65a301d
Part-of: odoo/odoo#107732
Since [this commit], when dropping several "table of content" blocks on
the same page, it was impossible to save. This commit solves this
problem.
Steps to reproduce the resolved bug:
- In edit mode, drop two TOC blocks
- Click on Save
=> the UI is blocked
[this commit]: https://github.com/odoo/odoo/commit/06b03ba5ef8375b1236f6ecb52ac468124e910ba
Related to opw-3047375
Related to opw-3035502
task-2948895
X-original-commit: a6de596017cdbd0da10b4050da132d46dc82a491
Part-of: odoo/odoo#107732
When clicking on a star from the (3|5)-stars widgets, the stars light up
in yellow to reflect a rating. We weren't making a history step when
this happened, meaning that an undo or a rollback of anything that
happened just after clicking, would undo that rating change as well.
task-3084709
closesodoo/odoo#107669
X-original-commit: d4d592350e0b887cc10cc540ab3e5e1b20600946
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Odoo sh needs the update channel event to always come first.
This PR ensures it will always be the case.
closesodoo/odoo#107971
X-original-commit: 1f29e7bec160c1fa6930b3ee8b7753150253a7e2
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
row
When it comes to closing POS sessions, both the frontend and the backend
currently have some way to prevent the same operations from executing
simultaneously because of repeated clicks. `closeSession` in the
frontend has a `closeSessionClicked` boolean that prevents the operation
from triggering multiple times at once. `close_session_from_ui`
in the backend checks if the session state isn't already `closed`.
A flaw in the current logic is that
`update_closing_control_state_session`, which is called by the frontend
before `close_session_from_ui`, doesn't check the session state before
writing it to be `closing_control`. This means that if you time things
in such a way that the `closeSession` logic in the frontend triggers
again right after it finishes, it will call
`update_closing_control_state_session` and `close_session_from_ui`
again, which will happily close the session again, duplicating stock
moves and account moves resulting from it.
This fix has `update_closing_control_state_session` check if the session
is already closed and raises a UserError if so. This prevents the
duplicate closings and records from happening.
There were two variants in the UI I observed when the issue occurred:
the first is when the repeated execution of
`update_closing_control_state_session` and `close_session_from_ui`
successfully finished. In that case the session would be closed with
duplicate stock moves and journal entries.
In the second variant, from the repeated calls only
`update_closing_control_state_session` executed but not
`close_session_from_ui`. This could happen if the timing of the
frontend was such that it redirected to the POS dashboard before it was
able to call `close_session_from_ui`. In that case, the session would
be in the `closing_control` state, which is visible in the POS dashboard
. If the user then closed the session, it would be closed twice and the
duplicate records would again be created.
opw-2988701
closesodoo/odoo#107961
X-original-commit: 6b12c64e09c92fba96532658f959daf7d234223c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Before this commit:
Emoji data are all in English. Unable to use in other languages.
After this commit:
Emoji names and keywords are translatable for search and display purposes.
Emoji category names are translateable for display.
Task-3043336
closesodoo/odoo#107941
X-original-commit: ee5e0a201fb1980c1745692d366fd8539815773e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
With the previous commit fixing the forced purchase_price recomputation
on all lines caused by the dependencies added by sale_stock_margin,
we can now safely allow manual edition of the cost.
closesodoo/odoo#107909
X-original-commit: 9c51daaa58c403778861ec484e0493698bacbc92
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Steps to reproduce the bug:
- Create a storable product “P1”:
- change the cost to $20
- product category > costing method > standard price
- Create a SO:
- Add the product “P1”
- Change the cost from $20 to $10
- Save
- Sent the quotation by Email
Problem:
The `purchase_price` is recomputed and changes back to the original value.
When the quotation is sent, the state of the order lines change,
marking the field `qty_delivered_method` to be recomputed, but also
other computed fields depending on it, including the purchase_price
(because of the dependency added in sale_timesheet_margin).
To avoid this unexpected recomputation, we remove the useless
dependency on the `state` for the field `qty_delivered_method`.
There is no reference/check on the state in the method
_compute_qty_delivered_method or any of its overrides and
therefore the field should not be necessary in the compute
dependencies.
opw-2994136
Fw-port of 296ec254b8ba88022fd15cabb0e44956163835fb to 16.0+
X-original-commit: 6f2faf5ccfca41c4e3d8b85105dd5bca5d031106
Part-of: odoo/odoo#107909
The cost (purchase_price) of a sale order line is recomputed when the
sale order is confirmed, overwriting the potentially edited value
Steps to reproduce:
1. Install sale_stock_margin module
2. Create a quotation, add any customer and two lines: a service (e.g.
Deposit) and any other storable product (e.g. Large Cabinet)
3. Activate 'Cost (purchase_price)' column in the order lines view
4. Edit the cost of Deposit and confirm the quotation
5. The cost resets to the original product cost
Solution:
Modify the dependency of `_compute_purchase_price` to trigger it only
when the sale order line's related picking has changed state
Problem:
The dependency on order_id.picking_ids.state makes it that the purchase
price is recomputed for all sale order lines when any of the picking of
the related sale order has a modified state (but we want to recompute it
only for the sale order line that had its picking's state modified)
opw-2904500
FW-port of 9947b617a15a340a6d8127250918d8ea06a5354e to 16.0+
X-original-commit: 5287c0851cf7b3432427af17d3cc59c19306c417
Part-of: odoo/odoo#107909
An act_url action in target "self" redirects the current window/tab
to the given url. It always reloads the page, except when only the
hash or query string changes.
This commit blocks the ui when the page reloads, because there's a
lack of feedback and interacting with the ui is unnecessary anyway.
For instance, module operations (install, remove and update) end
with page reload. During the operation, the ui is already blocked
because the operation takes time. After the operation and before
the page is actually reloaded, the ui is unblocked. As the reload
also takes time because of asset rebuilding, it makes false feeling
for the user that operation completes and interface is ready for
interaction. With this commit ui is blocked until the page is
reloaded.
closesodoo/odoo#107830
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
In some case, we want that chatter takes the all space
available.
Steps to reproduce:
- Go to Email Marketing
- Click on any record
- Go to the Chat tab
closesodoo/odoo#107928
X-original-commit: cbbbc23800e2a00aab9af45087b5d3f7698823d8
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
No view is available for the mobile form of change.password.wizard. The
default behavior of the framework is to generate one using the backend
model. This result on showing some hidden fields to the user, some of
them (like in this case `Wizard Id`) is impossible to fill in.
opw-3027797
closesodoo/odoo#107911
X-original-commit: 0860ba8538793c081358105238946ebc0d2015e5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before [1], the bus was started lazily: either as a consequence of
the addition of a channel to listen to or by manually calling the
`startPolling` method.
Before this commit, the websocket would have been started as soon as
the bus service starts which degrades performances.
This PR fixes the issue by re-introducing the same mechanism as before
that is by starting the websocket either by calling manually the `start`
method of the bus service or automatically when adding a channel.
[1]: odoo#75510
closesodoo/odoo#107878
X-original-commit: 5d7deacf54f37f0938b92a3c45c9f1d1325d1a9f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
The linked overtime record was not deleted when deleting a time off.
Meaning that those hours were lost.
task-3097259
closesodoo/odoo#107917
X-original-commit: 54cdc8435c28ecea253f61d5c8eeef317874456a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
add documentation link for adyen terminal in point of sale settings, similar to the other payment terminals
closesodoo/odoo#107900
Related: odoo/enterprise#34948
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Before this commit the canceled lines would not filter out from checks for completeness
of the statements and also the corrections in split wizard consider canceled lines as
real values. One of the results of this is when the user import statements with some
duplicate lines, the duplicates are canceled but the statement stays complete regardless
of the missing lines.
Also fixes the line date is not auto-filled when creating lines in the list view if they don't have a state
Closes PR #105708closesodoo/odoo#107894
X-original-commit: 2422b2c619209c1ff4171902dd2f90824194366d
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Pouya Malekinejad (poma) <poma@odoo.com>
- On the settings view;
- Open the CRM settings;
- Click on "Update Probabilities" button;
- Change the "consider leads created as of the" date;
- Click on "Confirm" button;
Before this commit, the fields on the settings related to the dialog
were not updated. This occurs because, as the setting model is a
transient model, the settings view should always perform an onchange to
fetch the view, and it wasn't the case here.
Now, we patch the basic model used on the settings view to remove the
res_id, to consider the record always as new. This will always perform
an onchange to fetch the data. Note that, this hack is the same as it
was done before the owl migration.
opw-3073124
closesodoo/odoo#107879
X-original-commit: 792567c71aed626b5566f32b656104e3e70c496c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
This revision is related to odoo/enterprise#33088
The needs is the same:
While using Studio,
instead of removing the node from the view
when the user is not part of the group,
set the node as invisible.
This is so the xpath expressions computed by Studio
takes into account nodes which are removed from the view
when the user is not part of the group required by the node.
e.g.
```xml
<form>
<group>
<field name="name"/>
<field name="currency_id" groups="base.group_multi_currency"/>
<field name="foo"/>
</group>
</form>
```
With the above view, if you want to add a new field after
`<field name="foo"`/>
and the `currency_id` field node is removed from the view
during the post-processing of the view
because the user doesn't have the group,
Studio computed the xpath expression with `field[2]`,
and then the new field was mis-placed,
it was before the `foo` field instead of after.
The strategy is to let the nodes, as invisible,
for which the user doesn't have the groups
so the xpath expression is correctly computed
for the view as it is stored in the database/
before the post-processing step removing the nodes.
The above revision applies this strategy for
nodes other than `<field/>` and `<t/>`.
The `<field>` were not included because it was,
at that time, believed it wasn't necessary.
Even though the index was wrong as demonstrated
in the above example, it was then converted
with the expression `field[@name="foo"]`
instead of `field[2]`, and therefore it was
fine not to include the `field` nodes
in the strategy.
Also, fields were not included in the strategy
because for them, if the `groups` is set
in the Python model
e.g.
```py
currency_id = fields.Many2one(..., groups='base.group_multi_currency')
```
Attempting to read them while you don't have the group
will lead to an AccessError exception.
And there was no way to display the field as invisible in the view
without the web client to try to read its content.
Unfortunately, it isn't the case,
as demonstrated by the tours included in this revision,
field nodes must be included in the views, as invisible,
so Studio can compute correctly the xpath expression.
This revision therefore aims to apply the same strategy
for `field` nodes, make them invisible instead of removing
them from the view when the user is not part of the groups.
The revision takes care to override the web client so it doesn't
try to read the value of group-protected fields when the user
doesn't have the group.
So the field, with the label and everything,
is included in the view, but its content/value is left empty,
as the user cannot read the content.
Technically, there won't be many cases, because
users editing views using Studio are admins,
and in most-cases admins have access to these group-protected fields.
Having a field group-protected to which the admins do not belong
doesn't happen that often.
closesodoo/odoo#107877
X-original-commit: 91f213e202ca29c4ef0bb190663fc48f169a64a6
Related: odoo/enterprise#34940
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Co-authored-by: kebeclibre <lpe@odoo.com>
The tooltip for the setting module_product_email_template refers to a setting in the Sales tab of the product, but this has been moved to the Accounting tab in v15. Due to stable policy, this is fixed in master
task-3095455
closesodoo/odoo#107634
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer,
pos_epson_printer_restaurant, pos_hr, pos_loyalty, pos_mercury,
pos_restaurant, pos_restaurant_adyen, pos_restaurant_stripe, pos_sale,
pos_sale_product_configurator, pos_six, pos_stripe
We are about to refactor most of the Javasript code base of the point of
sale and related modules. In doing so, we will move a lot of files and
modernize the entire code-base. In order to avoid diffcult rebases,
their conversion to odoo-modules is done as a first step to avoid
getting lots of conflicts on files that were unindented, which marks the
entire file as being in conflict. Conflicts will occur during forward
ports but they will be easier to manage as the changes will be much
smaller in scope, and the author will have the context of the change
that causes the conflict in mind when dealing with it.
closesodoo/odoo#107621
Related: odoo/enterprise#34910
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
In some cases, when billing a received quantity that is already
delivered, the account move lines of Stock Interim (Received) will
not be reconciled
To reproduce the issue:
(Need account_accountant, sale_management)
1. Create a product category PC:
- Costing Method: FIFO
- Inventory Valuation: Automated
2. Create a product P
- Type: Storable
- Category: PC
3. Create and confirm a PO with
- 5 x P at $50
4. Process the receipt R
5. Create and confirm a SO with
- 5 X P
6. Process the delivery
7. Create and post partial bill B01 related to PO:
- 1 x P @ $60
8. Accounting > Accounting > Journal Items
- Group By: Account
- Note: There are three lines in Stock Interim (Receipt):
- [AML01] Debit: 0, Credit: 250 (receipt R)
- [AML02] Debit: 60, Credit: 0 (bill B01)
- [AML03] Debit: 0, Credit: 10 (price diff from B01 because
quantity already delivered)
There is a partial reconcile between AML01 and AML02, AML03 is
not part of this partial reconciliation
9. Create and post partial bill B02 related to PO:
- 4 x P @ $60
10. Accounting > Accounting > Journal Items
- Group By: Account
Error: The lines of account 'Stock Interim (Received)' are not
reconciled while it should
When confirming B01, we try to reconcile AML01, AML02, AML03. In the
reconciliation process, we first sort the AMLs and try to create a
partial reconciliation:
https://github.com/odoo/odoo/blob/01cb7e960f912c4758d30c04653b599937785799/addons/account/models/account_move_line.py#L2282-L2293
Because of the sorting, here is the order of the AMLs:
- [AML01] Debit: 0, Credit: 250
- [AML03] Debit: 0, Credit: 10
- [AML02] Debit: 60, Credit: 0
In `_create_reconciliation_partials`, we consume the AMLs in that
specific order. So, it first uses one credit line and a debit one:
https://github.com/odoo/odoo/blob/01cb7e960f912c4758d30c04653b599937785799/addons/account/models/account_move_line.py#L1863-L1872
(i.e. AML01 and AML02) and creates a partial reconciliation for
theses AMLs. It gives a temporary credit line of 190, but there is
no more debit lines, so the partial reconciliation is stopped (this
explains the note at step 8)
Later on, while posting B02, we try again to reconcile the lines of
Stock Interim (Received)
https://github.com/odoo/odoo/blob/493020b9317a439c0a61a34f37cc92b6779ef633/addons/stock_account/models/account_move.py#L249
At that point, we have three AMLs:
- [AML01] Debit: 0, Credit: 250 (same as above)
- [AML04] Debit: 0, Credit: 40 (price diff from B02)
- [AML05] Debit: 240, Credit: 0 (B02)
Back in the reconciliation progress, we try to get all involved AMLs:
https://github.com/odoo/odoo/blob/01cb7e960f912c4758d30c04653b599937785799/addons/account/models/account_move_line.py#L2284-L2287
It will be used later for the full reconciliation. To get the
involved ones, we recursively get the AMLs implied in the partial
reconciliation of AML01, AML04, AML05:
https://github.com/odoo/odoo/blob/01cb7e960f912c4758d30c04653b599937785799/addons/account/models/account_move_line.py#L2481-L2489
Therefore, because of the first partial reconciliation explained above,
we will find AML02 but not AML03. This is the reason why the full
reconciliation will not happen.
Working on the assumption that the note of step 8 is not a bug (i.e.,
AML03 is not expected to be part of the first partial reconciliation),
we need to provide as much AML as we can when calling the
reconciliation process.
OPW-3040171
closesodoo/odoo#107908
X-original-commit: 3050e23f94c865f9938863f191076f761b80fedb
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
(Received)
In auto-avco, if a user delivers a products before billing its
receipt, the account Stock Interim (Received) will be unbalanced
To reproduce the issue:
(Need account_accountant, sale_management)
1. Create a product category PC:
- Costing Method: FIFO
- Inventory Valuation: Automated
2. Create a product P
- Type: Storable
- Category: PC
3. Create and confirm a PO with
- 1 x P at $50
4. Process the receipt R
5. Create and confirm a SO with
- 1 X P
6. Process the delivery
7. Create the bill B related to PO
8. Set the bill line unit price to $60
9. Confirm
10. Accounting > Accounting > Journal Items
- Group By: Account
Error: The account 'Stock Interim (Received)' is not balanced
(Debit: 60, Credit: 50)
The account entries are:
- Credit 50 related to R
- Debit 60 related to B
There isn't any line for the price difference. Since [1], we don't
generate any price difference layer for the already-delivered
quantities. Before this commit, a layer was generated and posted on
account-side:
https://github.com/odoo/odoo/blob/a5b985e8449a1e858c3fb9a0a90a6d203e16f739/addons/stock_account/models/account_move.py#L68-L69
But, as explained in [1], we should generate the price diff layers
only for the remaining quantities, otherwise it would lead to some
errors on both stock and account side. That being said, we still
have something to do with the price diff related to the out
quantities. This is what this commit is about. In such case, we
generate some journal entries:
- we credit the account 'Stock Interim (Received)' with the price
diff (the account is then balanced)
- we debit the account 'Expenses'
To do so, we:
- Bring back the method
`_stock_account_prepare_anglo_saxon_in_lines_vals` from [2]
- Fix that method because both fields `analytic_account_id` and
`analytic_tag_ids` do not exist anymore [3]
- Update it so it behaves as described above
Note 01: in the steps, we have removed the case 'Receive, Return and
Receive again'. Such a flow breaks the whole accounting and would
not work with some other features. Therefore, we consider such a
flow as invalid (the user could rather create a new purchase order
to receive the quantities again)
Note 02: This behaviour is not supposed to work with the kits. This
commit prevents the lines to be posted in such situation. Suppose
the flow is in a "standard" order (PO, Bill, SO), we also do not
create layers for the price difference:
[1] 18912b05239e6fc5dab26ec4c930f9080882d127
[2] 35d6c58f86
[3] odoo/enterprise@a1eaf200d0
OPW-3040171
OPW-3071238
X-original-commit: 84733fb89faffe2480def97f076633056e16572f
Part-of: odoo/odoo#107908
Steps to reproduce
- Install Accounting
- Create user and employee, "user_acc", with Accounting-Accounting and no Expense rights
- Take the expense in "To Submit" state for the employee different than user_acc and create report
- Save the report.
Bug - We get the error that required field 'name' is not set and expense lines disappear.
task - 3099142
closesodoo/odoo#107903
X-original-commit: c5765be58dcdb3f6d766e6ce409a6e0f8a82e45b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Computing the recurrences of a task repeating every X months until a
certain date generates too much dates
Steps to reproduce:
1. Install Project
2. Go to Settings > Project > Tasks Management and enable Recurring
Tasks
3. Open any project in the Project app and create a new task then edit
it
4. Enable the Recurrent field of the task
5. In the Recurrence tab, edit:
- Repeat Every: 6 Months
- Until: End Date: one year from now
6. The recurrence message says there are 11 tasks but there should only
be 2
Solution:
Generate the recurrences until the `repeat_until` date is reached if the
`repeat_type` is 'until', otherwise generate as much recurrences as the
count
Also relax the constraint on the `repeat_day` and `repeat_until` to not
raise an error if `repeat_until` is the last day of the month
Problem:
The recurrence of a task with `repeat_unit` month and `repeat_interval`
different than 1 with a `repeat_type` until creates too much tasks,
exceeding the `repeat_until`
opw-3076593
closesodoo/odoo#107910
X-original-commit: 236b383fd9d1ad6a5d39d8c4232b49864ec19b37
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Some demo mass mailings are currently defined as being "in queue" in demo
data. This means they are about to be send by the mailing cron.
However we don't want demo data to send emails as
* most of those emails are fake (e.g. targeting example.com);
* real emails should not be sent (e.g. having by mistake a real email that
will be spammed);
* statistics resulting from those emails will not have any wow effect;
* on SaaS this consumes email quota, and produces quite a big volume of
unnecessary emails when people try the 16.0 version;
It is better to either have demo data of mailings done with traces, or keep
other mailings in draft. Otherwise the cron will send them. Flagging those
mailings is difficult, as emails are sent asynchronously and not during
install or update.
Even if this may lessen wow effect of some kanban view, better move mailings
currently "in queue" to "draft".
closesodoo/odoo#107904
X-original-commit: 0e11f4926be1800fc2b58feedcd81df24720ec19
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Cleanups and fixes/improvements extracted from another task
on the settings of sale.
* indentation
* code simplification
* privatize method not meant to be called by rpc
* double quoted strings for strings shown to users, single quoted for
technical strings
* translate onchange warning message
closesodoo/odoo#107897
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Steps to reproduce the issue:
- Accounting > Configuration > Journals
- Click on Journal
- View metadata of Journal
Bug:
Even if no modification has been made to the journal, it marked current time
in Latest Modification By/Date
opw:3089551
closesodoo/odoo#107875
X-original-commit: 47999e7b1c9a52059f84abaafeac388f2991a621
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
in account and hr module's manifest file non existing image path is specified in images key. removing this images key from manifest and remove empty images key from l10n_latam_check module
closesodoo/odoo#107346
Related: odoo/enterprise#34711
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Steps to reproduce the bug:
- Create a BoM with components
- Archive one of the components
Problem:
No warning is displayed for the user to inform that the product is
used as a component in a BoM
opw-3089104
closesodoo/odoo#107863
X-original-commit: 9b7c416387d93507b6f750aba58ad6233a59d512
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
**Issue:**
- Install CRM.
- Change language to French.
- From CRM, open a lead that has `Revenu espéré` thousands as value, e.g. 10 000,00.
- Try changing `Revenu espéré` by deleting one of the thousands digit.
E.g. 10 000,00 -> 1 000,00
- BUG: The modified value is not understood by the system.
**Solution:**
This is because the thousands separator from the French language is nbsp.
Coincidentally, the parsing logic assumes that the separator between the
currency symbol and value is also nbsp. So when inputting `1 000,00`,
the parsers thinks either `1` or `000,00` is the currency symbol.
We concluded that it's better to be less restrictive when parsing
monetary values. So, instead of making sure that the current input's
currency is compatible with the currency of the the field, we just
strip the non-numeric characters from beginning and end of the input
without validating the currency symbol, then parse the remaining
string as float.
This leads to a more user-friendly monetary input fields such that
inputting "DOGE 1,000,000.01" in a "$" monetary field will be
parsed as 1000000.01. NOTE that *no* currency conversion is performed.
**Minor breaking change:**
The second parameter `options` of the `parseMonetary` function is now
removed. Any existing use of that parameter is just ignored.
closesodoo/odoo#107862
X-original-commit: dc27f1f4c039bdbf84c55a4fb5364c6398c45949
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
**Issue:**
When the thousands separator is "nbsp" and the user inputs a value
that is "1 234", the parser will crash because the thousands separator
is different from what is manually inputted by the user.
This is problematic because when typing, it's very difficult for
users to enter "nbsp" character in their input.
**Solution:**
This change proposes that if the thousands separator is a whitespace,
we consider all whitespace characters from user input as thousands
separator. As a result, even if the thousands separator is "nbsp",
the system will successfully parse "1 234" as 1234.
X-original-commit: bffddcf015da9cf514fc25cc7f839e923e470d94
Part-of: odoo/odoo#107862
**Issue:**
- Set the decimal point to "," and the thousand separator to ".".
- In a float or monetary field, enter "=1.000,1+2.000,2"
- BUG: It's evaluated to: 30003
**Solution:**
Problematic evaluation steps:
```
-> parseNumber("=1.000,1+2.000,2")
- thousands separator are removed and decimals are converted to "."
so the string becomes "=1000.1+2000.2".
-> parseNumber("1000.1") + parseNumber("2000.1")
- since "." is the thousands separator, it will be removed
(replaced by empty string)
-> 10001 + 20001
-> 30003
```
Because the main parser `parseNumber` is recursive in nature, we
need to make sure that the logic that removes the thousands separator
and replaces the decimal point to "." is not called in the branch
that evaluates an input expression.
With this change, the new evaluation steps are:
```
-> parseNumber("=1.000,1+2.000,2")
-> parseNumber("1.000,1") + parseNumber("2.000,1")
-> 1000.1 + 2000.1
-> 3000.3
```
X-original-commit: 91eb5c40ce898428fb15d945d70510b92e9ebb03
Part-of: odoo/odoo#107862
closesodoo/odoo#107856
X-original-commit: 409fc809bafec2507342534bcdf4810ebffe9228
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
In the QUnit type definitions, there is a QUnit namespace and a QUnit
interface. When using a jetbrains IDE, it is confused between the two
and thinks the global QUnit is the namespace.
This means that it can't resolve QUnit.test, QUnit.module, etc
This fixes this issue by disambiguating between the two.
X-original-commit: 26dc799f841e51a6d57d427e095b662a45bc7e5a
Part-of: odoo/odoo#107856
Improving:
- Chart of account
- Tax report
- Fiscal position
- Translation
Task-id: 2753362
Signed-off-by: Maximilien La Barre <malb@odoo.com>
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#99450
Related: odoo/enterprise#31003
Signed-off-by: William André (wan) <wan@odoo.com>
Currently, when the vehicle is assigned, it is checked from the first contract date, now it
will be checked from the order date
In this Commit, We added order date field in fleet vehicle
task-3054981
closesodoo/odoo#107073
Signed-off-by: Kevin Baptiste <kba@odoo.com>
In this version of the tooling, the prettier files do not exist anymore.
We don't want to check if the files have changed, it will always be true
and trigger a reload of the tooling.
closesodoo/odoo#107825
Signed-off-by: Samuel Degueldre <sad@odoo.com>