Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Part 1

  1. Add following models to plugin basic:
    1. resource with fields
      1. number - string identifier of resource
      2. quantity - quantity of resource
      3. product - related product from plugin basic
    2. transfer with fields
      1. resource - related resource
      2. quantity - quantity of product in transfer
      3. type - type of transfer (incoming or outgoing)
      4. status - status of transfer (planned or done)
      5. request date,
      6. the worker who filled the request
      7. confirmation date/worker.
  2. Create views with list of resources and transfers
  3. Create view with resource details:
    1. form will contains three inputs
      • number
      • product's lookup
      • quantity - disabled, because it is set using custom action
    2. expression will be used to generate window header
    3. window header will be displayed
  4. Create view with transfer details:
    1. form will contains eight inputs
      • resource's lookup
      • quantity
      • type
      • status
      • requestWorker - disabled, because it is set using custom action
      • requestDate - disabled, because it is set using custom action
      • confirmWorker - disabled, because it is set using custom action
      • confirmDate - disabled, because it is set using custom action
    2. expression will be used to generate window header
    3. window header will be displayed
  5. Add custom action on save for transfer model - it should automatically set the transfer's workers and dates. Workers will be set using the current logged user - the one who create request will be put into requestWorker, Afterwards the one who changes the status to done will be put into confirmWorker. If transfer has not been saved (id is null) it should set requests worker and date, if transfer's status is done it should set confirmation worker and date. This action should also change quantity of the related resources, when the transfer is done.
  6. Add custom validation for transfer model - it should check if a resource has enough quantity for delivery transfer.

Part 2

...

To do:

  1. Add new model purchase to plugin basic with fields:
    • product - product from basic plugin,
    • quantity - quantity of product,
    • price - price of product,
    • date - date with time.
  2. Add validator which would check if product price is > 0.
  3. Add validator which would check if product quantity is > 0.
  4. Add validator which would check if there is no product with the same name and price.
  5. Add views for that model with list and add/edit details.
  6. Add hooks which would set default system currency in field next to price (locale chosen in framework).Add hooks which would set product unit in field next to quantity - when product changes, this field also should be updated.
  7. Add button to ribbon in purchases list or details which will count average price of all purchases or average price of product. The result can be presented in any way (for example as a simple popup or field on the view).

...

  1. Plugin developement
  2. Our coding conventions
  3. Javadoc
  4. Github repository