You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Vitaly Repetenko <vr...@gmail.com> on 2026/04/14 12:09:16 UTC

Sales Agreement

Hi!

Is it possible to create Public Sales Agreement without From Party Id (means available for all customers) and apply it to a new customer's order?

TIA

—
Vitaly

Re: Sales Agreement

Posted by Chandan Khandelwal <ch...@hotwaxsystems.com>.
Hi Vitaly,

As per the standard OFBiz data model, Sales Agreements are generally linked
with parties, so fromPartyId is normally expected for customer specific
agreements.

For a public/common agreement available to all customers, I do not think it
is directly supported in the standard flow. It may require customization in
the agreement lookup and order entry process.
Kind Regards,
Chandan Khandelwal

On Wed, Apr 22, 2026 at 4:28 PM Vitaly Repetenko <vr...@gmail.com>
wrote:

> Hi, Nicolas!
>
> And how this agreement will be shown for any customer in order create
> form, if this agreement is for _NA_ customer?
>
> —
> Vitaly
>
> > On 22 Apr 2026, at 12:13, Nicolas Malin <ni...@nereide.fr>
> wrote:
> >
> > You can create a virtual person like '_NA_' to do that
> >
> > Nicolas
> >
> > On 4/14/26 14:09, Vitaly Repetenko wrote:
> >> Hi!
> >>
> >> Is it possible to create Public Sales Agreement without From Party Id
> (means available for all customers) and apply it to a new customer's order?
> >>
> >> TIA
> >>
> >> —
> >> Vitaly
>
>

Re: Sales Agreement

Posted by Vitaly Repetenko <vr...@gmail.com>.
Hi, Nicolas!

And how this agreement will be shown for any customer in order create form, if this agreement is for _NA_ customer?

—
Vitaly

> On 22 Apr 2026, at 12:13, Nicolas Malin <ni...@nereide.fr> wrote:
> 
> You can create a virtual person like '_NA_' to do that
> 
> Nicolas
> 
> On 4/14/26 14:09, Vitaly Repetenko wrote:
>> Hi!
>> 
>> Is it possible to create Public Sales Agreement without From Party Id (means available for all customers) and apply it to a new customer's order?
>> 
>> TIA
>> 
>> —
>> Vitaly


Re: Sales Agreement

Posted by Nicolas Malin <ni...@nereide.fr>.
You can create a virtual person like '_NA_' to do that

Nicolas

On 4/14/26 14:09, Vitaly Repetenko wrote:
> Hi!
>
> Is it possible to create Public Sales Agreement without From Party Id (means available for all customers) and apply it to a new customer's order?
>
> TIA
>
> —
> Vitaly

Re: Sales Agreement

Posted by Vitaly Repetenko <vr...@gmail.com>.
Hi, Jacopo!

Thanks a lot!

—
Vitaly

> On 24 Apr 2026, at 11:52, Jacopo Cappellato <ja...@gmail.com> wrote:
> 
> Hi Vitaly,
> 
> With respect to the data model, you could create a Party Group (i.e. a
> Party record with partyTypeId = "PARTY_GROUP" and an associated PartyGroup
> record with the same partyId) that represents the customers to which the
> sales Agreement is applicable. You should then associate each customer
> (i.e. Party record) to the PartyGroup via a PartyRelationship record with
> partyRelationshipTypeId="GROUP_ROLLUP".
> Then, you could define a sales Agreement with partyIdFrom equal to the id
> of the Party Group (i.e. "all customers").
> This should be enough to properly map your data to the data model.
> As regards the business logic, I don't remember how sales agreements are
> currently implemented, but it is possible that the code may need to be
> enhanced to select the agreements available to a given customer, not only
> selecting the specific agreements but also checking the groups to which the
> customer belongs (this could be a nice enhancement for the OFBiz codebase).
> 
> I hope this helps
> 
> Jacopo
> 
> 
> On Tue, Apr 14, 2026 at 2:09 PM Vitaly Repetenko <vr...@gmail.com>
> wrote:
> 
>> Hi!
>> 
>> Is it possible to create Public Sales Agreement without From Party Id
>> (means available for all customers) and apply it to a new customer's order?
>> 
>> TIA
>> 
>> —
>> Vitaly


Re: Sales Agreement

Posted by Jacopo Cappellato <ja...@gmail.com>.
Hi Vitaly,

With respect to the data model, you could create a Party Group (i.e. a
Party record with partyTypeId = "PARTY_GROUP" and an associated PartyGroup
record with the same partyId) that represents the customers to which the
sales Agreement is applicable. You should then associate each customer
(i.e. Party record) to the PartyGroup via a PartyRelationship record with
partyRelationshipTypeId="GROUP_ROLLUP".
Then, you could define a sales Agreement with partyIdFrom equal to the id
of the Party Group (i.e. "all customers").
This should be enough to properly map your data to the data model.
As regards the business logic, I don't remember how sales agreements are
currently implemented, but it is possible that the code may need to be
enhanced to select the agreements available to a given customer, not only
selecting the specific agreements but also checking the groups to which the
customer belongs (this could be a nice enhancement for the OFBiz codebase).

I hope this helps

Jacopo


On Tue, Apr 14, 2026 at 2:09 PM Vitaly Repetenko <vr...@gmail.com>
wrote:

> Hi!
>
> Is it possible to create Public Sales Agreement without From Party Id
> (means available for all customers) and apply it to a new customer's order?
>
> TIA
>
> —
> Vitaly