Cost Engine/Case IX

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
Note.gif Note:

This Use Case is based on Libero's Cost Engine/Testing for Mandatory Attribute Set Instance.

Testing Goals

  1. Setting a product to mandatory Attribute Set
  2. Assigning it to a Purchase OrderLine
  3. Test complete the PO and Material Receipt
  4. Test Invoice Receipt
  5. Test non-invoiced receipt reversal

Transation Input

Two new input details are introduced into the Costing Steps For table:

  • Attribute Set?
This will call on a method to make the Apple product having a PatioSet attribute set, and PatioSet is made mandatory.
  • Get Attribute Instance?
This will call on a method to generate a new Attribute Set Instance for Apple product (or any other product as defined in the test below).

Testing Steps

  • Similar to the previous steps, the only difference here is that during Purchase Order, the test shall detect the presence of a mandatory Attribute Set attached to the Product and assign its Instance ID to the OrderLine.
  • During Material Receipt of the Purchase Order, its ReceiptLine also stores the Instance ID.
  • The final goal of this test is to detect if the Receipt created can be reversed without error and its costing details accurate.

Output Results

Reversal of Purchase and Receipt of a mandatory Attribute Set Product
Transaction Valuation Report in PDF format
Inventory Valuation Effective Date Report in PDF format

Methods

Attribute Set?

  • We need to make an Attribute Set mandatory so that it will effect during Purchase Order creation an accompanying set instance for each items purchased. Such set info contains serial number and will also be stored with the inventory in Storage and Costing records.
  • The Atribute Set sample used here is PatioSet which is record-id 102.
Apple product assigned PatioSet made mandatory

Get Attribute Instance?

  • This will fetch a new instance to fulfill the mandatory requirement. Otherwise the CompleteIt() function during Purchase will fail.
  • This successfully replicate the pop-up box which is done manually by the user during actual PO transaction.
Generating a new Attribute Set Instance for Apple product

OrderLine / ReceiptLine

  • The Purchase will exactly fail at its OrderLine if its Attribute Set Instance field is not fulfilled by the instance ID obtained.
OrderLine set Attribute Set Instance generated above
ReceiptLine set Attribute Set Instance generated above

Code Commit