public NewItemAction getAddNewAction() {
   if (!Accounter.getUser().canDoInvoiceTransactions()) return null;
   else {
     NewItemAction action = new NewItemAction(true);
     action.setType(ClientItem.TYPE_INVENTORY_PART);
     return action;
   }
 }
  @Override
  public void onEdit() {
    if (selectedItem.getType() == ClientItem.TYPE_INVENTORY_ASSEMBLY) {
      InventoryActions inventoryAssemblyAction = InventoryActions.newAssembly();
      inventoryAssemblyAction.setisItemEditable(true);
      inventoryAssemblyAction.run((ClientInventoryAssembly) selectedItem, false);

    } else {
      NewItemAction itemAction = new NewItemAction(true);
      itemAction.setType(selectedItem.getType());
      itemAction.setisItemEditable(true);
      itemAction.run(selectedItem, false);
    }
  }