[Vtigercrm-developers] Add custom field to accountbillads table

Renan Paiva renan.paiva at mobibytes.com.br
Fri Feb 24 19:08:12 GMT 2023


I'm absolutely with you.



-----Original Message-----
From: vtigercrm-developers-bounces at lists.vtigercrm.com <vtigercrm-developers-bounces at lists.vtigercrm.com> On Behalf Of Alan Lord
Sent: Monday, February 20, 2023 5:36 AM
To: vtigercrm-developers at lists.vtigercrm.com
Subject: Re: [Vtigercrm-developers] Add custom field to accountbillads table

Addresses are really messed up in vtiger - a throwback to the original Sugar CRM.

Almost every module that contains addresses has a different naming structure for the address fields, uses different tablenames and is hardcoded all over the place, both in the client-side javascript and in some of the server-side class files.

Over the years I have requested that we create one single "address" 
module. This should then be relatable to whatever modules you need and would then allow you have none, one or as many addresses as you like per record. As well as simplifying the code considerably, it would also help to reduce data duplication (think Contacts with same address as parent Organisation, Quotes, Invoices etc... all could use the same address
record) - i.e. 3NF[1].


Anyway - for the "copy address thing to work, you will need to modify client-side code such as this:

https://code.vtiger.com/vtiger/vtigercrm/blob/master/layouts/v7/modules/Accounts/resources/Edit.js

And on the server-side you will find stuff like this in a few places as I recall...

https://code.vtiger.com/vtiger/vtigercrm/blob/master/modules/Accounts/models/Record.php#L80

HTH

Al

[1] https://en.wikipedia.org/wiki/Third_normal_form

On 18/02/2023 19:15, Renan Paiva wrote:
> I’d like to have the functionality of copy address working on this new 
> field, because I need add for billing and shipping.
> 
> My intent was custom the minimum as possible.
> 


_______________________________________________
http://www.vtiger.com/



More information about the vtigercrm-developers mailing list