Commit Graph
99 Commits
Author SHA1 Message Date
Nicolas Pierre bec3c58df3 [IMP] stock: Inventory Adjustments improvements
Improvements of the Inventory Adjustements page, among which:
 - Add a new 'Apply All' button (without the need to select a record)
 - Show the date at which the last count was done
 - Add warning icon next to duplicated SN
 - Allows to change the lot_id when empty and no quantities are set

closes odoo/odoo#78361

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-17 10:10:45 +00:00
William Henrotin f5a08bb1dc [FIX] stock: remove unused view
The quants are only displayed on list view

Task : 2555118

closes odoo/odoo#74715

Related: odoo/upgrade#2711
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-02 12:57:33 +00:00
William Henrotin 179bd67970 [IMP] stock,mrp_subcontracting: rearange quants filters
Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:33 +00:00
William Henrotin 749225db2a [FIX] stock: quants view adjustments
Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:33 +00:00
William Henrotin 8f12dbc00f [IMP] stock: merge two wizards into one
This commit merge the wizards asking for a inventory name and the one
warning the user not all quant have been set.

Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:32 +00:00
William Henrotin 79ee1ae3d2 [FIX] stock: use the same editable view for inventories and products
This commit makes sure the same view is used between the "inventory
adjustments" menu and the " update quantity" button in the product form.
The two views should always keep the same fields and buttons.

Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:32 +00:00
William Henrotin 04beff906d [IMP] stock: allow importing quants
As the inventory adjustments have been removed in favour of the editable
quants, this commit introduced the possibility to import pre counted
quants like non validated inventories back then.

task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:31 +00:00
Quentin Wolfs 7dc09981de [IMP] stock: hide product category in on-hand quantity view
The product category is not relevant here and needs to be hidden by
default (Can still be selected on the right).

Task-2428819

Part-of: odoo/odoo#74364
2021-08-31 23:35:16 +00:00
Nicolas Pierre da1ec48481 [IMP] stock, purchase: usability improvements
1. Add product category in inventory report.
2. Default quantity when creating a transfer switched to 1 instead of 0.
3. Remove the reorganize lines step in purchase tour (there is only 1
line).

closes odoo/odoo#69483

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-07 10:38:31 +00:00
Nicolas Pierre 262b49d85a [IMP] stock: Inventory adjustments improvements
General improvements of the new Inventory Adjustment mechanism, among which:

From the Inventory Adjustment page
 - A new inventory_quantity_set Boolean field is used to hide the Counted Quantity when not set instead of showing 0.
 - Possibile to set 0 as a Counted Quantity directly (not using the set button).
 - Allows to provide a name for the Inventory Adjustment when using the Apply button at the top of the tree view. This name is applied on the corresponding stock moves.
 - Add warnings when trying to Apply/Set on multiple records when some records are not set/already set.
 - Highlight lines when there is a mismatch between Quantity / Counted Quantity / Difference. If the user still tries to Apply, shows the option to either keep the current Difference or the current Counted Quantity for all records.
 - Set the user when directly inserting a Counted Quantity (before only when using the Set button)
 - Add the possibility to import records.
 - Add "To Apply" filter.
 - Add a 'Reset' button at the top of the tree view for multiple records.
From the Update Quantity page of a product
 - Remove the "Updated on Hand Quantity" and can directly change "On Hand" quantity
 - Pre-fill a default location (Last used location for tracked products or default destination location in single WH environment)
From the Inventory Report
 - Remove the "Updated on Hand Quantity" and can directly change "On Hand" quantity

closes odoo/odoo#71199

Task-id: 2495664
Pr-community: 71199
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-31 13:15:54 +00:00
Arnold Moyaux 51d612fa3c [FIX] stock: inventory adjustement for user
Fix the access for stock user to stock.quant.
Since the inventory adjustement feature has been moved on
the stock.quant. The user should be able to write on them to
make their count. However we kept that a stock user can't validate
an inventory nor modify quantities on product

closes odoo/odoo#69006

X-original-commit: 6b8d40ec494dfbcaaef0da438692c76d0088f671
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-08 17:52:44 +00:00
Arnold Moyaux bdcb3d192b [REF] stock: move stock.inventory feature into stock.quant
This commit removes stock.inventory(.line) and moves its general
functionality into stock.quant. Some features are lost during this
switch as well.

Feature Additions:
- New single list view for inventory adjustments (no more multiple
  inventory adjustment records to keep track of!)
- Improved cyclic counts (annual inventory day setting) + next inventory
  dates are immediately viewable in view (vs auto-generated inventories
  based only on location)
- Specific quants (i.e. counts) can be assigned to users for more
  flexibility (vs only able to restrict by location + product
  combinations)
- Counts can be requested (i.e. bulk assigned to user/for a specific
  inventory date)

Feature Removals:
- Can no longer look at previous inventory adjustments linked to a
  specific record. Each quant has a history button to show inventory
  related moves. [relevant account moves are also now harder to see via
  stock as well]

Other changes:
- Bulk of changes were for demo/test
- Some changes were done to ensure "Update Quantity"/"Inventory Report"
  views still mainly function the same as before with the exception of a
  new column added to support updating quant quantities in these views.

Task: 2440026
ENT PR: odoo/enterprise#17329
Upgrade PR: odoo/upgrade#2326

closes odoo/odoo#68409

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-02 11:51:38 +00:00
yhu-odoo 92e577d106 [IMP](sale_)stock,mrp: smart putaway rules
We introduced new Smart Putaway Rules.
Locations now can have a storage category, on each storage category,
we can specify the amount of products/packages(with certian package
type) that can be stored in the location.
On putaway rules, we can also set a storage category. Now when apply a
putaway rule, we will find a suitable child location of the out
location according to quantity/weight setting on the storage category.

Task 2341820
PR #63516
ENT PR odoo/enterprise#15363
UPG PR odoo/upgrade#2040
2021-03-31 09:00:40 +00:00
yhu-odoo 1cd0a138cf [REF] delivery, stock: make delivery product a new model
Currently, delivery packaging and product packaging share the same
model product.packaging. In this commit, we make delivery packaging
a new model stock.package.type. The code is also moved to stock
instead of delivery for compatibility reasons.

Task 2341820
PR #63516
ENT PR odoo/enterprise#15363
UPG PR odoo/upgrade#2040
2021-03-31 08:55:44 +00:00
Michael Mattiello (mcm) 785b304876 [IMP] *: reduce shift in form views (xml)
* account, analytic, calendar, coupon, crm, crm_iap_lead_website,
  delivery, digest, event, event_crm, fleet, gamification, hr,
  hr_expense, hr_skills, im_livechat, lunch, mail, maintenance,
  mass_mailing, membership, mrp, point_of_sale, pos_mercury, product,
  purchase, purchase_requisition, sale_management, sales_team, sms,
  stock, stock_landed_costs, survey, website_crm_partner_assign,
  website_event_exhibitor, website_event_track, website_forum,
  website_slides, base

This commit removes oe_edit_only labels and adds placeholder
on fields in form views from a lot of apps to minimize the
shift when switching mode.

task 2330101
2021-02-02 12:40:22 +00:00
nie 3962bb1c13 [FIX] board,stock: cannot add stock on hand report to dashboard
Steps:
- Install Inventory and Dashboard
- Go to Inventory > Reporting > Inventory Report
- Click Favorites
- Add to my Dashboard is missing
- Open the Favorites dropdown again
- Click Add to my Dashboard

Bug:
Error: Could not add filter to dashboard

Explanation:
This report action window is created dynamically by the server action
`action_view_quants`. The `id` isn't present, but it's not needed to
display the view. However, in order to create a dashboard item, the `id`
of an action is required as seen here:
https://github.com/odoo/odoo/blob/cfb5e6e82a773fee0342d5e0417bae4efeb7f0bb/addons/board/controllers/main.py#L16

This commit adds the ID of a new simple `ir.actions.act_window`. Reusing
`product_template_open_quants` is not possible because, when refreshing
the page, the view hasn't got any `active_ids`.

The menu item only appears after reopening the Favorites dropdown
because the frontend checks if the `id` of the action is present here:
https://github.com/odoo/odoo/blob/cfb5e6e82a773fee0342d5e0417bae4efeb7f0bb/addons/board/static/src/js/add_to_board_menu.js#L35-L40
but re-renders it every time the dropdown is closed, no matter what:
https://github.com/odoo/odoo/blob/cfb5e6e82a773fee0342d5e0417bae4efeb7f0bb/addons/board/static/src/js/add_to_board_menu.js#L50-L53

This commit also prevents the item from appearing after clicking
multiple times on the button.

opw:2426986

closes odoo/odoo#65383

X-original-commit: 9c9c4117ccc705dc47a67f659425de67e200542f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-02-02 09:04:21 +00:00
William Henrotin a55e636743 [FIX] stock_barcode_picking_batch: package view
Move package usage on the right side of the form.

Task : 2329116

X-original-commit: a9ee419a9cd3cc6f3d5649b74ad342362f803361
2020-11-30 15:25:09 +00:00
yhu-odoo f20dded993 [FIX] stock: inventory report form editable
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 #55910

closes odoo/odoo#57344

X-original-commit: 4a4e60c65049082855414941642dadce8b413475
Related: odoo/enterprise#13067
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-09 10:15:32 +00:00
Xavier-Do 1495065041 [FIX] stock, hr_holidays: fix server actions groups_id
f0d37c384b added a check on write access
for server action. Since the fixed server action are readonly with strict
access right, corresponding groups are added to avoid a warning.
2020-08-21 14:18:59 +00:00
Barad Mahendra 30adc183f8 [IMP] *: set sample="1" on reporting view archs
The purpose of this commit is to enable sample data on various graph and
pivot views.

Task ID: 2319606

closes odoo/odoo#55917

Related: odoo/enterprise#12415
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-08-18 14:24:10 +00:00
Barad Mahendra 63f239163a [IMP] *: set sample="1" on various graph archs
The purpose of this commit is to enable sample data in various
graph views.

TaskID: 2311486
2020-08-12 09:57:09 +00:00
yhu-odoo b3c8287dc5 [IMP] mrp,stock(_picking_batch): improve empty screen
1. Batch transfers: set demo data backgroud for Kanban & Tree
2. Packages: set demo data backgroud for Kanban & Tree, update the
helper message.
3. Lot/SN: improve helper message.
4. Stock inventory: use a scanner instead of the smilling face in the
helper.
5. Replenishment: Enable sample data and use new helper image.
6. mrp: Enable sample date and use new helper image for workorder.

Task 2253588
PR #54415

closes odoo/odoo#54741

X-original-commit: 7c75ec9951f6d55121d6dc8cb4942e96641b4a66
Related: odoo/enterprise#11957
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-22 08:53:36 +00:00
Jérémy Hennecart 9389f7ce2e [IMP] *: enable sample data in several views
This commit sets attribute sample="1" in a bunch of list and
kanban views, to enable the new sample data feature when views are
empty.

Task 2232801

X-original-commit: 5471309b35619f307242c2704c7681ba63d2be42
2020-06-22 13:04:02 +00:00
Yannick Tivisse 893ec20236 [IMP] various: Add date filters on search views
PURPOSE
=======

The task aims at adding date filters across various modules in preparation
for the 'time range' feature rework on task 2245719

https://www.odoo.com/web#id=2245719&action=327&model=project.task&view_type=form&cids=1&menu_id=4720

SPECIFICATION
=============

New date filters to compensate the deprecated time ranges feature:

See task's pad for the complete details

closes odoo/odoo#52398

Taskid: 2263661
Related: odoo/enterprise#10938
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-09 10:50:17 +00:00
Pratima Gupta 835dac49c3 [IMP] *: update list view
This commit adapts several views to make them use newly defined
widgets, the new decoration-xxx mechanism on fields, and to adapt
them to the new design of buttons.

used following widgets and designs -

1) decoration-bf
2) many2one_avatar_user widget
3) badge widget

Task-2248231

closes odoo/odoo#51074

Related: odoo/enterprise#10528
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-20 12:08:49 +00:00
Rémy Voet (ryv)andVictor Feyens 182604178c [REM] stock: remove unused action
- Since 096f8c56b7 , action with
id='act_product_stock_move_open' is unused.
- Since f23cc14d13 , action with
id='action_receipt_picking_move' is unused.
- Since 88b000859f , action with
id='product_template_open_quants' is unused.
- Since v10, the action with
id='stock_picking_to_batch_action' is unused.

closes odoo/odoo#45270

Related: odoo/upgrade#840
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
2020-02-25 07:48:16 +00:00
Nicolas Martinelli a0fc349f04 [FIX] stock: prevent import
Prevent import on `stock.quant` since the fields are read-only and the
ACL explicitly prevent creation and edition.

opw-2128053

closes odoo/odoo#41802

X-original-commit: 6a9e8faf567b9b0b508ba279405cb0ec80c7538b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-12 12:37:45 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Simon Lejeune 1ae66862d5 [REF] stock: products on hand action
Instead of hardcoding a domain in the action, we add a field that will
be used to apply the domain. The goal is to be able to define a static
domain in the xml so we'll be able to default on the filter while still
being able to remove it.

Let's consider this usecase:

     Physical
    |        \
   WH    Subcontracting
    |         |
  Stock    5 units
    |
 10 units

With the hardcoded domain, we have two problems
- the right part of the tree isn't visible
- the user can add a quant in subcontracting but it will disappear at
  the creation since it isn't part of the hardcoded domain.

The complicated part of the domain is the `_get_domain_locations` call.
It will use multiple context keys, the current company and get the
hierarchy of internal locations below warehouses to see what it should
include or not.

To be able to remove a domain, it should be declared in the xml and not
hardcoded in the action. Since the domain is complex, we can't express
it. So we add a computed field "on_hand" and its search method is
overiden to call `_get_domain_locations`.

task-2061825

closes odoo/odoo#40403

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-04 10:59:59 +00:00
Simon Lejeune 4afba9ee68 [REF] stock: quant: add available quantity field
available_quantity is the quantity without the reservation.

task-2061825
2019-12-04 10:40:00 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
svs-odoo 506d84a5fb [FIX] stock: quant list editable bottom
Before this commit, the editable quant list was editable by top, which
is not really pratical when the user creates (with the keyboard)
multiple quants tracked by SN because the focus always go back on the
top of the list. Now, this list is editable by bottom.

closes odoo/odoo#38743

X-original-commit: c7b069a16ae03066ed531a6b1da671ab994d0994
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-14 17:14:13 +00:00
Simon Lejeune b6f053b25e [REF] stock: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

product.template
- make responsible a property field in order to ensure proper next activities when a product
  is used between multiple companies
stock.putaway.rule
- added a company_id field
stock.move.line
- company_id is not related anymore since a move line can exist without a move until its validation
stock.package_level
- added a company_id field
stock.picking.type
- company_id is now required
stock.production.lot
- added a company_id field, adapted the constraint accordingly
stock.quant
- check the consistency only in inventory mode
stock.quant.package
- company_id is now empty if the package is empty
stock.picking
- company_id is now related to the one of its picking type

Added some tests.
Moved stock_traceability in the `report` directory.
Removed useless /tests/tours/route.js.

task-1985992
2019-09-03 15:05:03 +00:00
lbs-odoo 9a0fedfc65 [IMP] various: improve searchviews UX
Improve searchviews UX in all the modules

TaskID: 2029731

closes odoo/odoo#35700

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 13:35:21 +00:00
Prakash Prajapati 16db6d8fd0 [IMP] stock(_*): set optional field to simplify the tree view
* = stock_account, stock_picking_batch, stock_product_expiry, delivery

Purpose of the commit is to set the new attribute OPTIONAL = SHOW/Hide on tree
view so the user can easily hide/show the optional fields on the tree view.

Update string date field from incoming products tree view.

Update string virtual_available field from product tree view.

task-1997453
Closes #33888
2019-07-30 08:53:05 +00:00
svs-odoo 2edf100c8f [FIX] stock: hide lot_id on quant list
Before this commit, the field `lot_id` was hidden when useless for the
editable quant list, but was always present in the readonly quant list.
Now, the `lot_id` is hidden when appropriate in the two lists.

closes odoo/odoo#35008

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-26 12:22:34 +00:00
Arnold Moyauxandsvs-odoo ec02ca9176 [IMP] stock, stock_account: inventory at date
Usability improvement because when the user click on inventory
report it's mainly in order to edit/check its current stock since
commit da33eb36b8

This change redirect the user directly on stock.quant tree view
and add an inventory at date button in the control panel. This
button will open the same wizard than previously and ask for a
date. The same principle is used for valuation layer.

Co-authored-by: svs-odoo <svs@odoo.com>

Task: 1880379
2019-07-12 11:37:13 +00:00
svs-odoo 5b9e58321b [IMP] stock: hide quant product_id when useless
On editable list quant view, when user come from a single product (one
specific product variant, or product template with no variants), the
`product_id` field is hidden.

Task #2006337
2019-06-27 09:00:21 +00:00
svs-odoo 9a7e66bc0e [IMP] stock: hide quant lot_id when no tracked
On the editable list quant view, when user come from a non tracked
product, the `lot_id` field is hidden.

Task #2006337
2019-06-27 09:00:21 +00:00
Prakash Prajapati 92ae9687e8 [IMP] generic: add field company_id on tree view
Now that the multi company mode is much more easier to
activate, it is needed to display this information on the
tree views, to help people to know on which company is
set some records in list view.

task-1997637
Closes: #3397

closes odoo/odoo#33976

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-06-26 07:54:39 +00:00
Hiral Bhavsar 3cd7ed07a2 [IMP] *: remove 'view_type' on window actions.
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.

Task 1937686

closes odoo/odoo#31243

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-17 11:34:17 +00:00
svs-odoo e23a876a44 [IMP] stock: remove dynamically duplicate quant
Creation of a js_class: singleton_list.
It's used in the quant list view and its purpose is to avoid duplicate
line in list editable.

When user creates a new record, if the server responses with a ID
corresponding to a record already present in the view, it'll update the
old one instead of create a duplicate line.

Task #1935921
2019-05-29 14:03:29 +00:00
svs-odooandsle-odoo da33eb36b8 [IMP] stock: editable quants
Made some changes in stock.quant model to allow user to modify product
quantity easier.

To allow the edition of quant without opening more permissions on the
model, we switch to sudo in create mode and write if the conditions are
met (special key in context + access rights on the current user + write
on a specific field).
Also, we have two list views for the quant:
    - The old list view who still readonly.
    - A new list view where user can create new quant or edit quantity
    of existing ones

We display the second one if user is a stock manager.
For existing quants, user can modify counted quantity (which will modify
product quantity). User can also create new quant, in this case:
    - The quant is really a new one (ex.: new product/location
    association) so will simply create a new quant.
    - A corresponding quant already exist, so will modify the existing
    quant instead of create a new one.

When an user creates a new quant, the model will check each time a
non-quantity field (product, location, SN/LN, package or owner) is
modified to see if corresponding quant exists. In this case, it'll get
the quant ID and will update reserved and on hand quantities.
If user didn't change the inventory quantity, it'll be updated too.

On product form view, the 'Update quantity' button was removed as user
can now simply modify quant with 'On Hand' stat button.

Task #1935921

Co-authored-by: sle-odoo <sle@odoo.com>
2019-05-29 13:59:01 +00:00
Hardik Prajapati e963aaecca [IMP] stock,mrp,repair,point_of_sale: remove ability to create or edit stock location on the fly
task-1958487

closes odoo/odoo#33351

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-15 05:00:45 +00:00
William Henrotin 204a673ca6 [FIX] stock: computation of quantity on hand
On the product form view, the stat button computing the quantity on hand
doesn't give the same result as the quants list triggered by this button

    What's displayed in the stat button of the quantity on hand ?
    1 get the view location of all the warehouses
    2 built the generation tree from the view locations
    3 get all the quants for those locations

    What's displayed in the quants list of the quantity on hand ?
    1 get all the quants stored in internal locations

This commit share the same logic for those two views, by building the
generation tree for the view location then filter on internal locations

Task : 1929515

closes odoo/odoo#30501

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-18 08:37:59 +00:00
svs-odoo 761cc0d707 [IMP] mrp,stock: more consistent sml button
Set the same icon and title for stock move line buttons and change the
action of the sml button in MRP Unbuild to open stock.move.line model
instead of stock.move model.

Task #1966567

closes odoo/odoo#32570

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-15 12:06:15 +00:00
mgh-odoo f5a47e4af6 [IMP] stock: Removed forced groupBy
currently, group by is applied forcefully that user cannot change.
this commit will remove forced group by and applied as a default group by that user can change.

Task: 1910855

closes odoo/odoo#29727
2019-01-02 12:36:41 +00:00
Christophe Simonis 43b63a0465 [MERGE] forward port branch saas-11.4 up to 57e387b645 2018-10-01 16:01:54 +02:00
Christophe Simonis 57e387b645 [FIX] stock: correct quant view
Oversight of previous forward-port.
Revert 0b81117295.
2018-10-01 12:03:48 +02:00
Christophe Simonis 998723b909 [MERGE] forward port branch saas-11.3 up to e980af9df0 2018-10-01 11:27:51 +02:00