-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create payment methods on entities other than 1 #32673
Comments
@atm-florianm This is not a bug, for the moment it is not possible to customize the llx_c_paiement and llx_c_payment_term dictionaries by entity because the tables of propal, order, invoice and others use the rowid and not the "code" field of these dictionaries. It would be necessary to plan a big migration to use the "code" field of these dictionaries. @eldy ? |
Don't see why having a link on id is a trouble. All other dictionaries also are linked with the id but they can be specific per entities. Code abc in entity 1 may have a different meaning in entity 2. 2 solution. Or sharinh according to sharing rule on payment mode table only. This trouble has no real good solution. Only bad with bad side effect. But i don't lnwo what is the less worse... |
when we create a new entity, some dictionaries are duplicated on this entity, these are dictionaries whose code is stored in the objects and not the id. The problem when using the id is that if we activate the customization of a dictionary in multicompany and we do not have this duplication and we use the data of the dictionaries of entity 1, if we deactivate a data of a dictionary it will be deactivated for all entities. |
I can add to have 3 possibility, 1 use only dictionary of master entity |
Thanks for your replies. In our use case, we use Dolibarr 17 and we have some custom multi-entity managed objects (let's call them "O"). We need to disable some payment methods on some entities. Historically, we stored the payment method as a code ( As part of refactoring efforts, we thought we would standardize this by using I understand from your replies that our approach may not be the best today because we don't yet have a clear path to handling payment methods by entity and there are many problems that I didn't anticipate. @eldy would it be possible to combine your 2 solutions using precedence rules ensure that dropdowns only show the same code once? like "object's entity" > "master entity" > "other entities included in the sharing"? I don't think payment methods appear in filters for lists so this wouldn't be too big of a problem, would it? |
Bug
Not sure this is a bug, but despite the dictionary
llx_c_paiement
having anentity
column, I haven't yet found a way for an admin user to create new payment modes on entities other than 1.Despite the form having a
<input type="hidden" name="entity" value="1">
, even if you override this (which, I grant you, we can't expect regular users to do), the override is overridden by this:It seems strange to use
getEntity
there because it may (depending on sharings) return more than one value, which would result in an SQL syntax error.@hregis maybe you have more information on this one.
This problem has already been reported under #25983, but not as the issue itself (only in a comment to the issue).
Also we have PR #26001 in which the
getEntity
problem was mentioned.Dolibarr Version
17.0 (but 18.0 seems to behave the same)
Environment PHP
any
Environment Database
any
Steps to reproduce the behavior and expected behavior
On a Dolibarr having several entities (but no sharings configured), go to entity 2, then go to the payment modes dictionary and add a new payment mode.
Expected: the new payment mode is created on entity 2
Actual: the new payment mode is created on entity 1
Attached files
No response
The text was updated successfully, but these errors were encountered: