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
Before this commit:
Once the push notifications have been blocked, click on 'My Profile' displaying
preferences warning twice with a different place inside the form after https://github.com/odoo/odoo/commit/328f6dbc984312049e94413fe9a46284cffcb3cb
After this commit:
A preferences warning will be displayed at the proper place by removing the
primary mode from inherited view and add priority to it.
LINKS
Task-2323263
closesodoo/odoo#56218
X-original-commit: 9983914e2ddc60f6bb55a97a6b6e15e1f9d940d4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit: if there are modifiers based on field which hides
one page and show another and if active page get invisible then instead
of first page second page gets focus, consider following example,
`<form>
<field name="boolean"/>
<page name="page1" attrs='{"invisible": [["bar", "=", false]]}'></page>
<page name="page2" attrs='{"invisible": [["bar", "=", true]]}'></page>
<page name="page3"></page>
</form>`
Consider the initial boolean value to be true; initially the first page
will be visible. But when "bar" is unchecked then page1 will be hidden
and page3 will get the focus as page2 is still not visible: it will be
after the computaion/application of all modifiers, which is currently
done after the rendering of a tab page.
Now: the first visible tab is focused on rendering (same as before) but
also after all modifiers have been updated.
closesodoo/odoo#56209
X-original-commit: 10365572aa3629e9b19d2b29726b351275de9f52
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Ipsita Borisagar <ibo@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
The cron to send the invoice to web-services is disabled until an edi.format that needs web services is created
closesodoo/odoo#56131
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
By adding a parameter `_table_query` on the Model, we can now have views
that depend on the context. The query is used instead of the table name
in ORM operations. This allows to pre-compute some values to improve
performance, instead of storing context values in the database.
Co-authored-by: william-andre <wan@odoo.com>
Co-authored-by: rco-odoo <rco@odoo.com>
The tooltip message on default_account in the journal is too obvious, and it has an issue
(There is no way to control the tooltip title when the field appears multiple times in the view,
it is always taking the label of the last time the field appears)
which is a limitation of the framework.
Thus, it is removed.
Fix the display of emails on the accounting dashboard, as they only should be
visible when properly set and on the purchase journal.
Improve the flow of the new bank account wizard to avoid forcing the user
to chose an existing journal when one of them exists without account.
This should still be a possibility, but the user should be able to decide
to create a new journal if wanted.
Task id #2322724closesodoo/odoo#56177
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
odoo/odoo#53938 improved the SQL linter and used psycopg2.sql to
silence the linter where that still made sense. However I forgot to
mark table names (pretty much exclusively) as `sql.Identifier` in a
few somewhat rare callsites, which consequently break when invoked as
a simple string is not a Composable and psycopg2 therefore rejects it
when composing the query.
odoo/odoo#54556 fixed a few mis-updated ones, but apparently I still
managed to miss one here.
closesodoo/odoo#56191
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Leftover from testing a post-load report of all test failures.
Intent was to provide test failure details either during or after
loading, but feature was not actually developed and I forgot to remove
this bit before merging.
closesodoo/odoo#56186
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Refactor `order_finished_lot_ids` compute, to be linked to the `lot_producing_id`
the the related production (less boiler plate). We can't remove it because
it is used in mrp_subcontracting, and keep the Many2Many, for the tag widget.
Remove the second field compute by this method, `finished_lots_exist` (never used).
- Remove unused field `needs_lots` (also it is a duplication
with `has_tracking` info) from `stock.move` (mrp)
- Remove unused field `done_move` from `stock.move.line` (mrp).
- Remove unused methods `_strict_consumption_check` and `_update_raw_move`.
- Remove unused variables.
odoo/upgrade#1594closesodoo/odoo#54996
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Issue: when we created a new operation from the MO form,
the default of the expected_duration wasn't take in account and
override to 0.0.
Fix: in `_get_duration_expected` If there isn't workcenter is set,
instead of return False, return the `duration_expected`
closesodoo/odoo#56127
Related: odoo/enterprise#12517
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
It was impossible to add a workorder after a finished one
due to a constraint in the write (can't change next_work_order_id).
Remove this obselete constraint.
task-2278147
Split completely 'non billable' from 'task rate' for more clarity.
Simplify the task form view of non-billable projects.
TaskID 2032048
closesodoo/odoo#55972
Related: odoo/enterprise#12441
Related: odoo/upgrade#1662
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In edit mode, the list_activity widget popover is not fully visible
(most of it is cut). The reason is that at some point the rule
specifying that the containing list cell should have the property
'overflow: visible' became less important than another global
rule imposing the property 'overflow: hidden'.
The present commit makes sure that 'overflow: visible' is applied on all
list cells containing a list_activity widget.
Task ID: 2305805
closesodoo/odoo#56166
X-original-commit: 115fedf30da2ca016a2e435949a18561a389d37f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>