-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Multiple Companies or Brands #1333
Comments
The companies module was created for this purpose but the project hasn't evolved much. There aren't many users with this need, so, for the moment, it is just a starting point. I would recommend you try adding a reference field to the company module in the invoice (for example) and then create the GenDoc template to access the information of the logo and address through that field instead of using the default company. That should permit you to automatically generate the correct output depending on the company that the invoice record is related to. keep asking |
Thanks for the Reply @joebordes |
Also, Can you please let me know which special variable works to fetch the company logo? {image {image cbCompany.companylogo} |
Adding the company to the account and copying it to the invoice will work for sure. So you add a relation field on both the Account and the Invoice and then you fill in the company field in the invoice with the field from the Account. That will work. Getting the company from the Account in GenDoc should be possible also using the foreach directive |
ok sounds good @joebordes . {image {image cbCompany.companylogo} |
Apply this change and then define the image as shown in this template: Let me know how it goes |
@joebordes |
almost for sure there are formatting issues in some tags, that is a pain, but it is how it works. try using the debug output in the direct access to Generate Documents, see if that gives us some clue. If you can share the template also I can give it a try |
I don't think it is a formatting issue. Every time I use {image cbCompany.companylogo} the pdf doesn't ever open and it gives me the error. |
even trying to use the {ifexists} Directive, it doesn't work. I am basically trying to tell it to show the logo A if the connected company is Company A and show logo B if the connected company is B. {ifexists cbCompany=cmp-0000001} OR {ifexists cbCompany.cbcompanyno=cmp-0000001} None of these work. I am pretty much stuck figuring this out as none of the ways are working. |
The template I sent you uses That said, I suppose you have a uitype 10 field related to cbCompany in the Invoice which is the one you want to use for your template. Right? I did that and your template worked. |
ifexists directive is looking for related records in the related list, it just looks if a record with that condition exists in the given module, so if you actually have those two records in your coreBOS, cmp-0000001 and cmp-0000004, related to the record, both conditions will work always. But that would require a related list, not a uitype 10. The syntax In short, this is not what you are looking for. Add the uitype 10 |
Tried this: {Organization.companylogo} and it still doesn't work |
also, I definitly don't understand what you mean by uitype 10 |
see if this helps: https://youtu.be/MrSZEia2Ftc |
pull before you try again, I left a debug message which breaks the output |
Thanks for the video @joebordes. I do everything based on your instructions. {image cbCompany.companylogo} is still shown blank. I also tried creating a custom field for an image in the companies module and did both companies the same image size as the substitute image size. Refer to the SS Below but this is what I get in the output: |
at this point, I can only offer a support ticket so we can connect to your installation and see what is happening. Contact me if you are interested. |
Hi.
I see there is a companies module. I am trying to create 2 different brands that will be under the same company but will need to show different information in the documents. for example, if I am sending the invoice to a client under brand 2, I want it to show the Brand 2 logo, website, email etc.
How is this possible?
What is the point of the "Companies" Module in general?
The text was updated successfully, but these errors were encountered: