Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.25k stars 2.72k forks source link

Define lines for object in module builder #19115

Closed milenmk closed 1 year ago

milenmk commented 2 years ago

Feature Request

Add the ability to define fields for object lines in the module builder

Suggested implementation

Currently, when you create an object for a custom module using the module builder, there is a table, where you can create/edit/delete database fields for the object. In the class file, there is another class for the lines but its content is only the constructor.

If I need to create lines for this object, the best approach, for now, is either manually edit the class file, or create another object and make its name and class as "object_lines"

It will be good if we can do this for the current object i.e. have simple CRUD methods and a second table for lines with the same features/options as for the main object.

In the "objectlines_card.php" and else I think won't be necessary. However, the "object_card.php" has to be changed and if there are lines defined for the object to be able to add them to the card (like adding product/service to propale/order/invoice)

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).