Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW shipment kits with dispatcher v2 #27570

Open
wants to merge 40 commits into
base: develop
Choose a base branch
from

Conversation

lvessiller-opendsi
Copy link
Contributor

@lvessiller-opendsi lvessiller-opendsi commented Jan 16, 2024

NEW shipment kits with dispatcher v2

Example

1. Create a virtual product
Virtual product '"PANIER1" contains sub-products :

  • 1 x PANIERVIDE
  • 3 x POMME1
  • 2 x ANANAS1
  • MINIPANIERGARNI (virtual product)
    image

and MINIPANIERGARNI it's a sub virtual product and contains sub-products :

  • 1 x POMME1
  • 1 x ANANAS1
    image

2. Create an order
image

3. Create a shipment
image

Then choose your quantities on each product line to prepare the shipment (see 5. to dispatch all shipment lines and children products of a virtual product)
image
image

4. Shipment
Here you can see all lines of the shipment
image

and the details for each warehouse and quantities of each sub-product as tooltip :
POMME1 P1 : ENTREPOT2 (Qty: 4)
POMME1 P1 : STOCKP2 (Qty: 4)
ANANAS1 Ananas : ENTREPOT2 (Qty: 3)
ANANAS1 Ananas : STOCKP2 (Qty : 3)

and we can edit a virtual product

  • link to "Dispatch shipment" tab (see 5. above)

and we can delete a virtual-product

  • all children are deleted (by reccurence)

5.Dispatch shipment
Here you can select each warehouse and the quantities for each line of products and sub-products
image

And then you can save all dispatched lines and validate your shipment.

5.Stock
For virtual product

  • check on all children if the checkbox "Increase or dscrease stock" (incdec) is checked (see 1.) and then dicrease the stock with the quantity dispatched for each warehouse

The stock for virtual product is not managed : movements are only for sub-products (if "incdec" is checked)

  • for "POMME1"
    image
  • for "ANANAS"
    image

The movements are only when we validate or close a shipment (see parameters of stock module)

And when we cancel or delete a shipments, all inverse movements are done in for stock of each sub-product (not virtual product)

  • example for sub-product "POMME1"
    image

  • example for sub-product "ANANAS1"
    image

Kit with batches as sub-components
In shipment details you can choose serial numbers for sub-components
image

@lvessiller-opendsi
Copy link
Contributor Author

@eldy
The field "incdec" was used for virtual products to determine if the stock of a sub-product was managed.
Since Dolibarr v19, a new field "stockable_product" has been introduced in "product" table.
Now, I wonder If "indec" must be replaced with "stockable_product" to manage stock of a sub-product ?

@eldy
Copy link
Member

eldy commented Mar 5, 2024

@eldy
The field "incdec" was used for virtual products to determine if the stock of a sub-product was managed.
Since Dolibarr v19, a new field "stockable_product" has been introduced in "product" table.
Now, I wonder If "indec" must be replaced with "stockable_product" to manage stock of a sub-product ?

Incdec is used to know if we must change stock inside the virtual product.
Stockable_product has the same meaning but for all application. So stockable product has priority on incdec if value is 0. If value is 1, we use incdec (that is a local choice for 1 virtual product).
There is still use case where we can have stockable_product to 1 but for only a particular virtual product, we want no stock change.

@lvessiller-opendsi lvessiller-opendsi force-pushed the new-expedition-kits-with-dispatcher2 branch from 26385a2 to e16daf4 Compare March 14, 2024 10:01
@lvessiller-opendsi
Copy link
Contributor Author

@eldy
The "stockable_product" is only in database structure and is not used in the interface.
The product class has no fetch method with "stockable_product" in develop branch.

@eldy eldy added the Pending analysis of PR PR needs discussion with other dev. PR set to pending status. May be debated during a devcamp. label May 25, 2024
@lvessiller-opendsi
Copy link
Contributor Author

@eldy
I don't find any CI erros on changed files.
Some errors still persist on unchanged files.
Could you have a look ?

@eldy
Copy link
Member

eldy commented Nov 8, 2024

@eldy
I don't find any CI erros on changed files.
Some errors still persist on unchanged files.
Could you have a look ?

Did you meege/ repush your PR recently ?

@lvessiller-opendsi
Copy link
Contributor Author

@eldy
I pulled today but I still have CI errors and this PR seems no to be concerned.

@lvessiller-opendsi
Copy link
Contributor Author

Now you have also the reload of lot/serial numbers when you change the warehouse (ajax)
And the "eatby" and "seelby" dates are automatically filled.
image

@fappels
Copy link
Contributor

fappels commented Nov 20, 2024

Now you have also the reload of lot/serial numbers when you change the warehouse (ajax) And the "eatby" and "seelby" dates are automatically filled. image

@lvessiller-opendsi
The text input value of the lot-number should be only pre-set when there is only one lot available, else possible other lot number are filtered out of datalist
Data list filtered to one lot:
Screenshot 2024-11-20 201711
Remove some filtering, shows complete list available:
Screenshot 2024-11-20 201638

@lvessiller-opendsi
Copy link
Contributor Author

lvessiller-opendsi commented Nov 22, 2024

@fappels
In shipment setup, now you have an option to pre-select the batch number with the earliest sell-by or eat-by date :
image

  1. If this const "SHIPMENT_SELL_EAT_BY_DATE_PRE_SELECT_OLDEST" is disabled
    A batch number is pre-selected only if there is one batch linked to the selected warehouse

  2. If this const "SHIPMENT_SELL_EAT_BY_DATE_PRE_SELECT_OLDEST" is enabled
    The batch, whose sell-by (DLC) and eat-by (DLC) date is the earliest, is pre-selected by default when creating the shipment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending analysis of PR PR needs discussion with other dev. PR set to pending status. May be debated during a devcamp.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants