Commit Graph
69 Commits
Author SHA1 Message Date
William Henrotin c146c7d16f [REF] *stock*: rename model stock.location.route into stock.route
Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin 6a23b9bcd6 [REF] *stock*: rename model stock.production.lot into stock.lot
Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:05 +00:00
wan fa034b2a64 [IMP] *: product back2basics 15.0
Rework the whole view, generally.

task-2605931

Part-of: odoo/odoo#75862
2021-09-07 15:50:00 +00:00
Tiffany Chang (tic) 311b6915b0 [IMP] mrp(_account): clean/add demo data
Clean up of some demo data that was referring to old demo data
names/prices. Also add extra demo data so we can have some
stock.valuation.layer values and some data points for enterprise
level reports.

Part 3.3 of task: 2440068
ENT PR: odoo/enterprise#20169

closes odoo/odoo#74951

Related: odoo/upgrade#2727
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-08-26 11:34:36 +00:00
Rémy Voet (ryv) 37136f7149 [FIX] mrp: fix demo data for operation
Since df312153d4,
the `worksheet_type` default become 'text' instead of PDF. Then,
update the demo operation to show pdf instead of empty text.

task-2523601

closes odoo/odoo#70463

X-original-commit: 722fba2313bae3f2825492a3822111bbb25332b7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-05-06 10:34:11 +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
Thibault Delavallée 03c4eae63b [MOV][IMP] mrp, repair: reorganize qweb / jinja templates used for mailing
PURPOSE

Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.

SPECIFICATIONS

  * move those templates in their own file to ease their discovering and
    maintenance;
  * put them into data (as those are not views even if it contains qweb)
  * guidelines are now :

    -> Qweb templates should be in data/mail_templates.xml;
    -> mail.template records should be in data/mail_template_data.xml;

  * put their declaration in no update when not done if template has no
    technical code or complex dependency on underlying code;
  * move found mail data (mail.message.subtype or mail.activity.type) records
    in a mail_data file that should contain only "core" records linked to mail;

LINKS

Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
2020-11-25 12:31:09 +00:00
svs-odoo acb6a15856 [IMP] mrp: table demo data
Renames the "Table (MTO)" into "Table" and adds it a reordering rules
with 0 as min and max qty.

X-original-commit: b96b72c24aa80b9cdcfc2ebaf54438f3af6b1d9e
2020-08-27 13:34:56 +00:00
svs-odoo 1ae94567fb [IMP] mrp: demo data
- Adds a MO for Table Top (2 units) to have a link between a consuming
  and a replenishing MO in the new product forecast report.

- Generates finished moves for the demo data MO, so they can be retrived
  by the forecast report.

- Changes date planned for the Table MO, so it will be planned after the
  Table Top MO.

- Calls the `action_confirm` on the MOs in batch.

task-2058495

X-original-commit: d6b0c3dcfb2f9f926cef1d22c96e4f09afe0d6c8
2020-08-27 13:34:54 +00:00
Anousone Phaysomphot a2d3cc7d07 [IMP] mrp: add new digest tips
PURPOSE

Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.

SPECIFICATIONS

“Use tablets in shop to control manufacturing”

See code for specifications.

LINKS

Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139

X-original-commit: 40100145e5bc8b2588b04b849a2c2cc306e126d3
2020-08-12 12:23:00 +00:00
William Henrotin 36c8b93e08 [FIX] mrp: create finished moves in demo data
The Table (MTO) production hasn't its finished moves created in the demo
data. This lead to the impossiblity to mark as done the production
order.

Task : 2278147

X-original-commit: d6e20db6f6b372707a67ec63d71a1c2737511765
2020-07-03 11:22:15 +00:00
Arnold Moyaux 556a905166 [REF] mrp: byproduct onchange
Create the byproduct moves at the onchange.

task-2241471
2020-06-15 16:59:41 +02:00
Arnold Moyaux 182f1b8e26 [REF] mrp: workorder onchange
Create the workorders at the onchange when setting the bom and not a
"plan" anymore.

task-2241471
2020-06-15 16:59:41 +02:00
Rémy Voet (ryv) 5011ec520c [REF] mrp: review consumption allowing
Now, by default, a Bill of Material have a flexible
consumption instead of strict consumption. Also
add new consumption choice: a flexible consumption
but with a warning when the bom isn't respected.
Also, now, the strict (a new warning option) consumption
is checked only when we try to mark as done the MO.

task-2241471
2020-06-15 16:59:41 +02:00
William Henrotin 0e2765f5fd [REF] mrp: no more produce wizard
Use a view similar as the pickings one.

task-2241471
2020-06-15 16:59:41 +02:00
Simon Lejeune c660770ebd [REF] mrp: remove routing model
Set the operations directly on the Bill of Material.
Duplicate the demo data where a routing was shared.
Adapt the tests.

Remove the following feature:
    - set the same routing on parent and kit child bom
    - when planning, if the component of the kit have the same operation
      than a component of the parent bom, merge these operations

task-2241471
2020-06-15 16:59:40 +02:00
svs-odoo 4a93f93e40 [IMP] mrp: plan work order in demo data
Confirms and plans the manufacturing order created for table (MTO) in
demo data to have already a work order.

task-2199747

closes odoo/odoo#46464

Related: odoo/enterprise#8922
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-26 11:44:56 +00:00
svs-odoo 565379033c [IMP] mrp: make Table Kit as consumable
Task #1970460
2020-03-26 11:44:56 +00:00
svs-odoo 2589d66c62 [IMP] mrp,stock: tracked product always have SN/LN
Before this commit, some tracked product quantities didn't have a SN/LN.
To avoid some issue at the use, it's better all demo data fulfill
requirements like that.

Task #1970460
2020-03-26 11:27:45 +00:00
svs-odoo a05b21d74b [IMP] *: remove sublocation for demodata
Demo data product's quantities are no more put in sublocation as by
default, multilocation aren't active.

Also, adapts `test_location_usage` because as we moved quantities from
sublocations to the main stock location, the stock warehouse will have
reserved quantity due to a backorder created by demo data.
In this test, we try to change location as a scrap location, what we
can't do if this location has some reserved quantities.

Task #1970460
2020-03-26 11:27:45 +00:00
Rémy Voet (ryv) 4246e5b5b0 [IMP] mrp: improve small details of WO views/model
- Now, the fields date_planned_start and date_planned_finished is
required in views, because it was strongly related to the leave date_to, date_from
which are required.
- Change the name_get in case of single WO in MO and replace the dot
by a dash.
- Improve the WO form view to be more responsive when it is open from the
gantt view.
- Change name of a Operation in the demo data

task-2169447
2020-01-22 12:31:40 +00:00
Simon Lejeune 96406dc2a9 [REF] mrp: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

Make sure unbuild have proper sequence for each companies.

The produce wizard and workorders company is the one of the production.
The BoM line company_id is the one of its bom_id.
Added some tests.

task-1985992
2019-09-03 15:05:03 +00:00
Hetal Dhanak 03abe6b4ae [IMP] mrp: update demo data
Removed "Assembly station 1" from everywhere and replaced it
with "Assemmbly Line 1". Renamed "Assembly station 2" to
"Assembly Line 2".

Task-1943397
2019-08-23 11:06:10 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +00:00
Christophe Simonis cf51b5f25d [MERGE] forward port branch saas-12.3 up to 793933a128 2019-06-25 14:23:48 +02:00
Christophe Simonis 78b2063b29 [MERGE] forward port branch saas-12.2 up to 8747d72f1e 2019-06-21 15:16:54 +02:00
Christophe Simonis be780012bf [MERGE] forward port branch 12.0 up to 0e72b983c3 2019-06-21 11:06:04 +02:00
Goffin Simon 413c8c4d85 [FIX] mrp: Manufacturing routes all get reference 'New'
When creating a manufacturing route in 2 companies in a multi-company environment,
only the routing 's reference of 'My company' got a sequence but the routing 's reference
of the other company stayed 'New'. Now the default sequences for mrp.routing are shared
between companies like SO and PO.

opw:2008570

closes odoo/odoo#34169

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-06-17 08:14:18 +00:00
svs-odoo cc9324f740 [IMP] *: usability of Inventory Adjustment
Change the use of Inventory Adjustment, notable changes are:

    - Removed filter field: When user creates a new inventory
    adjustment, he can set one or multiple locations and/or products.
    An inventory adjustment will worry only about defined
    locations/products, but if neither product or location was set,
    it'll manage all stock.

    - Inventory Adjustment Lines have their own view instead of be
    listed on the Inventory Adjustment form view.
    Inventory adjustment lines have new color legend:
        - Red: The quantity is outdated.
        - Blue: There is difference between the on hand quantity and the
        counted quantity.
    New inventory lines created by the user are written in bold.

    - User can't modify already existing inventory lines, except for the
    counted quantity.

    - When an inventory line is outdated, the user has the possibility
    to select and update it, that'll recompute the on hand quantity.

    - When an inventory adjustment is validated, it will take in account
    only the difference between the theoretical quantity ('On Hand
    Quantity') and the counted quantity to adjust the quants.

    - When an inventory adjustment is canceled, it will keep its
    inventory lines and won't regenerate them when re-started.

    - When an Inventory Adjustment generates Account Moves, user can now
    find them in a stat button in the Inventory Adjustment form view.

Also, made some changes in demo data to match new requirement.

Task #1935921
2019-05-29 14:03:29 +00:00
William Henrotin 19a5780dd1 [IMP] mrp: allow create component in demo
This commit ticks the 'Create component lot' checkbox for
the demo manufacturing operation type of first warehouse.
This change will leave the default behaviour for all warehouses
but tests with demo data are now more straightforward and do
not demand too much parametrization

Task : 1970450

closes odoo/odoo#32772

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-19 12:16:54 +00:00
Arnold Moyaux a4c0994cf4 [REF] mrp: byproduct as a workorder line
Technical refactoring in order to set by-products the same way
than raw materials. Before this commit byproduct were always set
at the last workorder or automaticaly set at the end of produce
wizard with the same quantity than in the BoM. In order to modify
it, the user has to produce the finished product then unlock and edit
the finished move line linked to the byproduct. In this commit, the
user could specify at which workorder the byproduct is created and
he could directly specify another quantity done in the produce wizard
inside a specific tab for by-products.

Technicaly, abstract workorder will add a new many2one key on workorder
line in order to set 2 different one2many (one for finished goods and
the other for raw materials). The key is set depending the many2one
key for production on the linked stock move. On the by-products itself,
it is now managed as a workorder line, thus the code to generate them
and transform them in a finished stock move line is the same than for
the raw components.
2019-04-12 12:50:34 +00:00
William Henrotin 199bb65b42 [IMP] mrp: rename final_lot_id
Commit 5ef46664a2 share code between produce
wizard and workorder. Field final_lot_id is now commonly used but not very
well named. This commit rename it into finished_lot_id as it represent the
lot number of the finished product.

Task : 1998064

closes odoo/odoo#32761

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-27 07:45:07 +00:00
William Henrotin 291eb73ce1 [IMP] mrp: flexible component consumption
Purpose: The quantities to consume on Bill of Material lines should be
either strictly used or be taken as a reference more or less adjustable.

This commit adds a setting on BoM to specify if the consumption is 'strict'
or 'flexible'. This new option has the following impacts:

   On produce wizard: if consumption is set to 'strict', the done quantities
   are prefilled and checked when saving the wizard. If set to 'flexible',
   the production flow remains the same as present one.

   On workorders: if consumption is set to 'strict', the Validate button
   will save the consumed data, and propose to fill the remaining ones until
   the total is registered. If set to 'flexible', two button are displayed.
   'Validate' to register the current component and pass to next step either
   the quantity to consume is complete or not, and 'Continue Consumption'
   to registered the current component quantity but leaving the user the
   possibility to add more quantity (and possibly another lot number) for
   the current component

This commit also revert partially d3617fd852
as the warning become some sort of an error

Task: 1889393
2019-03-27 15:16:55 +00:00
William Henrotin 5ef46664a2 [IMP] mrp: add production lines
To record a production via a manufacturing order, the user can either
use the produce wizard or the workorders views. Those two objects was
technically different but act more or less the same. This commit aims to
merge the similar behaviors in common code

We introduce two new abstract models :
 1. Abstract workorder to share workorders and the produce wizard
 2. Abstract workorder lines to share active_move_line on workorder and
    product_produce_line on the wizard. Those abstract line keep the information
    about the quantities and lot number to put on component move lines and
    finished product move lines

Task : 1891864
2019-02-01 08:13:25 +00:00
Juhil Somaiya f50bdf5cb4 [IMP] sale,stock,...: Set weight on consumable/storable demo products
This commit is related to task id: 1915274

closes odoo/odoo#29279
2019-01-30 12:59:27 +00:00
Arnold Moyaux 7206b385b5 [IMP] mrp: raw moves generation in onchange 2018-11-27 11:58:02 +00:00
Arnold Moyaux 3bb3e6a530 [IMP] mrp: add a 'draft' state to MO
The purpose is to be able to plan manufacturing order
without propagate the components's documents directly.
Except when the manufacturing comes from a pull rule, it will
be confirmed directly.

In order to do it, it will just create the moves without confirm them.
They will be only confirmed after a 'Mark as Todo' click.
2018-11-27 11:57:43 +00:00
TWA 1b7cdbe925 [IMP] mrp: Correct demo data for traceability report
Purpose
=======

The traceability report is empty because the components have not been consumed in the mo
2018-08-29 11:38:52 +02:00
Kirti Choudhary acbd7beb1d [IMP] mrp: domain on Effectiveness Category
When users create new productivity losses of type productivity or performance,
they could not be used. Only one is selected randomly. So it makes no sense to allow
that configuration.

Related to task: 58625
2018-08-20 11:14:33 +02:00
Arnold Moyaux 2e5c97c561 [FIX] mrp: remove sequence data
Warehouse's routes, locations, picking types and
sequences are now generated on create or with a post
init hook for exisiting warehouses before module installation.

Before the init hook, warehouses created before mrp module installation
do not have a specific sequence number for manufacturing and they
shared the same sequence production created in data.
2018-08-13 15:38:34 +02:00
Arnold Moyaux 1e160dffd3 [IMP] stock, mrp: picking before and after manufacturing
Currently MRP do not handle multi locations for components. In order to
be able to use both feature at the same time, we could:
- Improve mrp in order to handle multiple stock.move.line for a
componenet stock.move
- Add a rule that allow to bring all the good from multiple location to
a single location. (was already possible but it requires some
configuration)
This commit introduce a checkbox on the warehouse in order to
automatically configure all the routes/rules/locations/picking_types,...
necessary to bring all the components to a single location before
running the manufacturing order.

Technically it also refactor some stock_warehouse.py methods in order to
easily override the picking_type, rules and routes creation.

Thank to Hetashree Chauhan <hch@odoo.com> for his help.

task_id: 27785
2018-08-13 15:38:34 +02:00
Raphael Collet d5b687a48f [REF] models: import records in batch
Create new methods on `BaseModel` to create records with given xml ids in
batch.  Those methods replace the methods `_update` and `_update_dummy` of
model 'ir.model.data', which are now deprecated.

Adapt XML and CSV import code to create records in batch.
2018-07-24 16:58:14 +02:00
Darshil Trivedi 827958a890 [REF] stock: rename procurement.rule to stock.rule
This commit is related to task ID 1852969.
2018-07-19 14:43:08 +02:00
Yannick Tivisse 3031ab8f0f [IMP] mrp,purchase,pos: Improve demo data
SPECIFICATIONS
==============

PoS
---

https://drive.google.com/a/odoo.com/file/d/1BkVVQTR7V_kZpNsOO0CwqTQtxAH9boLB/view?usp=drivesdk
Add new products : Cola, Water, Orange Juice (+ images)
in internal category : All/Saleable/PoS
available in PoS

Traceability
------------

The [FURN_9666] Table (MTO) should be tracked by serial number
There should be one purchase order already received for 1 Table Top
There should be one purchase order already received for 4 Table legs
There should be one MO done for the table (consuming the products received in the PO you've created)
> The goal is to have a complete traceability report for one table
Delete SN/LN : https://drive.google.com/a/odoo.com/file/d/1cxdE-2laGYaZ2rnSFKjEbVg6k6MVyLdw/view?usp=drivesdk

Assign crm.lead to the admin user : when opening the pipe, there must be some leads and opportunities

Products
--------

https://drive.google.com/a/odoo.com/file/d/1qaO7MlufZbj7bw6z5S8DtmKPYiK0sQNK/view?usp=drivesdk
route buy should be ticked on pedal bin product

remove some ecommerce categories: https://drive.google.com/a/odoo.com/file/d/1sgIJE49BHVDcoF5CXngbJAvWb2fN_3Wk/view?usp=drivesdk
2018-07-17 17:37:42 +02:00
Fabien Pinckaers bed29a4aea [IMP] product: Unify/Clean product demo data
PURPOSE
=======

1. Unified product demo data
2. Less demo: one per use case
3. Demo data for all models

Specification
=============

1. Refactor all the brol in the demo data
2. Adapt the tests to make them green, as some products are
   renamed, removed, created in python instead of as demo data
   ...
2018-07-05 08:57:41 +02:00
dip-odoo 0cb20d2035 [REF] stock, mrp, sale_mrp: inventory validation
The method 'action_done' on inventory adjustment became private and the
action launched from the view is now 'action_validate', so we adapt
those tests to use the new function.

TASK-30921
2018-06-28 10:44:38 +02:00
Arnold Moyaux 3242fced63 [IMP] mrp: add advanced demo data for mrp
Current demo data do not have advanced configuration.
This commit provides new demo data in order to test
bom report or advanced MRP configuration with sub bom
bom with kit,...
2018-04-06 17:05:14 +02:00
XavierDo 6a378e3839 [IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.

This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
2018-02-26 14:27:26 +01:00
Yannick Tivisse 491faac5e9 [FIX] stock,mrp: Create ir.model.data with _update, not create
Purpose
=======

As the 'function' tag is re-evaluated on the module update (even when noupdate="1"), the ir.model.data will be created a second time with the function 'create'.

This leads to the record deletion after the update when calling '_process_end'.

Specification
=============

Use '_update' instead of 'create' and '_update_dummy'.

- _update won't create another ir.model.data if it already exists.
- _update already calls _update_dummy to avoid the record deletion.
2017-11-22 12:28:05 +01:00
Yannick Tivisse 4516b1b02b [IMP] mrp: Convert yml demo and data files to python 2017-11-16 14:49:05 +01:00