Dolibarr: Add dictionary to set more nature for products (semi-finished, ...)

Created on 6 Mar 2020  路  4Comments  路  Source: Dolibarr/dolibarr

Feature Request

Add Nature "Purchased" and correct "RawMaterial" in Module "Product" - "Dictionaries
In the current drop list we have only 2 choice "Raw Material" and " "Manufactured Product"

Use case

In the file "Product", Nature to have "Purchased, Finished, RawMaterial"

Suggested implementation

[Verbose description]

Suggested steps

In the file : htdocs\product\card.php
=> Add "Purchased"
=> Correct "RowMaterial" -> "RawMaterial"

Line 1088 :
$statutarray = array('2' => $langs -> trans("Purchased"), '1' => $lang -> trans("Finished"), '0' => $langs -> trans("RawMaterial"));

Line 1474 :
$statutarray = array ('-1' => "&nbsp', '2' => $langs -> trans("Purchased"), '1' => $lang -> trans("Finished"), '0' => $langs -> trans("RawMaterial"));

In the file : htdocs\product\class\product.class.php
=> Add "Purchased"
=> Correct "RowMaterial" -> "RawMaterial"

Line 4578 :
if ( $this -> finished == '0' ) { return $langs -> trans("RawMaterial") };

Line 4582 :
if ( $this -> finished == '2' ) { return $lang -> trans("Purchased") };

Dictionnaries :
Add 4 lines :

en_US RawMaterial Raw Material
en_US Purchased Purchased product
fr_FR RawMaterial Mati猫re premi猫re
fr_FR Purchased Mat茅riel achet茅

I hope tp be clear,
Thanks for your help,

Regards
Sylvain

Feature request

Most helpful comment

I agree with @eldy, you can either purchase a raw material (to use it in a production cycle) or a manufactured good (to resell it directly). I also agree with you that this list should be a dictionary, and add a new standard value that is for me "half finished" (don't know the real English word).

With industrial companies I have worked with, they purchase raw material, produce half finished and finished products. And sell finished products (manufactured goods).

All 4 comments

What is the goal of adding "Purchased" on same level than nature of product. "Purchased" is how you got it (buying it), not the nature. A purchased product is always a raw material or manufactured product.
So what is goal ?

Hi Eldy,

In fact, I'm a Production and R&D guy.

For me, when you want to "Manufactured" a product, you use a "Raw Material", even if the raw material is purchased.

And in a BOM (Bill of Material), I follow the structure below :

Example 1 : Manufactured Product
.0 Product_01 (Manufactured Product)
..1 Product_02 (Raw Material)

Example 2 : Sub Assembly Product
.0 Product_03 (SubAssembly)
..1 Product_01 (Manufactured Product)
...2 Product_02 (Raw Material Product)
..1 Product_04 (Purchased Product)

I consider a "Raw Material" that is a product which will be manufactured, and a "Purchased" is a finished good.

I hope to be more clear,
Thanks,

Sylvain

I agree with @eldy, you can either purchase a raw material (to use it in a production cycle) or a manufactured good (to resell it directly). I also agree with you that this list should be a dictionary, and add a new standard value that is for me "half finished" (don't know the real English word).

With industrial companies I have worked with, they purchase raw material, produce half finished and finished products. And sell finished products (manufactured goods).

I would also like it to have a dictionary for this.

Or at least to have these types:

  • raw material
  • semi-finished / intermediate good
  • manufactured product
  • final product
Was this page helpful?
0 / 5 - 0 ratings