Thứ Ba, 27 tháng 9, 2011

Ngoài việc đăng nhập mật khẩu dựa trên văn bản thông thường, Windows 8 có một hình thức đăng nhập mới đó là đăng nhập máy tính thông qua hình ảnh mà thông thường chúng ta chỉ thấy trong điện thoại thông minh. Quá trình đăng nhập này cho phép bạn khóa và mở khóa máy tính của bạn bằng cách vẽ một mô hình độc đáo trên màn hình. Hướng dẫn dưới đây sẽ cho chỉ bạn cách làm thế nào để thiết lập một mật khẩu mô hình trong Windows 8.
Cài đặt mật khẩu bằng hình ảnh trong Windows 8
Trên màn hình bắt đầu Metro trong Windows 8, nhấp chuột vào Control Panel. Trong cửa sổ Control Panel, bạn click vào User và sau đó nhấp vào “Create a picture password”.
Cài đặt mật khẩu bằng hình ảnh trong Windows 8
Trong ‘Welcome to picture password’ bạn click vào “Choose Picture”. Sau đó bạn chọn một bức ảnh mà mình yêu thích. Tốt nhất là bạn chọn những bức ảnh có độ phân giải cao bằng với kích thức màn hình của máy bạn. nếu bạn chọn một bức ảnh có độ phân giải thấp thì windows sẽ tự động phóng to chúng lên để phù hợp với màn hình vì thế nó làm cho bức ảnh trở nên xấu đi.
Cài đặt mật khẩu bằng hình ảnh trong Windows 8
Cài đặt mật khẩu bằng hình ảnh trong Windows 8
Trong “Setup your gestures” bạn sẽ có ba sự lựa chọn cho bức ảnh của mình như kiểu vòng tròn, đường thẳng, vòi nước và các kiểu này sẽ tạo nên mật khẩu của bạn.
Cài đặt mật khẩu bằng hình ảnh trong Windows 8
Trong màn hình kế tiếp, bạn sẽ được yêu cầu lặp lại 3 kiểu hình để xác nhận. Một khi bạn nhập chính xác thì mật khẩu sẽ được lưu lại. Lần sau khi đăng nhập vào máy tính, bạn sẽ được yêu cầu chọn lại 3 kiểu đó. Bạn cũng có thể chuyển sang đăng nhập mật khẩu bằng văn bản.
Cài đặt mật khẩu bằng hình ảnh trong Windows 8
Theo XHTT

Thứ Hai, 26 tháng 9, 2011

Dễ dàng cài đặt Windows 8 song song với Windows sẵn có
(Dân trí) - Bài viết dưới đây sẽ giúp bạn cài đặt Windows 8 song song hệ điều hành sẵn có trên máy tính, giúp bạn trải nghiệm và khám phá hệ điều hành “hot” Windows 8 mà vẫn không phải bỏ đi hệ điều hành quen thuộc vốn có.
 >>  Windows 8 trình làng, Microsoft bất ngờ cho download rộng rãi
Cấu hình yêu cầu:

Mặc dù Windows 8 được trang bị khá nhiều tính năng, tuy nhiên cấu hình yêu cầu để sử dụng Windows 8 không quá cao:

- Vi xử lý có tốc độ tối thiểu 1GHz.

- Bộ nhớ RAM có dung lượng tối thiểu 1GB.

- Ngoài ra, bạn phải chuẩn bị sẵn 1 phân vùng với dung lượng trống tối thiểu 20GB để cài đặt Windows 8 trên đó. Lưu ý, phân vùng này phải là phân vùng khác với phân vùng cài đặt hệ điều hành cũ hiện ra.

Các bước chuẩn bị:

Đầu tiên, bạn download file ảnh đĩa (định dạng .iso) của Windows 8 tại đây (Bao gồm phiên bản 32-bit và 64-bit)

Sau khi download, bạn có thể sử dụng các phần mềm ghi đĩa để ghi file iso này vào đĩa DVD (nếu chưa biết cách ghi đĩa, bạn có thể tham khảo phần mềm CDBurnerXP đã được giới thiệu tại đây).

Trong trường hợp bạn không có ổ ghi đĩa, hoặc muốn cài đặt nhanh chóng hơn, bạn có thể sử dụng cách thức để khởi động và cài đặt từ USB. Để thực hiện điều này, bạn tiến hành theo các bước sau:

- Cắm USB vào máy tính. 

Lưu ý: USB phải có dung lượng > 3GB. Trong quá trình sử dụng sẽ format lại toàn bộ dữ liệu trên USB, do vậy, bạn nên sao lưu dữ liệu có trên đó để không bị mất.

- Nếu đang sử dụng Windows XP, đầu tiên, bạn download phần mềm mang tên gọi Microsoft Image Mastering API V2 tại đây, tiến hành cài đặt lên máy.

- Tiếp theo, cài đặt .NET Framework 2.0 Service Pack 2 tại đây rồi tiến hành cài đặt.

Lưu ý: nếu bạn đang sử dụng Windows 7 có thể bỏ qua 2 bước này.

- Tiếp theo, download Windows 7 USB/DVD Download Tool miễn phí tại đây rồi tiến hành cài đặt. 

Lưu ý: Nếu tiến hành cài đặt mà hiện ra thông báo lỗi, bạn hãy cài đặt thêm 2 phần mềm đã được cung cấp ở trên.

- Sau khi cài đặt đầy đủ 3 ứng dụng trên, kích hoạt phần mềm Windows 7 USB/DVD Downlaod Tool, từ giao diện hiện ra, nhấn nút Browse, tìm đến file iso đã download được từ trước rồi nhấn Next.

- Chọn USB Devide ở bước tiếp theo. Bước tiếp theo đó, phần mềm sẽ liệt kê danh sách các thiết bị USB đang có trên máy. Chọn ổ USB bạn muốn sử dụng để thiết lập khởi động và cài đặt rồi nhấn nút Begin Copying.

- Quá trình sẽ bắt đầu format ổ USB và tiến hành sao chép những dữ liệu từ file iso của Windows 8 vào trong USB. 

Sau khi quá trình sao chép hoàn tất, khởi động lại máy tính. Nếu máy tính của bạn chưa thiết lập chế độ khởi động từ USB, hãy truy cập vào BIOS (bằng cách nhấm phím F2 hoặc phím Delete trong quá trình khởi động), tìm đến mục menu Boot (tùy mỗi BIOS khác nhau), thay đổi thứ tự khởi động để đưa USB lên hàng đầu. 

Lưu ý: trong trường hợp bạn sử dụng đĩa DVD để cài đặt, hãy thiết lập để ổ đĩa CD/DVD được đưa lên vị trí khởi động đầu tiên.

Sau khi thiết lập từ BIOS, tiến hành khởi động lại máy tính.

Hướng dẫn cài đặt:

Bây giờ, máy tính sẽ được khởi động từ ổ đĩa DVD (hoặc từ USB đang cắm trên máy), quá trình cài đặt Windows 8 sẽ bắt đầu diễn ra. 

- Tại bước đầu tiên, bạn chọn ngôn ngữ cài đặt và sử dụng, tại đây bạn có thể Vietnamese tại mục “Time and Currency format”. Nhấn Next để tiếp tục.

- Nhấn nút Install Now ở bước tiếp theo. Đánh dấu đồng ý vào các điều khoản sử dụng rồi nhấn Next.

- Ở bước tiếp theo sẽ đưa ra 2 tùy chọn cài đặt (Upgrade và Custom). Nếu muốn nâng cấp trực tiếp lên Windows 8 từ hệ điều hành hiện thời, bạn chọn Upgrade. Ở đây, ta muốn cài đặt song song 2 hệ điều hành, do vậy bạn chọn Custom (Advanced). 

- Bước tiếp theo, quá trình sẽ cho phép chọn phân vùng để cài đặt. Tại đây, bạn hãy chọn phân vùng để sẵn để cài đặt Windows 8 (không phải là phân vùng đã cài đặt Windows trước đó) để đảm bảo 2 hệ điều hành nằm trên 2 phân vùng khác nhau. Nhấn Next để tiếp tục.

- Quá trình cài đặt kết thúc, máy tính sẽ tự khởi động lại. Lúc này, bạn hãy rút USB (hoặc đĩa DVD) đã dùng để khởi động lúc nãy ra khỏi máy tính để hệ thống không tiếp tục khởi động từ 2 thiết bị này.

- Sau khi hoàn tất khởi động lại, giao diện thiết lập bước đầu sẽ hiện ra. Windows 8 sẽ cho phép người dùng điền tên của máy tính.

- Ở bước sau đó, nhấn nút “Use express settings” để sử dụng các thiết lập mặc định của Windows.

- Tiếp theo, Windows sẽ yêu cầu đặt nhập vào tài khoản Windows Live ID để sử dụng, tuy nhiên, nếu không muốn (hoặc không có tài khoản này), bạn nhấn vào mục “Don’t want to log on…”, rồi chọn Local Account ở hộp thoại hiện ra sau đó.

- Với tùy chọn này, Windows 8 sẽ cho phép bạn khởi tạo 1 tài khoản, điền mật khẩu và lời gợi ý mật khẩu vào khung để bắt đầu đăng nhập vào Windows.

Lưu ý: Tên người dùng phải khác với tên của máy tính đã thiết lập ở bước trên.

Như vậy, bạn đã trải qua đầy đủ các bước của quá trình cài đặt Windows 8 và đã có thể bắt đầu “vọc” những tính năng mới nhất trên hệ điều hành còn “nóng hổi” của Microsoft.

Một vài tính năng nổi bật trên Windows 8:

Giao diện mặc định trên Windows 8 là giao diện Metro theo phong cách của Windows Phone 7, khá mởi mẻ và độc đáo. Bạn có thể sử dụng chuột để kéo con lăn bên dưới màn hình để di chuyển giao diện này, tương tự như khi dùng ngón tay để vuốt trên màn hình cảm ứng.

Để truy cập vào giao diện Desktop quen thuộc, bạn có thể nhấn vào mục Desktop trên giao diện Metro này.

Giao diện desktop theo phong cách quen thuộc

Từ giao diện này, bạn cũng có thể nhấn vào mục Internet Explorer để duyệt web bằng IE 10, với phong cách tương tự như trên Windows Phone. Với IE ở chế độ này, thanh địa chỉ đã được đưa xuống bên dưới, trong khi các tab đang mở hiển thị dưới dạng các thumbnail ở bên trên.

Báo Dân trí trên IE 10 của Windows 8

Đặc biệt, để tắt máy tính, bạn đưa chuột đến nút Start từ bên góc trái, chọn Settings, 1 khung bên phải hiện ra, trong đó có mục Shut down, cho phép bạn tắt hoặc khởi động lại hệ thống.

Để thoát ra khỏi 1 ứng dụng bạn kích hoạt từ giao diện Metro, bạn nhấn tổ hợp phím Alt-Tab để quay trở lại giao diện Metro mặc định.

Một vài hình ảnh về giao diện mới trên Windows 8:

Giao diện quản lý bộ nhớ trên Task Manager

Cửa sổ Task Manager

Cửa sổ Windows Explorer  với giao diện quản lý Ribbon bên trên

Giao diện cửa sổ Control Panel

Ứng dụng quản lý thời tiết, có thể truy cập trực tiếp từ bên ngoài giao diện Metro

Khi truy cập vào mục Windows App trên giao diện Metro, bạn sẽ nhận được 1 thông báo rằng tính năng này đang được xây dựng

Hướng dẫn để khởi động song song Windows 8 và hệ điều hành cũ:

Mặc định, sau khi cài đăt, hệ thống sẽ khởi động mặc định vào Windows 8. Trong trường hợp bạn muốn sử dụng song song cả 2 hệ điều hành (cũ và mới), từ Windows 8, bạn nhấn tổ hợp phím Windows và R (Windows là phím có biểu tượng cửa sổ, nằm giữa phím Ctrl và Alt trên bàn phím).

Từ hộp thoại Run hiện ra, bạn điền SystemPropertiesAdvanced.exe vào hộp thoại rồi nhấn Enter.

Hộp thoại System Settings hiện ra, bạn nhấn vào nút Settings tại mục Startup and recovery. Thêm 1 hộp thoại mới hiện ra, tại đây, ở phần System Startup, bạn chọn mục Earlier Version of Windows rồi lưu lại thiết lập.

Bây giờ, mỗi khi khởi động, máy tính sẽ đưa ra 2 tùy chọn cho phép bạn chọn hệ điều hành để sử dụng.

Trên đây là cách thức hướng dẫn chi tiết để cài đặt Windows 8 song song cùng hệ điều hành hiện thời. Với hướng dẫn này, bạn đã có thể khám phá và trải nghiệm hệ điều hành “hot” Windows 8, nhưng vẫn còn có thể tiếp tục quay trở lại hệ điều hành cũ quen thuộc nếu muốn.
Source: dantri.com.vn

Thứ Ba, 6 tháng 9, 2011

Tạo mới một cửa sổ trong Openbravo ERP (How to develop a new window)

I. Giới thiệu:
 Mục tiêu của phần này là hướng dẫn cách tạo một cửa sổ người dùng mới trong OpenBravo. Trong cửa sổ này sẽ kết nối đến một bảng cơ sở dữ liệu mà ta đã tạo sẵn. Có mục đích thêm xóa sửa, cập nhật từ cửa sổ mới này xuống bảng dữ liệu mà ta thêm vào database Openbravo ERP
 
 Giả sử chúng ta sẽ
phát triển một module nhân sự và cần một cửa sổ để cho phép người sử dụng nhập tiền lương của nhân viên. Ta cũng cần phải theo dõi mức lương của nhân viên để đưa ra những báo cáo cần lưu trữ. Mỗi bản ghi tiền lương cần phải có một trường " Valid From Date" cho biết thời điểm một mức lương cụ thể được tạo ra. Lưu ý rằng nhân viên phải thuộc hệ thống và được chứa trong bảng C_BPARTNER và chỉ định bởi các cột C_BPARTNER.ISMEPLOYEE. Vì vậy, chúng ta chỉ cần tạo một bảng cơ sở dữ liệu mà sẽ giữ tiền lương thực.
  Cho nên việc đầu tiên là tạo mới một bảng trong Openbravo, điều này đã hướng dẫn trong phần tạo bảng . Bây giờ chúng ta sẽ đi thẳng vào phần tạo mới một cửa sổ (Có thể gọi là một trang mới) trong Openbravo

II. Tạo một cửa sổ mới:

- Đăng nhập với quyền System Administrator --> Sau đó vào đường dẫn Application Dictionary || Windows, Tabs and Fields. Create a new record, sau đó bạn nhập các thông tin tương tự như sau:


Các trường dữ liệu trong cửa sổ trên (Để biết thêm thông tin bạn tham khảo AD_Window ):
  • Name Defines the name that Openbravo ERP uses to recognize this window.
  • Description Gives a small description of the table.
  • Help/Comments Defines the text that is displayed in Help window.
  • Window Type Defines some user interface specifics for a window:
    • Maintain: is used for windows with few entries.
    • Transaction: for transactional windows.
      • The header tab's underlying table must contain the PROCESSED and UPDATED columns
      • by default this window filters out old (n days – General Setup > Application > Session Preferences window setting) and processed documents.
    • Query Only: for read-only windows that only enable viewing of data.

Save lưu thông tin và chuyển vào Tab Tab - Ở đây ta sẽ tạo ra một tab mới trong cửa sổ vừa tạo để hiển thị thông tin nhân viên --> Create a new record, và nhập thông tin như sau:


Các trường dữ liệu trong cửa sổ trên (Biết thêm thông tin xin tham khảo AD_Tab):
  • Name Defines the name that Openbravo ERP uses to recognize this tab.
  • Description Gives a small description of the table.
  • Help/Comments Defines the text that is displayed in Help window.
  • Table Specifies the table that the tab will show the data from.
  • Table Level Defines the hierarchy of tabs, 0 being the highest level.
  • UI Pattern This dropdown offers the following options:
    • Standard - standard interface where multiple records can be added, viewed and edited
    • Read Only - this option disables any editing/creating capabilities for any user within this tab
    • Single Record - this option enforces a one-to-one relationship between a parent and a child tab, allowing the user to enter maximum one record in the tab
  • SQL Where Clause By using this SQL filter, the user will never be able to see data that does not fit the criteria. In our case, we use it to display only business partners that are our employees.
- Nhấn nút Save và sau đó nhấn vào nút Copy Tab Fields để copy các trường từ tab chính của cửa sổ Business Partner vào cửa sổ mới của chúng ta. Chọn Business Partner-Business Partner và nhấn OK.
- Di chuyển tới Tab Field bạn sẽ thấy những trường bạn đã tạo. Bạn cũng có thể thay đổi các trường này ngay tại đây. Trong ví dụ của chúng ta, tôi sẽ không thay đổi gì cả.

- Bây giờ, quay trở lại tab Tab và tạo một record mới sẽ đại diện cho các tab con của tab Employee nơi mà tiền lương sẽ được quản lý:

- Nhấn nút Save
Bạn cần chắc chắn đã chọn:
  • Table = HT_Salary
  • Tab Level = 1

- Bằng cách nhấn vào Create Fields và xác nhận lại, Openbravo sẽ tự động chèn các cột của bảng được chọn vào các trường tab Salary.
- Sau đó chuyển tới tab Field Sequence để xác định các lĩnh vực mà sẽ được hiển thị (bên phải) và không được hiển thị (bên trái) và thứ tự của những hiển thị (mũi tên lên và xuống):

Sau khi điều chỉnh hợp lý bạn nhấn nút Save

 Đối với Openbravo để tạo ra các liên kết tới các thành phần bảng, hệ thống cần phải biết được cửa sổ đại diện cho bảng, nơi một thành phần nhất định được chứa. Trong ví dụ này, cửa sổ Employee Salary được sử dụng để quản lý nội dung của các bảng cơ sở dữ liệu HT_Salary. Do đó, tất cả record tiền lương cần phải được hiển thị trong cửa sổ đó. Để chỉ ra điều đó, đi đến Application Dictionary || Tables and Columns, tìm bảng EP_Salary và thiết lập các cửa sổ như dưới đây:

(Thực ra là bạn chỉ cần chỉnh lại trường Windows để chọn cửa sổ bạn mới tạo ra)


III. Tạo các thành phần Menu

 Một thành phần Menu là yêu cầu cho người dùng có thể gọi cửa sổ ứng dụng mới mà chúng ta vừa tạo.
 - Đăng nhập bằng quyền System Administrator và đi tới General Setup || Application || Menu và create a new record, sau đó bạn nhập các thông tin như sau:


Các trường thông tin của cửa sổ trên (Bạn có thể tham khảo thêm tại AD_Menu ):
  • Name Defines the name that Openbravo ERP uses to recognize this menu item.
  • Description Gives a small description of the table.
  • Summary level Defines a folder containing menu items (windows, processes, reports and so on).
  • Action Defines the type of menu item.
  • URL If Action is External link or Internal link, defines the URL to be linked.
  • Special Form If Action is Form, defines the form to be linked.
  • Process If Action is Process, defines the process to be launched.
  • Report If Action is Report, defines the report to be linked.
  • OS Task If Action is Task, defines the operating task to be launched.
  • Window If Action is Window, defines the window to be linked.
  • Workflow If Action is Workflow, defines the workflow to be linked.

Nhấn nút Save và sau đó Click vào biểu tượng Tree  --> Tại đây bạn có thể kéo và thả các thành phần của menu Employee Salary tới nhóm menu khác. Sau khi thực hiện xong bạn đóng cừa sổ này lại.

IV. Biên dịch ứng dụng với cửa sổ mới

 Cuối cùng, ứng dụng cần phải được biên dịch lại để tạo ra code cửa sổ mới và triển khai nó đến Tomcat. Nếu sử dụng Eclipse, dùng lệnh ant eclipse.compile và nhập Employee Salary vào hộp thoại. Nếu dùng môi trường dòng lệnh với Openbravo, sử dụng:  ant compile.development -Dtab='Employee Salary'

  Lưu ý: Khi quá trình biên dịch kết thúc, khởi động lại Apache Tomcat server. Trong windows, tốt nhất là Stop Tomcat trước khi chạy lệnh build và start lại từ cửa sổ khóa file nhất định. Nếu bạn dùng lệnh ant compile.development -Dtab='Employee Salary'  không thành công bạn có thể dùng lệnh ant compile.development
  Xem thêm tại Build Tasks.

 Quá trình biên dịch thành công, bạn khởi động lại Tomcat và đăng nhập lại vào Openbravo để xem kết quả!!!

----------------------------------------------------------------------------------------------------------
Tham khảo:
http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/How_to_develop_a_new_window

Thứ Năm, 25 tháng 8, 2011

Hướng dẫn cách sử dụng Panel trong Openbravo

Hướng dẫn cách sử dụng Panel trong Openbravo

Như chúng ta đã biết viết các phương thức cho class (xem ở bài Viết các phương thức cho class)
Cụ thể bài này có nói:
“Class này phải được kế thừa (extends) từ Jpanel và implemets từ JPanelView, BeanFactoryApp, TicketsEditor“
Vậy tại sao trong class VaitrochucnangPanel lại chỉ có:

Để lý giải cho điều này ta tiến hành tìm hiểu cách sử dụng Panel trong Openbravo

Cách sử dụng Panel trong Openbravo

Trong Openbravo đã viết hỗ trợ rất nhiều về Panel, các class viết sẵn này nằm trong package com.openbravo.pos.panels.
Bao gồm: JPanelTable, JPanelTable2 .v.v..
Các Panel này đã làm hộ mình việc Extends Jpanel và implemets từ JPanelView, BeanFactoryApp, TicketsEditor như bài Viết các phương thức cho class đã viết.
Do đó trong VaitrochucnangPanel chỉ extends JPanelTable là vì:
Thằng JPanelTable đã được Openbravo viết hộ dẫn đến JPanelTable được Extends Jpanel và implemets từ JPanelView, BeanFactoryApp, TicketsEditor như đã nói ở trên. Vậy class VaitrochucnangPanel extends JPanelTable cũng chính là :
VaitrochucnangPanel Jpanel và implemets từ JPanelView, BeanFactoryApp, TicketsEditor (đúng theo Viết các phương thức cho class).
Cụ thể nó thể hiện theo sơ đồ sau:


Thành phần cơ bản của Panel trong Openbravo

Panel sẽ quy định về khung giao diện hiển thị, các hiện thị sẽ được chứa trong thành phần container.
Ví dụ trong JPanelTable:

Như vậy với JPanelTable này thì ngoài những gì được jeditor lấy ra từ VaitrochucnangView thể hiện trong VaitrochucnangPanel được đem vào container trong JPanelTable thì container trong JPanelTable còn được thêm vào toolbar (Hình trên đã ghi chú).
Và khi đó JPanelTable này hiển thị sẽ có 2 phần như hình:
Hiển thị của JPanelTable

Ví dụ về Panel trong Openbravo

Để hiểu hơn về Panel ta tiến hanh một ví dụ với Panel mới là JPanelTest.
Ta quay lại bài Xây dựng lớp View
Theo bài này ta đã tạo ra một menu chức năng mới.
Class để hiển thị là VaitrochucnangPanelMoi việc hiển thị của class này như bài xây dựng lớp view sẽ cử ra VaitrochucnangMoiView để chuyển hiển thị nội dung.
Tuy nhiên ở đây ta không xét tới hiển thị đó, mà ta xét tới hiển thị bao gồm hiển thị view đó.
Cụ thể ta đã biết Panel sẽ quy định hiển thị đó, và Panel được sử dụng ở đây là JPanelTest được class VaitrochucnangPanelMoi extends vào qua câu lệnh:

public class VaitrochucnangPanelMoi extends JPanelTest {
Chi tiết của JPanelTest này như sau:
JPanelTest có cấu trúc tương tự như JPanelTable, nhưng yêu cầu của chức năng này chỉ cần hiển thị nội dung trong view (jeditor gọi ra) mà không cần hiển thị Thanh công cụ (trong toolbar). Do đó container của JPanelTest sẽ phải cắt bỏ phần toolbar đi.

public abstract class JPanelTest extends JPanel implements JPanelView, BeanFactoryApp {
      
      protected BrowsableEditableData bd;    
      protected DirtyManager dirty;    
      protected AppView app;
      
      /** Creates new form JPanelTableEditor */
      public JPanelTest() {
initComponents();
      }
      
      public void init(AppView app) throws BeanFactoryException {
          
          this.app = app;
          dirty = new DirtyManager();
          bd = null;
          
          init();
      }
public Object getBean() {
          return this;
      }
      
      protected void startNavigation() {
          
          if (bd == null) {
              
              // init browsable editable data
              bd = new BrowsableEditableData(getListProvider(), getSaveProvider(), getEditor(), dirty);
// Add the filter panel
              Component c = getFilter();
              if (c != null) {
                  c.applyComponentOrientation(getComponentOrientation());
                  add(c, BorderLayout.NORTH);
              }
// Add the editor
              c = getEditor().getComponent();
              if (c != null) {
                  c.applyComponentOrientation(getComponentOrientation());                
                  container.add(c, BorderLayout.CENTER);            
              }
// el panel este
              ListCellRenderer cr = getListCellRenderer();
              if (cr != null) {
                  JListNavigator nl = new JListNavigator(bd);
                  nl.applyComponentOrientation(getComponentOrientation());
                  if (cr != null) nl.setCellRenderer(cr);
                  container.add(nl, java.awt.BorderLayout.LINE_START);
              }
// add toolbar extras
              c = getToolbarExtras();
              if (c != null) {
                  c.applyComponentOrientation(getComponentOrientation());
                  //toolbar.add(c);
              }
// La Toolbar
              c = new JLabelDirty(dirty);
              c.applyComponentOrientation(getComponentOrientation());
              //toolbar.add(c);
              c = new JCounter(bd);
              c.applyComponentOrientation(getComponentOrientation());
              //toolbar.add(c);
              c = new JNavigator(bd, getVectorer(), getComparatorCreator());
              c.applyComponentOrientation(getComponentOrientation());
              //toolbar.add(c);
              c = new JSaver(bd);
              c.applyComponentOrientation(getComponentOrientation());
              //toolbar.add(c);
          }
      }
      
      public Component getToolbarExtras() {
          return null;
      }
public Component getFilter() {    
          return null;
      }
      
      protected abstract void init();
      
      public abstract EditorRecord getEditor();
      
      public abstract ListProvider getListProvider();
      
      public abstract SaveProvider getSaveProvider();
      
      public Vectorer getVectorer() {
          return null;
      }
      
      public ComparatorCreator getComparatorCreator() {
          return null;
      }
      
      public ListCellRenderer getListCellRenderer() {
          return null;
      }
public JComponent getComponent() {
          return this;
      }
public void activate() throws BasicException {
          startNavigation();
          bd.actionLoad();
      }    
      
      public boolean deactivate() {
try {
              return bd.actionClosingForm(this);
          } catch (BasicException eD) {
              MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.CannotMove"), eD);
              msg.show(this);
              return false;
          }
      }  
      
      /** This method is called from within the constructor to
       * initialize the form.
       * WARNING: Do NOT modify this code. The content of this method is
       * always regenerated by the Form Editor.
       */
      // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
      private void initComponents() {
container = new javax.swing.JPanel();
          //toolbar = new javax.swing.JPanel();
setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
          setLayout(new java.awt.BorderLayout());
container.setLayout(new java.awt.BorderLayout());
          //container.add(toolbar, java.awt.BorderLayout.NORTH);
add(container, java.awt.BorderLayout.CENTER);
      }// </editor-fold>//GEN-END:initComponents
    
          
      // Variables declaration - do not modify//GEN-BEGIN:variables
      private javax.swing.JPanel container;
      //private javax.swing.JPanel toolbar;
      // End of variables declaration//GEN-END:variables
      
  }
  
Từ code trên ta thấy container của JPanelTest đã không chứa toolbar, các khai báo và thêm toolbar đã được coment:

//container.add(toolbar, java.awt.BorderLayout.NORTH);
Do đó kết quả hiển thị ra của chức năng này không có phần hiển thị của toolbar trong container như hình:
Hiển thị của JPanel Test.
Như vậy các bạn đã nắm được hoạt động của Panel trong Openbravo roi đó :)
Chúc các bạn thành công!
Source: http://viet-cntt.com/He-dieu-hanh/Unit-Linux/viet-hoa-openbravo-25-erp.html

Translating Openbravo

Translating Openbravo





Introduction

This document explains the process of translating and maintaining Openbravo ERP translations into different languages.
The process involves five steps:
  1. Creating a new language.
  2. Copying the base language translations.
  3. Exporting the XML files to translate.
  4. Translating the files.
  5. Finally, importing the new translations into the system.

Creating a language

To translate Openbravo ERP, first create a language or activate a previously defined language.
Log in to Openbravo ERP using the System Administrator role.
Next, go to General Setup > Application > Language.
TranslatingOpenbravoCreatingaLanguage.png
Here the language of choice can be selected from the list.
If you are not in Grid View, click the grid icon or create it. If you are creating a new language follow the Java convention of country and language:
The language with 2 lower case letters followed by an underscore (_) and the country in 2 capital letters (e.g. fr_CA stands for Canadian French).
Check the System Language check-box and save the record. This activates the language to translate and from this point, it appears in the user's preferences.
The next step is to copy all text from the Base Language to the new language. The base language is the language that is used as a starting point for translating the application, and it is English (en_US). By clicking on Verify Languages button all the strings for the base language are copied to the new language.

Language pack

Structure

A language pack is a set of XML files containing the translations for a desired language. Each file contains the translation for a single table in the database and is given the same name as the table which contains its corresponding translation.
These language packs are stored in a server directory by language using the convention of language and country (e.g. en_US, es_ES...). They are inside a lang directory in the folder that is defined to contain all attachments. This is defined in your local build.xml file (for 2.3x versions) or Openbravo.properties file (2.4x and onwards), which is requested during the installation process and, by default, is called /attachments. An example of a complete path for Spanish_Spain could be /attachments/lang/es_ES.
The structure of the XML is as follows:
  • A tag containing the table and the language names.
  • For each row in the table there will be a row tag with attributes id for the row identification and trl which will be Y or N depending on whether or not it has been translated.
  • Inside the row tag, there is a value tag for each column in the table. This tag includes the attributes column for the column name and original signifying the value for the column in the base language (English). The value for the tag will contain the translated text. This is the text that you have to change if you want to make a translation.
The following piece of code is an example for /attachments/lang/es_ES/AD_TASK_TRL_es_ES.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<compiereTrl language="es_ES" table="AD_TASK">
  <row id="102" trl="Y">
    <value column="Name" original="Java Version">Versión de java</value>
    <value column="Description" original="Displays the version of the default Java VM">Muestra la versión de la java VM por defecto</value>
    <value column="Help" original="The java version used by the application might be different."/>
  </row>
  <row id="103" trl="N">
    <value column="Name" original="Database Export">Exportar BD</value>
    <value column="Description" original="Export (save) the database">Exportar (guardar) la base de datos</value>
    <value column="Help" original="Run this command from the server">Run this command from the server</value>
  </row>
</compiereTrl>
The complete list of XML files that compose a language pack is called lg_CT, where lg stands for language and CT for country, is:
  1. AD_ALERTRULE_TRL_lg_CT.xml: Translations for AD_AlertRule table.
  2. AD_ELEMENT_TRL_lg_CT.xml*: Translations for the AD_Element table. This table contains all the elements of the application. They are used in order to have centrally maintained a description and help of the elements.
  3. AD_FIELDGROUP_TRL_lg_CT.xml: Translations for AD_FieldGroup table. Field groups are used to group a fields in a window.
  4. AD_FIELD_TRL_lg_CT.xml*: Translations for the AD_Field table. This table holds the information about the fields that are shown in each window of the application.
  5. AD_FORM_TRL_lg_CT.xml: Translations for the AD_Form table, where are defined the name, description and help for all the forms of the application. A form is a manually generated window.
  6. AD_MENU_TRL_lg_CT.xml: Translations for AD_Menu table. Here can be found the menu tree that appears on the left side of the application.
  7. AD_MESSAGE_TRL_lg_CT.xml: Translations for AD_Message table. This table defines all the messages that application displays.
  8. AD_PROCESS_PARA_TRL_lg_CT.xml: Translations for the AD_Process_Para table.
  9. AD_PROCESS_TRL_lg_CT.xml: Translations for AD_Process table. Here appears the name, description and help for the processes invoked from the application.
  10. AD_REFERENCE_TRL_lg_CT.xml: Translations for AD_Reference table. In this table are all the references. References are used to define data types, lists of values or tables.
  11. AD_REF_LIST_TRL_lg_CT.xml: Translations for AD_Ref_List table. In this table are found the values for the references of list type.
  12. AD_TAB_TRL_lg_CT.xml: Translations for AD_Tab table. This table contains the name, description and help for all the tabs in the application.
  13. AD_TASK_TRL_lg_CT.xml: Translations for AD_Task table. Definition of system tasks.
  14. AD_TEXTINTERFACES_TRL_lg_CT.xml: Translations for AD_TextInterfaces table. This table holds the texts that will be displayed in all the manually generated windows.
  15. AD_WF_NODE_TRL_lg_CT.xml: Translations for AD_WF_Node table. This table contains the workflow nodes.
  16. AD_WINDOW_TRL_lg_CT.xml: Translations for AD_Window table. AD_Window has names, descriptions and helps of the WAD generated windows.
  17. AD_WORKFLOW_TRL_lg_CT.xml: Translations for AD_Workflow table. Name, description and help for the defined workflows.
  18. AT_COMMAND_TRL_lg_CT.xml: Translations for AT_Command table. This table is not used at this moment.
  19. C_COUNTRY_TRL_lg_CT.xml: Translations for C_Country table. This table holds a list of countries.
  20. C_CURRENCY_TRL_lg_CT.xml: Translations for C_Currency table. This table holds a list of currencies.
  21. C_DOCTYPE_TRL_lg_CT.xml: Translations for C_DocType table. Description of the document types.
  22. C_ELEMENTVALUE_TRL_lg_CT.xml: Translations for C_ElementValue table. This table contains the values for the elements used in accounting.
  23. C_GREETING_TRL_lg_CT.xml: Translations for C_Greeting table.
  24. C_PAYMENTTERM_TRL_lg_CT.xml: Translations for C_PaymentTerm table. Name and description for payment terms.
  25. C_TAXCATEGORY_TRL_lg_CT.xml: Translations for C_TaxCategory table. Name and description for the tax categories.
  26. C_TAX_TRL_lg_CT.xml: Translations for C_Tax table. Name and description for taxes.
  27. C_UOM_TRL_lg_CT.xml: Translations for C_UOM table. This table contains the Units of Measure.
  28. M_PRODUCT_TRL_lg_CT.xml: Translations for M_Product table. A table containing the different products.
* Note: The recommended way of translating is to translate the AD_ELEMENT table first. Then import the translated file, perform a Synchronize Terminology process, export again and continue. This is recommended because the AD_FIELD elements that are centrally maintained (most part of them) are updated with the AD_ELEMENT values every time this process is run. So a lot of effort and time is saved!
Bulbgraph.png   Note: Starting 2.50 MP19, you will find an additional file here: buildStructure.xml. This file contains the information related to the names different stages an Openbravo build goes through, and the error and warning messages that can be shown during a rebuild. You should also translate this file. Its information will be shown in the Rebuild Window, during a system rebuild (for example, when you install a module, or when you update Openbravo) This file follows a special format and will not work with the Openbravo2PO utility. However, as it is very small and easy to understand, it is very easy to directly translate it

Translating using PO files

PO (Portable Object) is a very popular format for storing and translating many open source applications. Openbravo ERP uses XML to import and export translations. However, these XML files can be converted into PO files, that are more user friendly.
PO files have a very simple structure. They look like:
#: AD_MENU_TRL_en_US.xml:1(value) 
msgid "original text"
msgstr "translated text"
There is detailed description of the format in the GNU gettext utilities manual.

Software required

To translate Openbravo using PO files, the following software is required:
  • Openbravo2PO which is a tool written specifically for working with Openbravo ERP generated XML files. It transforms XML format files to PO format and back to XML format. Openbravo2PO can also be used to merge multiple PO files of the same type (table, element, language) to a single file.
  • Java version 1.5
  • Ant version 1.7.0

Generating a PO from an XML file

Language files are exported from Openbravo ERP in XML format. In order to translate these files efficiently it is necessary to transform them into PO format files.
Detailed instructions on using this tool can be found at Openbravo2PO User Documentation
To transform XML files to PO format use the following ant command:
ant runXML2PO -DinpFold= -DoutFold= -DmsgStr= -Dfile=""
Add values as required to the various target arguments. If the -DinpFold is given and the -Dfile is empty the tool will generate PO files for all XML files in the input folder, otherwise only those files included in the -Dfile argument will be transformed. The -Dfile argument can take multiple files separated by a space character but must be enclosed in "".
E.g. to transform all XML files in a folder to PO files:
ant runXML2PO -DinpFold=/home/openbravo/translations/xml_base/ -DoutFold=/home/openbravo/translations/po_out/ -DmsgStr=false
E.g. to transform a single XML file:
ant runXML2PO -DinpFold=/home/openbravo/translations/xml_base/ -DoutFold=/home/openbravo/translations/po_out/ -DmsgStr=false -Dfile="AD_TASK_TRL_es_ES.xml"

Translating PO files

To translate a PO file into your language you can use one of the many open source tools and editors available. Some of the most popular are:
  • PoEdit – a cross-platform gettext catalogs editor.
  • Lokalize – a graphical PO editor for the KDE environment (previously known as Kbabel).
  • Gtranslator – a graphical PO editor for the GNOME environment.

Generating an XML from a PO file

Once the translation is complete, you have to put the translations back into XML format.
Detailed instructions on using this tool can be found at Openbravo2PO User Documentation
To generate the XML files from the PO files use the following ant target:
ant runPO2XML -DinpFold= -DoutFold=  -Dfile=""
Again, specifying the -DinpFold and not the file names will parse all PO files into the relevant XML files ready to be imported back into Openbravo ERP. The -Dfile argument can take multiple files separated by a space character but must be enclosed in "".
E.g. to process a complete folder:
ant runPO2XML -DinpFold=/home/openbravo/translations/po_out/ -DoutFold=/home/openbravo/translations/xml_trl
E.g. to process specific file(s):
ant runPO2XML -DinpFold=/home/openbravo/translations/po_out/ -DoutFold=/home/openbravo/translations/xml_trl -Dfile="AD_TASK_Name_es_ES.po AD_TASK_Help_es_ES.po AD_TASK_Description_es_ES.po"

Export/Import

To export or import a language, you must log into the application as System Administrator and go to General Setup > Application > Import/Export Translations ( the language must be activated in the system first).
Choose one of the languages defined as System Language.
  • Export: creates the language directory (see above) if it does not already exist and exports the files for the selected language to the directory.
  • Import: reads the files from the selected language directory and import them into the application database tables.
The desired language XML files are located in the following directory: attachments/lang/en_US.
  • The location of the attachments folder is configured in the attach.path property in your local build.xml file (for 2.3x versions) or Openbravo.properties file (for 2.4x and onwards).
  • en_US should be replaced with the code for your particular language.
TranslatingOpenbravoExportImport.png
See the Installing a new translation section if you are importing translations.

Maintaining a translation

If you do not want to make a complete translation or significant changes, you can modify a translation in a different way – without exporting/modifying/importing XML files. Every table that has a translation (the ones that are exported into XML files) also has a tab called Translation in its window. Here, translations can be edited for each row of the table.
For example, if you simply want to change the Spanish translation for AccountType element, this change can be made by going to the Application Dictionary > Setup > Element > Translation tab.
TranslatingOpenbravoMaintainingaTranslation.png

Installing a new translation

Important The section that follows is the only way to install a translation for Openbravo ERP 2.40 an prior versions, or Openbravo ERP 2.50 if the translation module hasn't been already built (as described in this instructions). If the translation module exists, just go to General Setup > Application > Module Management > Add Modules, and install the translation module. After building the system, translation will be correctly translated.
To install a new translation in Openbravo ERP follow these steps:
  • Click the Openbravo - Profile Button at the top menu, choose the role System Administrator and click the OK Button.
TranslatingOpenbravoInstallingaNewTranslation 1.png
  • Go to the General Setup > Application > Language menu option and search for the language that you want to import, e.g. Ger for Germany
TranslatingOpenbravoInstallingaNewTranslation 2.png
  • Mark the System Language check box then Save the record (it has a disk as an image). Do not check the Base Language check box.
TranslatingOpenbravoInstallingaNewTranslation 3.png
  • Click on the Verify Languages button to create the records for the language (if you already performed this action, result of the process should be 0, otherwise, the amount of new records created will be shown).
TranslatingOpenbravoInstallingaNewTranslation 4.png
  • An easy way to confirm that the process run correctly, is to check that new lines have been created in the translation tab of the windows. For example:
    • Go to Application Dictionary > Setup > Element.
    • Go to Translation tab.
    • Verify that a new line has been created for the language chosen. The contents of the tab should be in English. The real translation will take place in the following steps. If there is no new line, make sure you have saved the record after checking System language check box, and press Verify language again.
  • Now, create in the Openbravo ERP directory (where you installed Openbravo ERP), a folder named AppsOpenbravo/attachments/lang/de_DE (for German Germany, in any other case, lg_CT corresponding to your language_COUNTRY).
  • Go to General Setup > Application > Import/Export Translations menu. Select the language that you want to import in Language combo box. If you do not see the language that you want to import:
    • Go back to General Setup > Application > Language.
    • Select the language that you want to import, mark System Language check box then Save the record.
    • Click the Verify Languages button to create the records for the language (if you already performed this action, the result of the process should be 0).
  • Click the Import button to start the import of the translation. An easy way to confirm that the process runs correctly is to check that the lines in the translation tab of the windows have been translated. For example:
    • Go to Application Dictionary > Setup > Element.
    • Go to Translation tab.
    • Verify that the record is displayed with the content translated to the choosen language. If results keep displaying in English, press the Import button again.
Once the translation is imported or changes have been made, the modifications do not take effect until Openbravo ERP is recompiled and a new openbravo.war is deployed.
Bulbgraph.png   The recompilation is only required for 2.40 or earlier release
  • It is recommended to stop the web server before starting the compiling process. For example: if using Tomcat as web server in Linux, shut it down by typing the command:
service tomcat stop
  • Once it has stopped, start the Openbravo compilation by process by typing:
ant compile.complete
Important note: if you find this error
compileSqlc:
BUILD FAILED
...AppsOpenbravo/build.xml:85: The following error occurred
while executing this line: ...AppsOpenbravo/src/build.xml:176:
srcdir "...AppsOpenbravo/build/javasqlc/srcAD/org/openbravo/er
pCommon/reference" does not exist!
try to run:
ant core.lib wad.lib trl.lib
If success, run again:
ant compile.complete
This process compiles and translates every window in the application.
  • Now, create the openbravo.war file and deploy it to Apache Tomcat by typing:
ant war
ant deploy
* Choose
  • Restart the web server by typing:
service tomcat start
Important note: at this point, you should have inside Apache Tomcat webapps folder (C:\Apache Software Foundation\Tomcat5.5\webapps\ or C:\Tomcat5.5\webapps\ in Microsoft Windows and /var/lib/tomcat5.5/webapps/ in Linux):
  • A your_context_name folder (e.g., openbravo).
    • A src-loc/design sub-folder with the english_USA version of Openbravo ERP.
    • A src-loc/lg_CT sub-folder with your language_COUNTRY version of Openbravo ERP (e.g., src-loc/de_DE for Germany, src-loc/es_ES for Spanish of Spain, etc...).
If this is not the case:
service tomcat stop
ant compile.complete
ant war
ant deploy
service tomcat start
Sometimes when you have yet deployed openbravo application to the Apache Tomcat webapps folder, you could continue experiencing problems. Try:
service tomcat stop
delete your_context_name folder (e.g., openbravo) inside Apache Tomcat webapps folder.
service tomcat start
your_context_name folder should be re-created with the src-loc/lg_CT subfolders inside it.


  • Now login into Openbravo ERP and you will be able set your language for your Role. If you want to see all the menus in your language, mark the check-box Set as Default.
TranslatingOpenbravoInstallingaNewTranslation 5.png

ERP 2.50:Openbravo ERP Installation

ERP 2.50:Openbravo ERP Installation

Introduction

This article describes the installation procedure for Openbravo 2.50.
Bulbgraph.png   Latest Openbravo release is 3.0MP2.
In this release, you can install Openbravo following 4 different approaches:
  1. Community Appliance (recommended): you can download and install a fully configured appliance that runs in your preferred virtualization environment. The appliance includes both Openbravo as well as its underlaying technology stack and allows you to get started with Openbravo in just a few minutes and with only a few clicks.
  2. Ubuntu Installation (recommended): Openbravo is included in the Ubuntu partner repository, so that you can add the software quickly and easily to your Ubuntu server.
  3. Amazon EC2 Instance (recommended): We have an EC2 AMI so you can just start a new instance of this AMI and have OB up and running in a matter of minutes.
  4. Custom installation (experts only): a custom installation gives you full control over your deployment environment and allows you to choose your preferred configuration for the technology stack. However, it requires you to install and configure all components of the technology stack as well as compiling Openbravo from sources.

License

Openbravo is licensed under the Openbravo Public License Version 1.1:
The contents of this file are subject to the Openbravo Public License Version 1.1 (the "License"), being the Mozilla Public License version 1.1 with a permitted attribution clause; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.openbravo.com/product/legal/license/.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The Original Code is (C) Openbravo. The Initial Developer of the Original Code is Openbravo SLU. All portions are Copyright (C) 2001-2008 Openbravo SLU. All Rights Reserved.

Community Appliance

You can download and install a fully configured appliance that runs in your preferred virtualization environment. The appliance includes both Openbravo as well as its underlaying technology stack and allows you to get started with Openbravo in just a few minutes and with only a few clicks. Install now Openbravo 3.0MP2 Community Appliance!

Ubuntu Installation

Openbravo is included in the Ubuntu partner repository, so that you can add the software quickly and easily to your Ubuntu server. Install now Openbravo 3.0MP2 on Ubuntu!

Amazon EC2 Image

Openbravo has an EC2 AMI so you can just start a new instance of this AMI and have OB up and running in a matter of minutes. Install now Openbravo 3.0MP2 Amazon EC2 Instance!

Custom Installation

A custom installation gives you full control over your deployment environment and allows you to choose your preferred configuration for the technology stack. However, it requires you to install and configure all components of the technology stack as well as compiling Openbravo from sources. Install now Openbravo 3.0MP2 fully customized!

Using Openbravo

Have a look at the Openbravo 2.50 User Manual for extended information about Openbravo usage.
For the Openbravo 3 usage please follow Openbravo 3.0 User Manual.

Login into Openbravo

  1. Open your chosen web browser.
  2. In the address bar, type the context URL. The context URL takes the form:
    http://hostname:port/context_name
    For example:
    http://localhost:8080/openbravo

  3. The Login screen appears:
    Login.png

  4. In the Username box, type the default username Openbravo.

  5. In the Password box, type the defalt password openbravo.

  6. Click Login. Openbravo starts.
    SysAdmLogin.png

Login troubleshooting: If the error page HTTP Status 404 - File not found appears instead of the Login page, it means that there is a problem with the context URL. Check that the your_context_name directory has been created inside the Apache Tomcat webapps directory.
Note: the first time you log into Openbravo, the system logs you on using the System Administrator role, so you can only see administration tasks on the Application menu. If you try to access business options (for example Business partners, products and sales and procurement orders) the message AccessTableNoView will display instead. To access business options, you must change your role to an Admin role, such as BigBazaar Adminor Openbravo Admin.
  1. Click the Openbravo link in the upper left hand corner of the window. The User Options window appears.
    ChangeRole1.png
    From the Role Information menu, select an Admin role (Openbravo Admin or BigBazaar Admin).

  2. To set the Admin role as default, select the Set as default checkbox.



ChangeRole2.png

Configuring Openbravo

After Openbravo is properly installed and running, you can customize it to suit your country or region.
Have a look at the Openbravo 2.50 Configuration Manual for extended information about Openbravo configuration.

Installing a translation

Openbravo supports different languages. To translate the application into your language, download a translation.

Configuring the default date and time formats

To change the default Openbravo date format launch the setup tool inside the config/setup-tool directory.
Once all the changes are done, recompile and deploy Openbravo:
ant compile.complete.deploy

Configuring the default numbering format

You can modify the way numbers are displayed in reports for example whether , or . is used as the decimal point.
  1. In the directory where Openbravo is installed, navigate to the config folder.
  2. Using a text editor edit the Format.xml file.
  3. Modify the default numbering formats as required.
  4. Save the Format.xml file
  5. Restart the Tomcat service.

Upgrading

Upgrading from previous versions

An upgrade path is available from the 2.40 series to 2.50.

Upgrading to the latest maintenance pack

There are two possible ways of doing it: online and offline, depending if the server has an Internet connection or not.
Note: If you are upgrading from Openbravo 2.50MP2 or earlier, you first need to upgrade to MP3 using the Offline method, to then be able to upgrade to the latest version. Starting from 2.50MP3 updates can be applied cumulatively. For example, this means that you can update from 2.50MP3 to 3.0MP2 in a single step.
Bulbgraph.png   Community Appliance users who want to upgrade their appliance should first increase the system RAM memory to 1024MB at least. Prior it follow these instructions to activate your Openbravo instance.

Online

To update from 2.50 to the latest 2.50 maintenance pack (e.g. 3.0MP2) go to the Module Management Console inside Openbravo, click on Scan for updates and apply the Core update.
Note that this method works starting from 2.50MP6.
Scan-for-updates.png

Offline

If the server doesn't have a Internet connection available and you want to update from 2.50 to the latest 2.50 maintenance pack (e.g. 3.0MP2) download the Core OBX module from Partner Restricted Area and apply it using the Module Management Console inside Openbravo.
Bulbgraph.png   Starting from 2.50MP10 the OBX files are exclusive for Professional Subscribers and they're available in the Partner Restricted Area. The 2.50MP9 version is the last Community OBX, which can be obtained from its release notes page.

Other resources and links

Additional useful tips related to rebuilding the system when installing or upgrading modules or upgrading Openbravo Core could be found here. Some Mac Os articles for you to help with Mac.

Openbravo FAQ

Openbravo's Frequently Asked Questions (FAQ).

Support

For any question or doubt regarding Openbravo installation, post them in Openbravo Help forum or join #openbravo IRC channel in Freenode.

Openbravo User Manual

Have a look at the Openbravo 2.50 User Manual for extended information about Openbravo usage.

Openbravo Configuration Manual 

Source: http://wiki.openbravo.com/wiki/ERP/2.50/Openbravo_ERP_Installation/Custom_Installation

Search 2.0