Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: order
    • Labels:
      None
    • Sprint:
      Bug Crush Event - 21/2/2015

      Description

      Copy of http://jira.undersunconsulting.com/browse/OFBIZ-889 from Si Chen.

      =======================================

      I was reading Hans's README.pdf for opentravelsystems and thought one of his ideas could be added to OFBiz. Hans had added "S" for sales orders and "P" for purchase orders in orderIds, and I thought we could set it so that OrderType can have two additional fields:

      • useStorePrefix - If set to "N", then do not use productStoreId's prefix.
      • orderTypePrefix - Someone can set a prefix for this order type.

      So purchase orders could be set to useStorePrefix="N" and orderTypePrefix="P" and sales orders could be set to useStorePrefix="Y" and orderTypePrefix=null or ="S"

      All Comments Work Log Change History Sort Order:
      Comment by Fred Forester [20/May/06 06:44 AM] [ Permlink ]
      Si,

      I was looking at how to do this the night before you posted it to jira. I may need a little more detail on where these changes would go and would be glad to do the coding for it.

      Fred

      Comment by Si Chen [22/May/06 11:08 AM] [ Permlink ]
      I was thinking about adding two more fields into OrderType entity and then in OrderServices.java createOrder service, early on, to load the OrderType based on the orderTypeId passed in and check those two fields.

      This should be pretty easy to do but I want to make sure David, Jacopo, Hans, etc. like the idea as well.

      Comment by Jacopo Cappellato [01/Sep/06 09:31 AM] [ Permlink ]
      Si,

      I like this idea. However we could slightly simplify it:

      1) add a new field OrderType.orderTypePrefix (or orderTypeId)
      2) if orderTypePrefix is null then the prefix set in the product store is used (if present)

      Comment by Marco Risaliti [13/Sep/06 04:08 PM] [ Permlink ]
      is this improvement will be implemented ?
      In this case I will move it to the new jira server.

      Thanks
      Marco

      It's a copy of the old-jira issue OFBIZ-889.

        Activity

        Hide
        Daniel Kunkel added a comment -

        Why not just have the prefix, and let it be null, nothing, or "" if someone doesn't want to use it:

        orderSalesPrefix="S" or ="" for nothing
        orderPurchasePrefix="P" or =""

        Show
        Daniel Kunkel added a comment - Why not just have the prefix, and let it be null, nothing, or "" if someone doesn't want to use it: orderSalesPrefix="S" or ="" for nothing orderPurchasePrefix="P" or =""
        Hide
        Deepak Dixit added a comment -

        Is this still valid issue?

        I think we can close it.

        Show
        Deepak Dixit added a comment - Is this still valid issue? I think we can close it.
        Hide
        Jacques Le Roux added a comment - - edited

        I don't know but at least I did not find any orderPurchasePrefix, orderSalesPrefix or orderTypePrefix in all code.
        And nothing like that has been implemented, not sure we need it OOTB...

        Show
        Jacques Le Roux added a comment - - edited I don't know but at least I did not find any orderPurchasePrefix, orderSalesPrefix or orderTypePrefix in all code. And nothing like that has been implemented, not sure we need it OOTB...
        Hide
        Divesh Dutta added a comment -

        I think we can add this improvement as per Jacopo's comment and little more discussion.

        Show
        Divesh Dutta added a comment - I think we can add this improvement as per Jacopo's comment and little more discussion.
        Hide
        Jacques Le Roux added a comment -

        Yes, why not?

        Show
        Jacques Le Roux added a comment - Yes, why not?
        Hide
        Deepak Dixit added a comment -

        I think we have support in ParoductStore and PartyAcctgPreference to set the order prefix. So IMO this is not useful now.
        And if we look at all the type entity then it does not make sense to extend OrderType entity and add field for prefix.

        Show
        Deepak Dixit added a comment - I think we have support in ParoductStore and PartyAcctgPreference to set the order prefix. So IMO this is not useful now. And if we look at all the type entity then it does not make sense to extend OrderType entity and add field for prefix.
        Hide
        Divesh Dutta added a comment -

        Deepak Dixit , ProductStore's support was available even at that time when this was discussed. I think this discussion is not about simply adding prefix in Order Ids. Its more about adding different prefix for Purchase Order and Sales Order, and we don't have support for it and many businesses might need it.

        Also how to achieve this is different discussion. We can discuss more on that. One idea is to extend OrderType entity. We can discuss more on other options. One option which I can think of is may be we can also user OrderTypeAttr table and save prefixes in this table for Purchase order and Sales order. OrderTypeAttr table is created so that we don't have to extend OrderType table.

        Show
        Divesh Dutta added a comment - Deepak Dixit , ProductStore's support was available even at that time when this was discussed. I think this discussion is not about simply adding prefix in Order Ids. Its more about adding different prefix for Purchase Order and Sales Order, and we don't have support for it and many businesses might need it. Also how to achieve this is different discussion. We can discuss more on that. One idea is to extend OrderType entity. We can discuss more on other options. One option which I can think of is may be we can also user OrderTypeAttr table and save prefixes in this table for Purchase order and Sales order. OrderTypeAttr table is created so that we don't have to extend OrderType table.
        Hide
        Jacques Le Roux added a comment -

        I did such a change to a project. I'll look what I did when I'll get a chance...

        Show
        Jacques Le Roux added a comment - I did such a change to a project. I'll look what I did when I'll get a chance...
        Hide
        Jacques Le Roux added a comment -

        OK I simply tweaked getNextOrderId with harcoded PO and SO prefixes. I considered that w/o a productStoreId the order was a PO else it was a SO. That was specific to the project implementation.

        Show
        Jacques Le Roux added a comment - OK I simply tweaked getNextOrderId with harcoded PO and SO prefixes. I considered that w/o a productStoreId the order was a PO else it was a SO. That was specific to the project implementation.
        Hide
        Divesh Dutta added a comment -

        Okay, thanks for sharing the information Jacques. What do you think on option of using OrderTypeAttr table to give this support ? Deepak Dixit , what are your views ?

        Show
        Divesh Dutta added a comment - Okay, thanks for sharing the information Jacques. What do you think on option of using OrderTypeAttr table to give this support ? Deepak Dixit , what are your views ?
        Hide
        Jacques Le Roux added a comment -

        Seems like OrderTypeAttr is a good solution indeed

        Show
        Jacques Le Roux added a comment - Seems like OrderTypeAttr is a good solution indeed

          People

          • Assignee:
            Unassigned
            Reporter:
            Marco Risaliti
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development

                Agile