Announcement

Collapse
No announcement yet.

Hide Bottom panel on condition not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hide Bottom panel on condition not working

    Hello friends

    I need to lock the purchase order items from editing, after it is closed and aproved.

    For this purpose I tried to hide the bottom panel in edit mode​, using this link

    link :url/#Admin/layouts/scope=SalesOrder&type=bottomPanelsEdit&em=true,

    but the option doesn't work.

    Has anyone had the same issue?

    Thank you.
    Attached Files
    Last edited by abiaua007; 11-20-2023, 11:22 AM.

  • #2
    you should make the field itemsList read only when amount is not empty. bear in mind that the amount is calculated based on added items.
    Rabii
    Web Dev

    Comment


    • abiaua007
      abiaua007 commented
      Editing a comment
      Thanks I will try it.

  • #3
    Hi your sugestion is ok for one line, but it doesn't lock new lines insertion. I think that is possible to hide on edition because we have that option. But I had no luck on making it work. (bottom panel items edit)
    Attached Files
    Last edited by abiaua007; 11-25-2023, 12:34 PM.

    Comment


    • #4
      what do you mean for one line ? if you make the field itemslist readonly based on certain condition then you can't edit the itemlist.
      Rabii
      Web Dev

      Comment


      • abiaua007
        abiaua007 commented
        Editing a comment
        Success.
        I've edited the salesorder.json and removed

        "layoutDetailDisabled": true,

        from

        "itemList": {
        "type": "jsonArray",
        "notStorable": true,
        "layoutDetailDisabled": true,
        "layoutFiltersDisabled": true,
        "layoutListDisabled": true,
        "view": "sales:views/quote/fields/item-list",
        "templatePlaceholderDisabled": true,
        "reportDisabled": true
        },
        then I had the option visible.

        Thanks a lot.
        Last edited by abiaua007; 11-25-2023, 09:07 PM.

      • rabii
        rabii commented
        Editing a comment
        that is not upgrade safe. it is better to create a custom salesorder.json and edit the field itemList there.

    • #5
      Before and after.

      The logic doesn't start with the application.
      To make it work, is necessary to change status to something and back to complete, then save.
      But if refresh the page (f5) the logic is gone again.
      I need to open one/any salesorder, change status to 'something' and back to 'complete', and the logic is ok again.
      Attached Files
      Last edited by abiaua007; 11-26-2023, 05:46 PM.

      Comment

      Working...
      X