Difference between revisions of "User:Omidp"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(Omid's Activity)
(ADempiere)
Line 107: Line 107:
 
== Delete Garden Client ==
 
== Delete Garden Client ==
 
* [http://sourceforge.net/forum/forum.php?thread_id=2007981&forum_id=610548 Remove Client]
 
* [http://sourceforge.net/forum/forum.php?thread_id=2007981&forum_id=610548 Remove Client]
== create new LAF==
+
== Create New LAF==
 
*[http://www.adempiere.com/wiki/index.php/Create_Better_Persian_LAF persianLookAndFeel]
 
*[http://www.adempiere.com/wiki/index.php/Create_Better_Persian_LAF persianLookAndFeel]
 +
== Info Class Factory  ==
 +
* [http://www.adempiere.com/wiki/index.php/Info_Class_Factory Info Class Factory]
 
== Adempiere Coding guidline ==
 
== Adempiere Coding guidline ==
 
==== Set to context  ====
 
==== Set to context  ====

Revision as of 09:16, 1 December 2008

Name This user real name is : Omid Pourhadi
Sourceforge logo.png This user has a Sourceforge account.
Wikipedia logo.png This user has a Wikipedia account.

Contents

About Me

I am omid pourhadi and started IT (information Technology) at 2001 I love software development and want to learn something new always In this way many people influence on me I would like to regards all of them

  • I am an Aptech (java) certified programmer
  • Bachelor degree in Biology

My Favorites

  • Movies i like : The Matrix, Devil's Advocate, The One, Fist of Legend, Basic Instinct,Saw, Sweet November
  • Music i like : Linkin Park, Evanescence, Avril Lavigne, Children of boodom, Cradle Of filth ,System of a down
  • Books i like : buddhist wisdom, on the Art Of War by Sun Tze, Buddhist Qigong
  • Websites i like : orkut, gazzag, yahoo,google, openbravo, oracle, pageflakes

Quotes i like

Omid's projects based on ADempiere

Project 0 (area: Localization and Translation)

  • Adding Persian Calendar
  • Translation

Project 1 (Bounced cheque)

A bounced cheque or RDI (returned deposit item) is a cheque that is returned to the depositing bank because the owner of the account in the issuing bank has insufficient funds to cover its value, has issued a stop payment on the cheque, or their account has been closed or is frozen/limited. In the United States, usually the cheque writer's bank and the other bank charge the cheque writer a penalty for the transaction, and in some instances the writer can be charged with a criminal action. cheque

  • Account : 12120-A/R Non Sufficient Funds Returned Checks

Project 2 (area: LandedCost)

Implement cost ditribution

  • Minvoiceline.java
getBase(lc.getDistributionCost,getInvoiceId())
  • MinoutLine.java

change getbase method => getbase(args0,int invoiceId)

Minvoice invoice=new Minvoice(getCtx(),invoiceId,trx_Name)
MinvoiceLine[] lines=invoice.getLines(false);
for(int i=0;i<lines.length;i++){
   if(lines[i].getMinoutlineid == get_MinoutLineId()) // check receipt line is equal to invoice line
       return lines[i].getlineNetAmt();
}

Formula : base * LineNetAmt / total

Project 3 (area: Enhancement)

  • Adempiere on Open Swing

Project 4 (area: Solar Fiscal)

Project 5 (area: Adempiere new Platform)

  • Hibernate 3, JPA

Project 6 (Manufacturing)

  • Manufacturing Resource : IsManufacturingResource Tick + ManufacturingResourceType = Plant
  • [1] Bug Fix

Reference:

Distribution Resource Planning

Manufacturing Resource Planning

Libero MRP II to ADempiere

Capacity Planning

Supply Chain

Operation Management

Libero FAQ

LiberoAD

Libero Test Plan

Project 7 (Adempiere Sales Forecast)

  • [2]Adempiere sf with loaked

Project 8 (Adempiere CRM)

  • try to integrate open source crm like opentaps with adempiere

ADempiere

Adding new Language

System Admin >> General Rules >> System Rules >> Language
  • check system language
  • Add Missing Translation ( click on Language maintenance ) in Language window
  • Export Language
  • After translation Import Xml files
  • Synchronize Terminology
  • Hint: Exporting translation need to define client and system
  • imp Trl

Delete Garden Client

Create New LAF

Info Class Factory

Adempiere Coding guidline

Set to context

Env.setContext(Env.getCtx(), "#AD_Client_ID", 1000000);
Env.getAD_Client_ID(Env.getCtx());

Dynamic Context

String dynDocType = WindowNo  + "|C_DocType_ID"; 
int C_DocType_ID = Env.getContextAsInt(Env.getCtx(), dynDocType);

Set Value To DB Column

MBPartner bp = new MBPartner(Env.getCtx(), 0, null);
bp.set_ValueOfColumn("AD_Client_ID", client_id);

Awesome Features

Functionality Tips on sf and wiki

How Cost centers are implemented in Adempiere?

sf.net post Adempiere support cost center using organization setup( have a look at the organization and organization type setup). Also, the transact organization element could be turned on in accounting schema to handle this.

Budgeting in Adempiere

sf.net post

Cash Flow

CF

Sales Forecast

definition

Adempiere Development

  • [3] create your development env
  • [4] Tutorials
  • [5] customizing proj


SQL Statement

ALTER SCHEMA omid RENAME TO adempiere;
SELECT sqlj.install_jar('file:///....', 'sqlj', true);
ALTER SCHEMA adempiere RENAME TO omid;
SELECT sqlj.set_classpath('omid', 'sqlj');


Receipt VS Return Material

  • table name = m_inout
  • window = material receipt
document type = MM Receipt, MM Return 
Movement Type = V+ 
  • table name = m_inout
  • window name : shipment
document type = MM Shipment, MM vendor Return 
Movement type = -C
  • table name = m_inventory and join with c_doctype
  • window name : Internal use , physical inventory
document type : physical inventory
  • window name : inventory move
document type : Material physical inventory (Material Movement)

Movement type

  • Customer Returns :
  • Customer Shipment : shipment window
  • Inventory In : physical inventory
  • Inventory Out :
  • Movement From : Inventory move
  • Movement To : Inventory move
  • Production - :
  • Production + :
  • Vendor Receipts : material receipt = MM Receipt, MM return
  • Vendor Returns :
  • Work Order - :
  • Work Order + :

DB and java and ad

  • VTrxMaterial.java
  • tablename : m_transaction
  • List Reference : M_Transaction Movement Type

UOM

Hint :

  • qty/dividedRate = base unit
  • qty*multipleRate = base unit

Install Adempiere on IBM java

My Patches & Contributions in Adempiere

Contributions

  • [6] Add Iran Cities
  • [7] Add iran states

I think this is usefull for logistic Patches i submited

  • [8] Designing java form with netbeans in adempiere
  • [9] Fix Right to Left
  • [10] Amount in Words (Farsi Version)
  • [11] Fix Move Confirmation window
  • [12] Cash Payment
  • [13] Sequence Column for report
  • [14] sql operation condition
  • [15] new look and feel

Template Process and steps to create a process

Adempiere Accounting

  • [16] Accounting
  • [17] COA
  • FA
  • Account Schema window is very impoertant to basic setup Accounting

Cash generated from customers

***************

Cash paid to suppliers

***********

Posting Account in src

  • [18] specific account
  • Doc.java
  • Doc_TableName.java
  • DocLine_TableName.java

How To Add Different Accounts To COA

Generate Model

Creating Batch file for generate model

  • Create C:\Adempiere\model\ Folder
@ECHO OFF
ECHO.
ECHO Model is generating
:START
java -cp %ADEMPIERE_HOME%\lib\Adempiere.jar;%ADEMPIERE_HOME%\lib\AdempiereCLib.jar;
%ADEMPIERE_HOME%\lib\CSTools.jar org.compiere.util.GenerateModel C:\Adempiere\model\ 
org.compiere.model 'U'
ECHO.
PAUSE
CLS
EXIT
  • Rules fro generating MClass and XClass
X_Class automatic generate by generatemodel file that has different type like 'U' or 'D'
for generating MClass if your table name has less than 3 letters before underline ( _ )
mclassname is M + cut tablename after underline like ZZ_WF => MWF
but if your table name has more than 3 letters
before underline like CUS_Omid your model class name is MCUSOmid (M + TableName without _ ) 


WorkFlow (Wf)

Download Wf Reference

/**	Process Message 			*/
	private String		m_processMsg = null;

public String getProcessMsg() {
		// TODO Auto-generated method stub
		return m_processMsg;
	}
public String prepareIt() {
		log.fine("prepareIt");
		System.out.println("prepareIt");
		return DocAction.STATUS_InProgress;
	}
public boolean processIt(String processAction) throws Exception {
		m_processMsg = null;
		DocumentEngine engine = new DocumentEngine (this, getDocStatus());
		return engine.processIt (processAction, getDocAction());
	}
  • your window should be in transaction mode
  • XOR means that only the first valid transition is executed, and

'AND' means all the transitions are executed.

  • Since the 'Std User Workflow' tickbox is ticked ,

this node will ONLY be executed if the Action is 'COMPLETE', and some other conditions which are still undefined in this document. (This has been determined from the source code).

  • DocumentEngine.java and VDocAction fill state of document (complete - void - close - ....)
  • SQL operation in condition not implemented yet
  • load acitivity wfactivity.java
SELECT * FROM AD_WF_Activity a WHERE ((a.Processed='N' 
AND a.WFState='OS' ) OR (a.Processed='Y' And a.WFState='CA')) And 
( a.AD_User_ID=102 OR EXISTS 
(SELECT * FROM AD_WF_Responsible r WHERE a.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID 
AND COALESCE(r.AD_User_ID,0)=0 AND COALESCE(r.AD_Role_ID,0)=0 
AND (a.AD_User_ID=102 OR a.AD_User_ID IS NULL)) 
OR EXISTS (SELECT * FROM AD_WF_Responsible r WHERE 
a.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID AND r.AD_User_ID=102) 
OR EXISTS (SELECT * FROM AD_WF_Responsible r 
INNER JOIN AD_User_Roles ur ON (r.AD_Role_ID=ur.AD_Role_ID) 
WHERE a.AD_WF_Responsible_ID=r.AD_WF_Responsible_ID AND ur.AD_User_ID=102)) 
ORDER BY a.Priority DESC, Created

Add SQLJ

Set search_path to adempiere,sqlj;
CREATE OR REPLACE FUNCTION adempiere.persiancalendar(gregoriandate timestamp with time zone)
  RETURNS character varying AS
'org.compiere.sqlj.persianCalendar.returnPersianCalendar(java.sql.Timestamp)'
  LANGUAGE 'java' VOLATILE;
ALTER FUNCTION adempiere.persiancalendar(gregoriandate timestamp with time zone) OWNER TO postgres;
select sqlj.replace_jar('file:///C:/Adempiere/lib/sqlj.jar','sqlj',true )
select persianCalendar(now())

Adempiere Architecture

Adpm.jpg

Adempiere WEB

  • WebDoc.java
  • WFieldUpdate
  • window.js
  • Don't choose unicode role WebDoc can not create unicode character to load client
  • use build.xml in serverApps to compile webUI with ant

Localiztion Hints

  • Use negative Qty for Return Material
  • Uncheck Allow Negative Posting
  • Translation.java
if(m_centrallyMaintain)
{
o.IsCentrallyMaintain='N' => o.IsCentrallyMaintain='Y'
}

Window Button

  • VCreateFrom => initBPartnerOIS (int C_BPartner_ID, boolean forInvoice)
  • VCreateFromShipment
=> initBPInvoiceDetails(int C_BPartner_ID)
=> initBPRMADetails(int C_BPartner_ID)
  • VCreateFromInvoice => initBPDetails(int C_BPartner_ID)

OpenBravo

OpenTaps

Omid's Activity

  • [20]Translate and implement eyeOS
  • [21]coordinating the Iran localization of Openbravo. I lead this project
  • [22] translate openProj
  • [23] work on jForum - bug fix ...
  • LifeRay open source solution for life
  • jsp
  • jspwiki

BI (Business Intelligence)

ERP System

Adempiere provides all standard ERP features including Accounting, Sales and Purchase cycle, Inventory management. Adempiere Wiki

Free/OpenSource License: Mozila Public License (MPL) Operating System: All Language:Java Openbravo is the leading fully functional integrated web-based open source enterprise management (ERP) system that offers a unique value proposition - a higher value at a lower cost. OpenBravo Wiki

My Favorite Technology

Jasper Reports

iReport Hints

  • Always set Parameters data type to BigDecimal
  • Everything is case-sensitive
  • org.compiere.report.ReportStarter

Hobby & Fun

MY wishList

Some java tip

  • Abstract Classes versus Interfaces
  • static: states that the method can be called without an object
  • abstract: implies that the method does not have code, and has to be implemented

in the subclass

  • final: states that the method cannot be inherited or ovveridden
  • Synchronized: used with a method while implementing threads. it permits only one

thread access to a block of code at a time

  • volatile: used with a variable to indicate that the value of variable can be

changed several times during RUNTIME and its value is not store in the registers

  • Overloading and overriding methods: overloaded methods are in the same class

and have the same name but different parameter lists and different types of data overriding methods are in the superclass as well as subclass. overriding allows a general class to specify methods that will be common to its subclasses. e.g a class define general method 'area()' . this method maybe implemented in subclasses to find the area of particular shapes, such as , rectangle or triangle

  • Class Constructor: Explicit constructor

you can code these constructor in the class definition while creating an object of the class Implicit Constructor when you do not define a constructor for class the JVM provides a default or implicit constructor

  • Interfaces:it allows to class to have a several superclass

An interface is used instead of abstract class where there are no implementation or inherit [28]

Interested Project in SF.net

this is usefull for creating pdf in createPdf method in DocAction

framework to develop j2ee application need to know java anotation or jpa

Ajax framework. 100% Java, no JavaScript

OpenSwing is a components library that provides a rich set of advanced graphics components for developing desktop applications and HTTP based java applications/RIAs based on Swing front-end.

Jabber Client

Web-Based Document Management System, DMS, written in Java, with a powerful Search Engine - Lucene, Web-Service interface - Axis

Contact

  • E-Mail: omidpourhadi [AT] gmail.com
  • Yahoo Messenger: vata2999
  • Skype: vata2999
  • Phone: +98 935 519 69 65