iDempiere ERP: how to add Incorporating Incoterms into Sales Order Window

TrablaiDempiere ERP: how to add Incorporating Incoterms into Sales Order Window

iDempiere ERP: how to add Incorporating Incoterms into Sales Order Window


iDempiere Business Suite, also known as OSGi + ADempiere, is an open source Enterprise Resource Planning (ERP) software. It has also customer relationship management (CRM) and supply chain management (SCM) functions. It is in contrast to proprietary or most other open source ERP solutions driven only by a community of supporters. iDempiere is a winner of Infoworld's Bossie award for best open source software application, awarded in 2015 and 2016.

iDempiere ERP Official Site - http://www.idempiere.org/


Sponsored by: MM Cargo Services http://www.mmcargoservices.co.za/


Precondition: you've installed iDempiere on your PC.
If not, tutorial  here - Install iDempiere  ( OSGi + ADempiere) ERP with PostgreSQL 9.4 on Windows 7 x64 - https://codingtrabla.blogspot.com/2016/08/install-idempiere-erp-on-windows-7-x64.html

Solving:



1. Create database table in iDempiere ERP database for incorporating incoterms 

- run pgAdmin III ( PostgreSQL GUI Client ) and click on your iDempiere database

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 1

- click on "SQL" button in pgAdmin III ( PostgreSQL GUI Client )

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 2

- copy paste following SQL query to create mm_incoterms table, and click 
execute query button

CREATE TABLE adempiere.mm_incoterms
(
-- Primary Key
mm_incoterms_id numeric(10,0) NOT NULL,

-- Mandatory Fields Start
ad_client_id numeric(10,0) NOT NULL,
ad_org_id numeric(10,0) NOT NULL,
isactive character(1) NOT NULL DEFAULT 'Y'::bpchar,
created timestamp without time zone NOT NULL DEFAULT now(),
createdby numeric(10,0) NOT NULL,
updated timestamp without time zone NOT NULL DEFAULT now(),
updatedby numeric(10,0) NOT NULL,
-- Mandatory Fields End

name character varying(60) NOT NULL,
description character varying(255),

-- CONSTRAINTS Start
CONSTRAINT mm_incoterms_pkey PRIMARY KEY (mm_incoterms_id),
CONSTRAINT mm_incoterms_isactive_check CHECK (isactive = ANY (ARRAY['Y'::bpchar, 'N'::bpchar]))
-- CONSTRAINTS End
   
)
WITH (
  OIDS=FALSE
);
ALTER TABLE adempiere.mm_incoterms
  OWNER TO adempiere;

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 3

- result of executing query 
Query returned successfully with no result in 1.1 secs.



2. Update Sales Order Table ( c_order ) add reference to incoterms table ( mm_incoterms )

- copy & paste following query to add new field and constraint to  mm_incoterms
in c_order table


ALTER TABLE adempiere.c_order ADD COLUMN mm_incoterms_id numeric(10,0);

ALTER TABLE adempiere.c_order
  ADD CONSTRAINT mmincoterms_corder FOREIGN KEY (mm_incoterms_id)
      REFERENCES adempiere.mm_incoterms (mm_incoterms_id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED;


- click "Execute pgScript" button in pgAdmin III

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 4

- result of execution SQL query

[QUERY    ] ALTER TABLE adempiere.c_order ADD COLUMN mm_incoterms_id numeric(10,0)
[QUERY    ] ALTER TABLE adempiere.c_order
              ADD CONSTRAINT mmincoterms_corder FOREIGN KEY (mm_incoterms_id)
                  REFERENCES adempiere.mm_incoterms (mm_incoterms_id) MATCH SIMPLE
                  ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 5



3. Login as SuperUser into iDempiere ERP

- login / password - SuperUser / System ( default ),
enable "Select Role" checkbox and click "OK" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 6

- client / role - System / System Admin...

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 7


4. Register Incoterms Table ( mm_incoterms ) in iDempiere ERP Application Dictionary

- in Menu Search field type - "Table and Column" and press search button
and click on "New" button


iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 8

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 9

- enter data to new record
DB Table Name               -> MM_Incoterms
Name                               -> MM_Incoterms
Data Access Level          -> Client + Organization
and click "Save" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 10

- click on "Process" button,
than click on "Create Columns from DB"

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 11

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 12

- in "Create Columns from DB" dialog click "OK" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 13

- in dialog "Create Columns from DB - Process Completed Successfully"
click "OK" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 14

- result - all fields in database table mm_incoterms now are in iDempiere ERP

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 15


5. Create New iDempiere Window for Incoterms

- in Menu Search field type - "Window, Tab & Field" and press search button
and click on "New" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 16

- type Name -> MM_Incoterms  and click "Save" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 17

- click "New" button in Tab "Tab"

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 18

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 19

- enter data to new record
type Name  -> MM_Incoterms
select Table  -> MM_Incoterms_MM_Incoterms
and click "Save" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 20

- click "Process" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 21

- click "Create Fields" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 22

- in dialog "Create Fields - Create Field from Table Column ..." 
click "OK" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 23

- in dialog "Create Fields - Process completed successfully"
click "OK" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 24

- result - new fields created ( from window "Table and Column" )

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 25


6. Connect ( set reference ) Incoterms iDempiere Table to Incoterms iDempiere Window

- in Menu Search field type - "Table and Column" and press search button
and click on it

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 26

- in dialog "Lookup Record" 
type DB Table Name -> MM_Incoterms
and click "Ok" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 27

- find field "Window"

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 28


- select "Window" -> "MM_Incoterms"

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 29

- click "Save" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 30


7. Create iDempiere Menu item for Incoterms iDempiere window

- in Menu Search field type - "Menu" and press search button
and click on "New" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 31

- type Name -> MM_Incoterms
- select Action -> Window

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 32

- after selection Action->Window new field will appear - "Window"
select Window -> MM_Incoterms

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 33

- click "Save" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 34

8. Add Incoterms field ( MM_Incoterms_ID ) into iDempiere Sales Order Table ( C_Order)

- - in Menu Search field type - "Table and Column" and press search button
and click on it

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 35

- in dialog "Lookup Record" 
type DB Table Name -> C_Order
and click "Ok" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 36

- in tab "Column" click "New" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 37

- find field "System Element" and click green arrow

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 38

- in dialog "Info System Element"
1) Type in DB column Name -> MM_Incoterms
2) Click "Reload" button
3) Select "MM_Incoterms_ID" in result set
4) Click "OK" button


iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 39

- scroll down, find field "Reference"

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 40


- in Reference field select "Table " ( Default is "Table Direct" )

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 41


- click "Save" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 42


9. Add Incoterms fields into iDempiere Sales Order Window 

- in Menu Search field type - "Window, Tab & Field" and press search button
and click on it button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 43

- type "Name" -> Sales Order  and click "OK" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 44

- select tab "Tab" , find "Sales Order" Tab, click "Edit record" 

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 45

- select tab "Field" , click "New record" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 46

- type "Name" - MM_Incoterms ,
select Column -> MM_Incoterms_ID_MM_Incoterms

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 47

- click Save button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 48


10. Run "Role access update" process

- close all opened iDempiere windows (on page )

- in Menu Search field type - "Role Access Update" and press search button
and click on it

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 49

- select Client -> "System" ( will update all roles in all clients )
and click "OK" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 50

- click "Close Window" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 51


11. Run Cache Reset process

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 52

- click "OK" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 53

- click "Close Window" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 54



12. Login into Client Admin account ( we will use  default GardenWorld)

- logout from System Admin...

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 55

- login into Client Admin account ( we will use  default GardenWorld)

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 56

13. Fill Incoterms Window with values

Ex Works
Free Carrier
Carriage Paid to
Carriage & Insurance Paid To
Delivered At Terminal
Delivered At Place
Delivered Duty Paid
Free Alongside Ship
Free On Board
Cost & Freight
Cost Insurance & Freight

- in Menu Search field type - "MM_Incoterms" and press search button
and click on "New" button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 57

- foreach Incoterm
1) create new record
2) Type Name
3) Click Save button

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 58

- result - all incoterms

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 59


14. Create new Sales Order - check Incoterms Field + Zoom to Incoterms Dictionary window

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 60

iDempiere Java ERP Sales Order  Incorporating Incoterms tutorial 61


Hooray !!! Well Done !!!






No comments:

Post a Comment