Adempiere - How to design/call CreateLinesFrom button in window - adempiere

I want to create CreateLineFrom form in my custom window/Table in WEBUI.
I have created CreateFrom field in my custom table and window level.
So is there any java code changes needed ?
Its already exists in Material Receipt standard window, now i want to do same thing in my custom window, so where i have to modify.

Write a process - there are lots of examples in the the org.compiere.process of the "base" module.
Create a new Process in the Application Dictionary and point it to your newly written process created in step 1.
Add a new column of reference type button to the table underlying the Window/Tab you'd like the button on and point this your new process by selecting the Process from the drop-down.
Finally add the new column created to the Windows/Tab were you need it to appear.

Related

How do I create a report with edit for every row in oracle APEX?

everyone. I am working on a Oracle APEX application. I want to create a report with edit for every row. I followed that video https://www.youtube.com/watch?v=OqqcO1JKDdM but when I created the report strangely the "Edit-pencil" button opens a create form instead an edit. Does anyone have a clue what should I do to get the edit functionality? Thanks.
I looked many videos on youtube, but when I create a report like this: Create Page -> Report -> Report with Form -> and so on, I encounter the same problem - create form instead edit form.
... strangely the "Edit-pencil" button opens a create form instead an edit.
That's the same form (you use to create a new row and edit existing one). The only difference is the link you use; for editing, you have to go to IR's attributes and set which value you'll pass to the form (that would be the primary key, most probably).

How to show and change the state in tree view

I want to show the state change field in tree view. Usually we did this in form view. For example in form view state can be changed from draft to done. I need like this type of state change in tree view also. can you give a solution to do this?
You can do it via Wizard process, In More/Action option you can create new wizard for update state.
Ex :
class test(models.TransientModel):
_name="update.state"
state=fields.Selection([('draft','draft'),('done','done')])
#api.multi
def **update_state_ept**(self)
active_ids=self._context.get(active_ids)
records=self.env[model].search(active_ids).write({'state':self.state})
You can select records from tree view and open wizard from More/Action Menu,select state & update it.
Above example is just an update state, you can put different conditions based on your requirement.
Ex: If record is draft then we can confirm it.
You can create following answer for create new wizard in more/action menu item.
How do i make and attache action to button
This may help you.

Changing Epicor ERP10 standard system code

How can I change Epicor ERP10 standard system code for Purchase Requisition Entry in the Line pane? I would like to change the Due Date from displaying current date to blank everytime making a new line. Please help me.
You can do this using Method Directives.
Here's how to add one.
Find and open Method Directives Maintenance (System Management/Business Process Management/Method Directives Maintenance)
Click on Method Code, select your business object (Req in your case).
Click on Search and select the appropriate method from there (since it is an Add Line event that you want to work with, it should look something like GetNew...Detail). Click OK.
Go to Post Processing tab and hit New on the toolbar.
Give this directive a name you like and click on Design.
Here, in the BPM Workflow Designer, scroll to the bottom of the panel on the left and drag the Set Field icon to the right from the Setters section.
Now when this Set Field... icon is selected, it should show you a table with a column called Action. The next part should be intuitive in itself, but I have gone through the steps and written it here anyways.
Select DueDate field of the ReqDetail table (under specified field section). Set it to null for the new row here.
Save and Exit.
This should do the job, or if it doesn't do exactly what you want. There's always more options in the Method Directives Maintenance section that you can fiddle around with. Good luck.

Add record with ID, selecting NAME from another table

Can anyone, please, help me with Libreoffice Base form creation?
I have the following tables:
And I'm trying to add a form to enter new RESOURCES record with the following fields: [RESOURCE_NAME], [CURRENCY_NAME] and [AMOUNT]. But after 10+ tries I have not succeeded. I have tried adding it via wizard, selecting RESOURCES as main form and CURRENCIES as subform and vice versa. I have tried VIEWS and forms based on them. These tries only gave to me or no possibility to enter new record, either creation of the new CURRENCY.
I don't need to create new currency via this form, I only want to enter new Resource (only enter once, not to modify, not to delete). Since I don't want to remember all the ID's I want to select currency name via DropDown list.
Can anyone provide instructions about how to do it, please?
Thanks.
You do not need a subform for this - just create your form document with RESOURCES as the main form (only form).
You will need a listbox to enter the currency item. A listbox has two fields, a display field and a field that is saved in the table. You will set it up to display CURRENCY_NAME and store CURRENCY_ID.
When you create a listbox, the wizard that pops up may get you what you want. If the wizard falls short:
Make sure the form document is open in design mode: on the "Form Controls" toolbar, the leftmost/topmost icon of a pencil with a triangle should be depressed. If this icon is grayed out, close your document, right-click on its name and choose "Edit".
Right-click on the listbox and choose "Control"; this will open the properties window
On the tab "Data" change the "Type of list contents" to "Sql"
In the field "List content" enter SELECT "CURRENCY_NAME", "CURRENCY_ID" FROM "CURRENCIES" ORDER BY "CURRENCY_NAME"
The Bound Field should default to 1. If it isn't 1, change it to 1.
Close the properties window and save your form. It should work as you want now.
If you want a listbox inside a tablegrid: after you create the table, with the form in edit mode, right-click on the column name you want to change and choose "Replace with" and then "listbox".
Edited to include comment by OP about bound field needing to be 1

Menu Item Type for My Component com_mycom in Joomla

I want to add a Menu Item Type for my component.
Have a look at this picture:
How can I add my component to it and add menus to it, so that when a user clicks upon them, they get added at frontEnd.
In order to create new menu item types for your component, you have to create a new xml file. To put it simple, if you want to create a new menu item type for your view "myview" and the layout "default" in you component, usually you have to create a new xml file named "default.xml" inside the folder "/components/com_mycom/views/myview/tmpl" (note the xml file has to be created in the frontend part of the component, not in the administrator).
You can take a look at other xml files, for example com_content/views/article/tmpl
I hope it helps!

Resources