If you define a report using `<report>` it will implicitly add that
action to a Print menu in the model's views. If you use ``<record>`` to
do the same, that won't happen unless you also set `binding_model_id`.
In older versions that wasn't really an issue because people mainly used
`<report>`, but it was deprecated in 13.5, hence this update. And it
applies to versions older than 13.5 as well, I tested until 11.0.
X-original-commit: 6768d4190993e95b50785ac4ebf3be7213ef5e3f
Issue
- Ensure that the provider of "The Poste" delivery method is "Based on Rules".
- Create a quotation with "The Poste" as shipping method.
- Confirm, then click on "Delivery" stat button.
- Click on "Put in Pack" and create a "Delivery Packaging".
- Save, go back to quotation and duplicate it.
- Confirm, then click on "Delivery" stat button.
- Click on "Put in Pack".
The "Delivery Packaging" created previously is not available.
Solution
If 'current_package_carrier_type' is equal to 'fixed' or 'base_on_rule',
replace it by 'none' since there are the equivalents in
'package_carrier_type' for 'delivery_type'.
Related fix : https://github.com/odoo/odoo/pull/37427
opw-2310258
closesodoo/odoo#57444
X-original-commit: 5898d31025eacad3e8c37f7a105e20c81831ed17
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
When parsing XML to import invoice, different edi will need to find records for partner, product and taxes based on the values on the xml. The helpers avoids code duplication.
Task 2327599
* The date is not copied on duplicate of account.move
* Do not throw traceback if we remove the invoice date of an
invoice/bill
* Add extra triggers in account_tour to ensure it is done in the right
view
* Update the position of some tour indicators
* Move the Product Categories in the Management menu
* The accounting onboarding is only visible on customer invoices list
view
* Switch the position of banc and bic
closesodoo/odoo#57420
Related: odoo/enterprise#13122
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Task 2327599
In some cases, we want a function to evaluate the string shown by the
rainbow man.
For instance, if the message should depend on the state of other tours.
Apparently website's login layout removes the "card" around the login
form, and only the inner login form remains and is centered.
Put the card-title inside the login form, it doesn't seem to affect
the web layout in noticeable ways, just fixes the layout when website
is installed.
closesodoo/odoo#56144
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Was not super visible, especially without HR as the dialog immediately
closes (limitation of the web client), or when an administrator user
massively disables totp.
Show a toast notification indicating the success of the action.
Also fix the logging of `totp_disable` so it correctly handles being
called on more than one record, and change the logging data to
<browse_record> (<logins>) across the board.
Also add a way to provide an action to execute after a notification:
by default nothing happens, which leads to dialogs not closing and
forms not reloading, and there is no good way to show a notification
and/then do some other thing, which is inconvenient.
Use same look in form as in preferences dialog, just without the
buttons to enable / disable it (technically could have the button to
disable with the correct group I guess?)
The "issuer" being the user's company is not necessarily helpful as
e.g. the company might have multiple services which all use 2FA.
Use the domain name instead (fallback on the company if for some
reason we're in a situation where this is computed without a request).
TOTP programs generally group the code into two groups of 3 digits,
but we'd only allow a single group of 6 digits.
Allow spaces in the value for a bit of flexibility, and fix
placeholders to look like codes (also turns out @placeholder on a
field doesn't do anything, not sure where I got this idea).
Also improve the label slightly in the login flow:
* add information to the label itself
* properly link the label & input via an `id`
bfcc7dee8f tried to fix the session
disconnection issue, but the fix only worked in single-process (either
threaded or workers=1): because the cache was cleared but the update
not flushed, since `_compute_session_token` uses SQL directly it would
recompute the old session_token which it would cache, and thus the
process would carry-on with the old token just re-set in the session
and cache.
Meanwhile in multi-process, odds are good that the next request will
be on a different worker which *will* see the change, and will
immediately complain & destroy the session.
Add the missing flush calls right before recomputing the session token
so the SQL "sees" the correct state.
Steps to reproduce the bug:
- Install Accounting and Documents
- Go to Documents configuration
- Enable Files Centralization > Accounting and save
- Still in Documents configuration, into "-> Journals", create a new Journal to Synchronize with:
- Journal: Customer Invoices (USD)
- Go to Accounting > Customers > Invoices
- Create a new invoice with any customer and product and save
- "Post" then "Send & Print"
- On the dialog, "Send & Print" (confirm the report template if necessary)
- Go to Documents
Bug:
The document is missing the "related resource" link shortcut
Cause:
The context key `default_res_id` is propagated up to:
https://github.com/odoo/enterprise/blob/a6606f000e66e72b9f89d353552950652ab2045f/documents/models/document.py#L364
Consequently, the corresponding document is created with a `res_id`, but no `res_model` as `default_res_model` is not set.
By adding the `default_res_model` context key, the document is created with the right `res_model`. Note that another solution would be to remove `default_res_id` from the context before creating the `documents.document` and leave the `_compute_res_record` do the job. However, this could have a larger impact since it would affect all document creations.
opw:2332596
closesodoo/odoo#57410
X-original-commit: 82cb5066de1081886f1e6277159248bf0d0e4330
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
During the `test_01_tickets_questions` a tour is started as a portal
user to reserve tickets for the newly created event.
At the end of the tour, a modal is opened and once filled, the `continue`
button is used. The problem is that the tour stops without waiting but
the python tests continues. If the HttpCase session is cleared before
the tickets are registered, the test fails with a `400 Bad Request:
Session expired` warning and the next python assertion cannot be
fullfilled.
closesodoo/odoo#57400
X-original-commit: 33896d8f0d60bfa26601f1c5ca49009fcf735ab0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
1af543a399 removed the default time limit
for CSRF tokens, because of the usability issues and the limited
security benefit.
However the timestamp that was used to implement the limit also served as
a salt, making the CSRF token variable for each request. This is a
desirable property that can help mitigate some attacks, such as BREACH.
This patch re-introduces the variability by including a distant expiry
(1 year) when no specific time limit is passed. The purpose isn't to
expire the token, but simply to serve as a salt.
closesodoo/odoo#57395
X-original-commit: 136e4f66cd5cafe7df450514937c7218c7216c93
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Recent changes to make post all entries works from the dashboard broke
it when used from the move list.
This commit will fix that and make sure it works in both situation
closesodoo/odoo#57249closesodoo/odoo#57352
X-original-commit: fcadd448741d354c44a17a89819c95c7b124a3b7
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
The recent changes in misc improvements broke the loading of the exchange accounts in the chart template.
This change aim to fix that by moving the setup of those accounts back where it was originally done.
Taks id #2319601closesodoo/odoo#57351
X-original-commit: ac328eba96c6f2e34f18f3d4671290683a090c08
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
Two account.account M2O where authorizing off-balance accounts while
they should not be selectable. This change aim to fix that.
closesodoo/odoo#57345
X-original-commit: cd25dba354b9d2a83e6b7ab45434bb2879984e33
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
Because we are using self[0], we need to ensure the order to have
something deterministic. We want the first entry of the perdiod to have
a sample name.
closesodoo/odoo#56895
X-original-commit: 00693dc0b36bebb6b04ef8e81291486334dd4dba
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
Remove this incoherent comment, and move the interesting information in
the dedicated section.
closesodoo/odoo#57383
X-original-commit: 1be2806045a6d92416a63364391e035ed36589f0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- Go to Timesheets > Configuration > Settings and select Days as Encoding Unit
- Go to Project and create a Project with Timesheets activated
- Open the created Project and create a Task
- Edit the task and encode a timesheet line with 1 Day duration
"Hours Spent" and "Remaining Hours" have incorrect values.
The 1 day encoded is computed as 1 hour.
Reverting: https://github.com/odoo/odoo/commit/2a7ec79c6a4563b608a4525ebccdea5978799caa
opw-2328603
closesodoo/odoo#57379
X-original-commit: 8b3eed7418d6eea870f5e65ae238a304c88bd9f5
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
To transfer an order from one table to another, we first select the order,
then we click the 'transfer button', then we are shown the table selection.
The moment we click the 'transfer button', two simultaneous rpc's are made
for the same method (`create_from_ui`). This method deletes and recreates
the orderlines in database. The 2nd request fails because of the deletion.
But despite the failure, the server retries the rpc after a random amount
of time in sec: `wait_time = random.uniform(0.0, 2 ** tries)`.
If the user immediately (within the `wait_time`) clicks the new table where
the order is to be placed, the problem happens - the transfer of order to
the new table fails. This is because of the 3rd rpc whose result is used
for the actual order transfer. If the 3rd rpc happens before the retry of
the second, the transfer fails.
The randomness of `wait_time` (time-to-retry rpc) results to the random
runbot error. The solution is to prevent the 2nd (redundant) request
because it is not actually needed. This commit tries to accomplish that.
closesodoo/odoo#57370
X-original-commit: af7e7899124d2d8e3d4526d7de1c93158878f6e6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
This commit fix a style issue with the button to edit the message
displayed at the end of the countdown
task-2312878
closesodoo/odoo#57364
X-original-commit: 282b7abd7e1c195cfe8199c52447ff7eff8e8abc
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In inventory report, when groupby setted and no data, the create button
will open a new form instead of create a new line. Since now our form
view is not editable, no record can be created.
In this commit, add a new editable form view to solve it.
Task 2310494
PR #55910closesodoo/odoo#57344
X-original-commit: 4a4e60c65049082855414941642dadce8b413475
Related: odoo/enterprise#13067
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Since 0bee745c36c3cf8c411ffb65fab66ebd005ae274, flags images are not stored anymore on the res.country model.
This commit adapts exhibitors templates to correctly use the new "image_url"
field instead of the old "web/image/" route that tries to access the image
on the model.
Task ID: 2336225
closesodoo/odoo#57347
X-original-commit: 9ceb725e3872e24f37ed8ef3d233e70ab21daf52
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
Steps to reproduce:
- Create a product P with route 'Resupply subcontractor on an order'
- Let's consider a BOM for P with type 'Subcontracting'
- Create a PO with subcontractor set on that product and process with Qty > 1,
- Validate a receipt with partial Qty and no backorder
Bug:
An error was raised because no production_id was set when trying to create a mrp.product.produce
When function _action_done is called with cancel_backorder = True, the function _action_cancel is called on the new_move
with no backorder and it called the function _action_cancel defined on model stock.move in module mrp_subcontracting
This function called _action_cancel on the mrp.production record MP
And finally this function called action_cancel on model stock.move on all finish_moves and raw_moves of MP
This line unlink MP of finish_moves and raw_moves
move.move_dest_ids.write({'move_orig_ids': [(3, move.id, 0)]})
That's why production_id was not set
PS: In this way, we don't cancel a MO when it is still used by other moves.
opw:2322278
closesodoo/odoo#57346
X-original-commit: e4d22d390c8aa8edf757e36704a9e04b2b89f115
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This issue only occurred in community.
Steps to produce:
1) Create/Edit any record.
2) Change the menu using menu switcher
3) You will get the discard dialog at the instance and after some
time it will also display another duplicate discard dialog.
So, we have one extra redundant discard dialog on menu switching.
It is working fine when we have dirty form and then click on the
breadcrumb or click on any internal child menu.
Task : 2312437
closesodoo/odoo#57359
X-original-commit: df37ce50e847e3489eb43d1ef6fc1bac6d6af333
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Orderpoint qtys were not updating when an already saved stock.move has
its demand updated. This was leading to new orderpoints being created
when there is already an existing one. This commit fixes this bug by
adding the missing dependency.
Steps to reproduce:
- Create a product
- Create a delivery with the product > Mark As Todo
- Go to replenishment report (product should be added)
- Go back to same delivery > unlock > increase the existing move line
demand amount
- Return to replenishment report.
product now has 2 orderpoints instead of just 1.
Additionally this commit fixes a column mislabeling in the "Reordering
Rules" tree so that it now matches the "Replenishment" tree
closesodoo/odoo#57355
Task: 2327726
X-original-commit: 1429a7d3029fff1c6cac8fbe98b00eb931d43604
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
In this commit, we ensure that the vat is
added to the company data if an error occured
when contacting iap-services.
task~2092378
closesodoo/odoo#57335
X-original-commit: 848733b758063307bbbbf69eee10cd2426e9c017
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit does 3 things:
1. When 'action_confirm' is triggered in a manufacturing order, any
'move_raw_ids' (components) that are unable to be fully reserved
when `action_assign` is triggered will be checked for an automatic
reordering rule (RR). If a rule exists it will be auto-triggered.
This includes subcontractor manufacturing orders. Relevant test
updated to match this.
2. When a MO is completed, auto check if there are corresponding
confirmed stock moves that can be populated by the completed products
and trigger their 'action_assign' to reserve the completed products.
3. If a new move line is added to an already confirmed MO, then do same
auto-RR check/trigger. (note will occur for pickings without extra
code since `stock_picking.action_confirm` is triggered again in this
case.)
This reuses similar logic as odoo/odoo#52433 from task 2244230.
Originally this was done in the `action_assign`, but has been moved to
`action_confirm` so as to imitate the now archived MTO process with RR.
Overlapping logic has been moved into stock_move for easier reusability.
Note that this now means editing existing moves' `product_uom_qty` (i.e.
Demand) will not have a flow to auto-trigger their RR.
Subcontracting test updated to match + new mrp test added for this new
feature.
closesodoo/odoo#57334
Task: 2322496
X-original-commit: 2688cd1bae489b1dec8862f4de727ac20514844c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
In case of manufacturing a product tracked by serial number,
there is no reason to be able to make it with a different UoM of
the product (which lead to rouding issue).
Then when we confirm the MO in this case, the UoM and quantity
will be converted to product UoM.
PR #56000closesodoo/odoo#57333
X-original-commit: f0da27e7eb474e6db4cd999306c420804aaa6f9b
Related: odoo/enterprise#13059
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Change the default rouning digits of all UoMs to be two, also change the
decimal.precision of UoM to be two. Adapt all the tests.
Also to avoid hardcoded digits in `should_consume_qty` widget.
PR #56000
X-original-commit: 460ec0402a2352a5b179d81935f7230f6bc97cb7
Steps to reproduce the bug:
- On Safari, go to Module Repair
- Create a Repair Order
- Add a new line L
- A default type Add was set
- Set a product P on L
Bug:
The default value was reset
opw:2319954
closesodoo/odoo#57332
X-original-commit: 3aa92c1805f9d47dad4655b3ba49d08c319ef1df
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
When we send dates with website_form, if the language of the website is
eg. in arabic we will send moment.js arabic dates that can't be parsed
by the server.
This also happens with norwegian and any language which doesn't use
ascii numbers or textual format of month or days (and possibly RTL
language).
With this changeset, if we detect we are in a use case where this matter
(an existing field and a date format that will fail) the date will be sent
as odoo server format.
Expected change:
- what worked still work with or without server restart
- what didn't work works after server restart
- special case such as "english" with custom format in res.language
containing textual month might now not work with code update without
server restart (probability of this is low).
opw-2326882
closes#57042closesodoo/odoo#57217
Note: the saas-13.5 version always force isoformat for existing fields
X-original-commit: f50f32ea656df62d16f0aeba1247fc3b2d394e5d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Some informations for the developpers do not fit in the technical
documentation. To solve this, we opened a new documentation page on
iap.odoo.com and this commit adds a reference to the said documentation.
Task - 2330046
closesodoo/odoo#57215
X-original-commit: a7b86da8a0ceea3268de9b0fa249a56223411293
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Steps to reproduce:
- Let's consider a product.template TP with a kit
- Let's consider the variants V1, the only variant of TP with a kit
- The virtual_availalbe of V1 is 100 (smart button Forecasted in the form view)
Bug:
The virtual_available of TP was 0 instead of 100
The virtaul_available of a product.template must be the sum of virtual_available of all its
variants with kit
PS: This commit changes the available quantity of product_product_table_kit in demo data.
As this quantity was not equal to 0, the type of the product could not be changed.
opw:2297226
closesodoo/odoo#57325
X-original-commit: 74b762da63e159b1965428b2bcb972293c4efea6
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: Florent de Labarre <florent.mirieu@gmail.com>
Let's assume a kanban view using a custom form view to quick
create record:
<kanban on_create="quick_create" quick_create_view="view_ref">
Before this commit, there was a raise condition that could lead
to a crash. For instance, click to quick create a record in a
given column, and while the form view is loading, fold the column.
Issue reported on task 2323196
closesodoo/odoo#57322
X-original-commit: 9fed69b9e0e13652fd17e9a7c7c8dd838e2f22ed
Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
this commit removes unnecessary uppercase used under the favorites menu
task - 2325684
closesodoo/odoo#57319
X-original-commit: 1d54564d280d23b506e3764294318a359c0ad681
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>