Main flow tour mobile was still deactivated when #55995 was merged.
For a strange reason, a compute is called with a newId in mobile and not in the base
version of the main flow tour. This commit fixes the compute to handle such a case.
closesodoo/odoo#56281
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Use case:
When the server is restarted, the python is updated,
but some users may have an ongoing session in a browser tab
This may lead to code being unsynchronized and ultimately to some
odd bugs.
Purpose:
When we are in such a case, that is, the assets were recomputed
after a update of the code and a restart of the server by the request of another user,
notify connected users that assets have changed.
Then propose them to reload the page.
Known caveats:
- This is not a developer's feature.
Since assets computing is ORM cached, they have limited
opportunities to rebuild. Namely, the feature won't trigger
each time the JS has changed, rather, it will
when JS has changed AND the cache has been reset somehow (e.g. when the server is restarted).
- This not a portal/website feature either, but only in backend.
Business clients won't be notified that the JS has changed.
- While requests debug=assets do trigger a recomputing
of the *components* of bundles, they do not save a bundle
This means that the requests that sends the notification
cannot be debug=assets.
Task 2034462
closesodoo/odoo#39875
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Before this commit:
* Add a field with studio to any view of module A
* Note that the model has to be unique to module A
* Uninstall module A
* Try to uninstall the `studio_customizations` module
-> MissingError, impossible to uninstall `studio_customizations`
This happens because when uninstalling module A, all `ir.model.fields`
for models of said module are deleted in cascade by PostgreSQL when
unlinking the module's `ir.model`, this means that the ORM has no way of
knowing exactly which `ir.model.fields` where deleted and which
corresponding `ir.model.data` should be deleted, so the `ir.model.data`
remain in the database as orphans (that can, and will be cleaned up
later).
However since #34435 the mechanic that avoids the removal of
LOG_ACCESS_COLUMNS performs field access on records that may not exist.
This commit solves this by simply making sure that all records exist
before performing any checks that may require field access (and thus can
trigger a MissingError if the record does not exist).
opw-2316973
closesodoo/odoo#56285
X-original-commit: 08e662823ccf7dbe4d497f3f487287cba285a852
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit fixes the tipping workflow. It includes the following changes:
1. Instead of directly setting tip when clicking a tip amount in tip screen,
we set the input amount to that selected tip. Then we introduce validate
validate button to confirm setting of tip.
2. The tip screen is only shown for non-cash payments. This behavior can be
overridden in extension module in cases where the showing of the tip screen
is only available for certain type of payments.
3. We introduce a way a settle tips for multiple orders in the ticket list.
When the user filters by 'Tipping' status, an editable tip-amount column
appears which can be editted for each order. When tip amounts are final,
settle button will set tip for each order in tipping status.
closesodoo/odoo#56198
Task-id: 2322683
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Non-stored readonly computed fields must be assigned by compute method.
Make the error message more explicit.
closesodoo/odoo#56269
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
When the Odoo installation is tested, if the test fails an error is
raised but the Docker container is not stopped.
As a result, a ghost container stays alive with a Postgres server
running. Worse, if another package is built on the same host, the
ghost container prevent the other build to succeed.
With this commit, a specific Exception is raised and the container is
stopped in any case.
closesodoo/odoo#56270
X-original-commit: fbe2092d37af02276a49e335538d8caff3a15e7d
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
During the packaging for the src/deb/rpm, only regular package are taken
into account. Without an `__init__.py` file, the iap_mail is not
packaged and the whole Odoo packaging process is failling.
closesodoo/odoo#56260
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Execute shouldn't really be overriden because it handles a very touchy
case: module (un)installs, if it is poorly overriden it can create
registry inconsistencies and can make databases crash in really dumb
ways, since the module operations *need* to be performed at the end of
the transaction (last).
Most of the time, an override of set_values() does the same job and is
much safer.
This commit updates the `res.config.settings.execute()` documentation to
reflect this.
closesodoo/odoo#56032
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Currently, when creating the employee it will generate traceback
due to blank list of ids in query from method _get_remaining_leaves.
So in this commit, Fix the issue and do not do the query if the employee
id is False. so it should not raise the issue while creating the employee.
closesodoo/odoo#56205
Taskid: 2283753
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, when you create a employee when hr_aattance is installed
then it will create traceback due to falder timiezone
so in this commit, Fix the issue and if timezone is not set on
employee then pass the 'UTC'
TaskID: 2283753
Currently, when creating job postion from config menu then
it will generate the traceback of key error.
So in this commit, If job id found in result then assign the
documents_ids of that job else set the false.
TaskID: 2283753
Currently, Due to _compute_phones method when going to read
the work_phone and mobile_phone from salary configurator then
it will randomly failed on read access right for those two fields.
So in this commit, Defined the _compute_phones method properly and
remove the compute from mobile_phone as it's not computed anymore.
TaskID: 2283753
Closes: #56205
Task 2005940
account:
* Use stored compute methods instead of default for
{out,in}bound_payment_method_ids
* Track is_move_sent in the chatter
* Split 'Invoices' and 'Bills' in the smart button of payment form
* Because account.payment.method can be shown on the res.partner form,
we need to relax the security level to readonly for all users
account_check_printing:
* Add the preferred payment method for partners, with a related on
account move allowing to do a group by and doing payments in batch
* Add a constraint to forbid twice the same check number in the same
journal
* The amount in words is now readonly to prevent typos and mismatches
with the amount in digits
* Remove the field `check_number_int`. The check number is kept as Char
so that '000012345' is not displayed (and printed) as '12,345' but it
is parsed so that comparison and incrementation are possible.
closesodoo/odoo#56179
Related: odoo/upgrade#1669
Related: odoo/enterprise#12527
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
- added a line with company address on top of invoice address to be DIN compliant
- added country to din address
- css improvments
Task ID: 2214336
closesodoo/odoo#56111
Signed-off-by: Josse Colpaert <jco@openerp.com>
Before this commit, on the sale order lines, the field `json_forecast`
displayed a value for line linked to a move line or a picking.
Now it will at least display the `qty_delivered` value.
This section exists separately to make the distinction between devices
connected via IoT box vs. connected directly.
closesodoo/odoo#53189
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit fixes a typo in the `app_icon` field's definition preventing
it from being properly stored in the database when recomputed.
closesodoo/odoo#56240
X-original-commit: e885ac19f53b53a51f1fc806ff75ee917440e56f
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
the search for sequence include a criteria `date_trunc('year', date) =
date_trunc('year', '2017-10-01'::date)` Which is translated by query
planner in `date_trunc('year'::text, date::timestamp with time zone)`.
As it's mutable thanks to the time zone, it's not indexable. Enforcing
the `without timezone` makes the query planner use an immutable
`date_trunc('year'::text, date::timestamp without time zone)`. As it's
immutable, it's indexable.
closesodoo/odoo#56244
X-original-commit: 70f671a32a504c6aa92fd19e38e6151c10b2325b
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Description of the issue/feature this PR addresses:
Overall barcode app improvements. Community commits primarily support enterprise level changes. Changes are:
- add a "Scheduled Date" field to batch pickings. By default this will be the earliest scheduled date of its pickings. If no pickings (or all pickings removed) => scheduled date = false unless manually changed. If the batch picking's scheduled date is manually updated, then this date will be assigned to all of its pickings' scheduled dates. If a batch picking's scheduled date is automatically set/updated (by one of its picking's scheduled date being changed), then this date is **not** set for its pickings' scheduled dates. This change supports an Enterprise PR change.
- make src/dest package for move lines visible in batch picking form
- add "Put in Pack" button to batch form view, including wizard to handle conflicting destination locations. Purposely leaves off "Shipping Package" wizard due to complexity in checking for non-conflicting carrier_ids as well as due to this feature not currently being used often. This change supports an Enterprise PR change. To support this, `stock` and `delivery` also updated to use newer naming convention `put_in_pack` => `action_put_in_pack` for consistency
- rearrange settings layout for inventory to have a separate barcode section for easier addition of barcode app specific settings. This change supports an Enterprise PR change.
- make location and picking type barcode reports the same both for consistency and for combined report use. This change supports an Enterprise PR change.
- minor fix where barcode SN/Lot column was not being respected by lines without a SN/Lot in batch picking report.
Task: 1884520
Enterprise PR: odoo/enterprise#12086
Upgrade PR: odoo/upgrade#1569
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#55096
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit makes it so when a stock_picking_batch report with 1+
SN/lot values assigned is printed, then the rows without a SN/lot value
will properly align the rest of its values afterwards (i.e. keep
product barcodes from printing in Lot/SN column).
Discovered during overall barcode improvement task.
Task: 1884520
Closes: odoo/odoo#55096
Creates a generic barcode template that prints the record name + its
associated barcode (if it exists). Generic template is a combination of
previously existing stock.picking.type and stock.location barcode
reports.
Updates stock.picking.type and stock.location barcode reports such that:
- they have a title (for clarity when combining them in the same pdf)
- they use the same (newly created) generic barcode template for an
aligned look
Also adds some formatting changes (proper indentation for legibility).
Supports a review comment of overall barcode improvement task
Task: 1884520
Enterprise PR: odoo/enterprise#12086Closes: odoo/odoo#55096
This commit moves the Barcode Scanner setting from the "Operations"
section in stock to a new "Barcode" section. This move is to support
additional barcode settings when barcode app is installed. Some
re-arrangement of additional "Operations" settings from sale module is
also done to help with layout (i.e. large blank space).
Supports "8. No touch: keyboard shortcuts" of overall barcode
improvement task.
Task: 1884520
Enterprise PR: odoo/enterprise#12086Closes: odoo/odoo#55096
This commit sets up the logic and adds the button for "Put in Pack"
action that already exists in stock.picking. Reuse/extension of logic
from stock.picking reused where possible, including extension of pack
wizard to handle products with different destination.
Note that logic to handle "Delivery Packaging" wizard when "Delivery
Methods" is active was purposely not extended to work correctly in batch
pickings due to complexity of adding in a new module just to handle
conflicting carrier_ids across pickings in the same batch. It is
expected that this use case will not occur except in case of user error.
Additionally, stock.picking implementation of 'put_in_pack' method has
been renamed to 'action_put_in_pack' to have consistent naming (and
support enterprise level code).
Part of "1. Improve Batch Pickings" specification of overall barcode
improvements task.
Task: 1884520
Enterprise PR: odoo/enterprise#12086Closes: odoo/odoo#55096
This commit adds the source and destination package fields to the form
of batch stock pickings.
Part of "1. Improve Batch Pickings" specification of overall barcode
improvements task.
Task: 1884520
Related Enterprise PR: odoo/enterprise#12086Closes: odoo/odoo#55096
This commit adds a "Scheduled Date" field to the batch pickings. Logic
behind this date is a bit tricky:
1. If "Scheduled Date" is edited directly in batch then this date will
also be applied to all of its picking's "Schedule Date"s.
2. If "Scheduled Date" is not edited directly in the batch, then this
date will be the earliest date of its assigned pickings and pickings
will maintain their original scheduled date' including if picking
scheduled date is changed.
3. If "Scheduled Date" is not edited directly and all pickings are
removed or there are none then date will default to no date.
First cut of test for scheduled_date logic has also been added. Update
will be needed for testing onchange logic since it is currently not
supported by the tests.Form due to M2M widget used with O2M picking_ids
(M2M widget is used for when doing a "Add a Line" transfer to a batch
in backend).
Additionally this commit adds the 'scheduled_date' and 'operation_type' to
the kanban view.
Part of "1. Improve Batch Pickings" specification of overall barcode app
improvements task.
Task: 1884520
Enterprise PR: odoo/enterprise#12086
Upgrade PR: odoo/upgrade#1569Closes: odoo/odoo#55096
Field `workorder_ids` occurs twice in production form view.
Field `production_id` should not be in subview of `workorder_ids`.
closesodoo/odoo#55995
Related: odoo/enterprise#12452
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Consider models `M` and `L`, with a one2many field `M.l_ids` with
inverse `L.m_id`. Consider also a computed field `L.foo` that depends
on `L.m_id`.
The field `L.foo` is not computed correctly by `onchange` on a new line
in the form view of `M`: its value is forced to `False` because it has
no default, and is not recomputed by `onchange` since the field `L.m_id`
is never triggered an `onchange`.
Modify the method `onchange` to not force fields without a default to
`False`, and return all fields.
This commit adapts the BasicModel to combine calls to `default_get` and
(first) `onchange`. When creating a new record, we now only call
`onchange`, which thus return default values and potential onchange
values.
Tests (and the MockServer) have been adapted accordingly.
NOTE 1. If the `default_get` within the `onchange` returns a value for
a field that is not in the view, we ignore it, and it won't be saved.
Before, that value was kept and sent upon save. This change in behavior
may prove problematic, although the overall risk is small. Decision has
been made to keep heavy comments and code snippets if we were to revert
back somehow to the previous situation.
NOTE 2. Putting a context on a many2one field may change the value
returned by `name_get` for that field. By default, the calls to
`name_get` are done by `onchange`. If the context on a field must be
used for `name_get`, one has to set the option `always_reload` to `True`
on the field. In that case, every `onchange` that changes the value
will trigger an extra `name_get`.
NOTE 3. Suppose that a one2many field has a list view with field A, and
a form view without field A. When adding a line, we now send all known
fields (main view and inline views) to the `onchange`, which may return
a default value for A. The value will appear on the list view, but not
in the form view. The former behavior was to call `default_get` with
the fields that occur in the form view only, and therefore field A would
be left to value `False`.
NOTE 4. A test surprisingly adds an extra call to `read`. The test was
actually wrong before. With the changes in MockServer, we now correctly
receive a command `[6, false, [1]]`, whereas before we received `[1]`,
which isn't a valid command, and which was ignored. As a consequence,
an extra `read` is done, whereas the test asserts it shouldn't. But it
already didn't work before (I checked by sending the correct command).
This needs to be bugfixed elsewhere (task-id-2323491): in a o2m with a
onchange and default order records on an other page than the first
should not trigger a `read`.
Task 2261084
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
When creating a new record, the client calls `default_get()`, completes
the returned values with `False`, and calls `onchange()` to apply the
onchange to the defaults.
Optimize the double round-trip by integrating `default_get()` inside
`onchange()` for the first call. The method is called with an empty
list of fields, and usually no field values, except for records in a
one2many field. In this case, `onchange()` does both steps above.
Task 2261084
When ePOS couldn't connect to the configured printer, an error occured
right before showing the error message. The POS then showed a random
traceback instead of the clean error message.
closesodoo/odoo#56242
X-original-commit: 5ea25f753b55d52b5f1d9f41456577f58ada4465
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
When you hover on the "Start Typing" text in autocomplete dropdown,
it will not visible as its CSS overwrite with the rule and change the text color
as white.
With this commit, we have added the css rule for specifically "Start typing"
dropdown item and its looks consistent as other dropdown items.
Task : 2311983
closesodoo/odoo#56233
X-original-commit: ee8739361830981539127b269363a6fcbfcd840c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
PURPOSE
Allow users to display tracks that have not been scheduled yet. In tracks list
they should be displayed to allow generating much hype about those.
SPECIFICATIONS: NOT SCHEDULED TRACKS
Some customers announce their tracks before giving them a date.
As tracks pages are based on date, they are currently not displayed.
Add an 'Coming Soon' section in tracks list with tracks not having a
date. This is displayed below day-based tracks display.
Now that we support displaying tracks without date, various fixes
are also applied to various places where date is used.
UPDATE
* website_event_track_session.event_track_content
* website_event_track_session.tracks_display_list
* website_event_track_live.tracks_display_list
LINKS
Task ID-2323246
PR odoo/odoo#56180
X-original-commit: ab70df2670ed67929ee53af00a5dbc7d0b246589