Showing posts with label OpenERP. Show all posts
Showing posts with label OpenERP. Show all posts

Saturday, 12 January 2013

Create Desktop Launcher to start OpenERP server

Many end user don't know how to start OpenERP server from the terminal. Desktop launcher is the best way to start the OpenERP server for the non technical end user. Start up service is another way to start the OpenERP server automatically.
for that you need to install gnome panel. Install gnome-panel by running below command in ubuntu terminaAl.
sudo apt-get install gnome-panel  

Make a bash script which will run the OpenERP server. To make bash script create new file and write script as below.

#!/bin/bashcd <<path to openerp server>>#e.g. /home/mypc/openerp/server/python openerp-server --addons ../addons/,../openerp-web/addons/
and save it with .sh extension e.g server_start.sh 

now again write this in terminal 


gnome-desktop-item-edit --create-new ~/Desktop
 it will open a window as 

Add Launcher name as you wish. in the command give the path of the bash file(make sure the file is executable). and click ok. it will create a icon on the desktop.

Monday, 31 December 2012

Install required python packages for OpenERP v 7.0

To install OpenERP v7 on linux machine you required various python library. Run below command, it includes all python libraries in only one line.
sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-psutil

Wednesday, 31 October 2012

How to Install all modules at once in OpenERP

while starting the server you can add parameter in the server path like
./openerp-server --addons ../addons/,
                  ../openerp-web/addons/ -i <comma separated module name> -d <database name>
give list of module name separated by comma, it will install in the module in the given database.
 How to get the name of the all OpenERP module name:
module_id  = self.pool.get('ir.module.module')
module_ids = module_id.search(cr, uid, [])
string = ''
for i in module_id.browse(cr, uid, module_ids):
     string += str(i.name)+','
print "Module ::",string
 it will give you result like:
crm,account_voucher,point_of_sale,project,account_accountant,hr,sale,hr_timesheet_sheet,stock,mrp,purchase,project_gtd,project_issue,hr_recruitment,hr_holidays,hr_expense,account_asset,hr_payroll,account,account_analytic_analysis,account_analytic_default,account_analytic_plans,account_anglo_saxon,account_bank_statement_extensions,account_budget,account_cancel,account_chart,account_check_writing,account_coda,account_creditcard,account_enttec,account_followup,account_invoice_layout,account_payment,account_payment_creditcard,account_report,account_sequence,analytic,analytic_journal_billing_rate,analytic_user_function,anonymization,appf_recruitment,appraisal_survery,association,auction,audittrail,auth_openid,base,base_action_rule,base_calendar,base_contact,base_crypt,base_external_file_protocole,base_external_referentials,base_file_protocole,base_iban,base_module_doc_rst,base_module_quality,base_module_record,base_onchange_player,base_pop_up,base_report_designer,base_sale_multichannels,base_sale_report_synchronizer,base_scheduler_creator,base_setup,base_synchro,base_tools,base_vat,board,caldav,claim_from_delivery,crm_caldav,crm_claim,crm_fundraising,crm_helpdesk,crm_partner_assign,crm_profiling,crm_todo,decimal_precision,delivery,delivery_interface,document,document_ftp,document_webdav,edi,email_template,event,event_project,fetchmail,fetchmail_crm,fetchmail_crm_claim,fetchmail_hr_recruitment,fetchmail_project_issue,file_exchange,ftp_share,google_base_account,google_map,google_translate,hr_attendance,hr_contract,hr_evaluation,hr_payroll_account,hr_timesheet,hr_timesheet_invoice,html_view,idea,import_base,import_enttec,import_google,import_sugarcrm,knowledge,l10n_at,l10n_be,l10n_be_hr_payroll,l10n_be_invoice_bba,l10n_be_postal_subscriber,l10n_be_report,l10n_br,l10n_ca,l10n_ca-qc,l10n_ca_toponyms,l10n_ch,l10n_chart_ar,l10n_chart_at,l10n_chart_au,l10n_chart_be_frnl,l10n_chart_br,l10n_chart_ca_en,l10n_chart_ca_fr,l10n_chart_ch_german,l10n_chart_cl,l10n_chart_cn,l10n_chart_cn_traditional,l10n_chart_co,l10n_chart_cz,l10n_chart_da,l10n_chart_de_skr03,l10n_chart_hu,l10n_chart_in,l10n_chart_it,l10n_chart_it_cc2424,l10n_chart_lv,l10n_chart_nl,l10n_chart_nl_standard,l10n_chart_no,l10n_chart_pa,l10n_chart_pl,l10n_chart_se,l10n_chart_se_church,l10n_chart_se_food,l10n_chart_uk,l10n_chart_uk_netinsight,l10n_chart_us_general,l10n_chart_us_manufacturing,l10n_chart_us_service,l10n_chart_us_ucoa,l10n_chart_us_ucoa_ez,l10n_chart_ve,l10n_ch_vat_brut,l10n_ch_vat_forfait,l10n_ch_vat_net,l10n_cn,l10n_cr,l10n_de,l10n_ec,l10n_es,l10n_fr,l10n_fr_account_generation,l10n_fr_pcg,l10n_fr_report,l10n_fr_rib,l10n_fr_tva_franchise,l10n_fr_tva_reel,l10n_gr,l10n_gt,l10n_hn,l10n_in,l10n_it,l10n_lu,l10n_lu_report,l10n_ma,l10n_multilang,l10n_mx,l10n_nl,l10n_pe,l10n_pl,l10n_ro,l10n_simple,l10n_syscohada,l10n_th,l10n_tr,l10n_uk,l10n_us,l10n_uy,l10n_ve,lunch,magentoerpconnect,magentoerpconnect_bundle,magentoerpconnect_bundle_split,magentoerpconnect_init_stock,magentoerpconnect_partner_fiscal_category,magentoerpconnect_payment,magentoerpconnect_product_variant,magentoerpconnect_report_synchronizer,magento_product_auto_sku,magento_sku_is_code,mail,marketing,marketing_campaign,marketing_campaign_crm_demo,membership,mrp_enttec,mrp_jit,mrp_operations,mrp_repair,mrp_subproduct,multi_company,Multiple_SMTP_Serever,npg_account_make_deposit,pad,pad_project,plugin,plugin_outlook,plugin_thunderbird,portal,print_barcode_label,process,procurement,product,product_brand,product_enttec,product_expiry,product_gift,product_images_olbs,product_links,product_links_goodies,product_links_sync,product_m2mcategories,product_manufacturer,product_margin,product_multi_price,product_quick_stock_rule,product_sequence,product_serialno,product_visible_discount,profile_tools,project_issue_sheet,project_long_term,project_mailgate,project_messages,project_mrp,project_planning,project_retro_planning,project_scrum,project_timesheet,purchase_analytic_plans,purchase_double_validation,purchase_requisition,report_aeroo,report_aeroo_ooo,report_aeroo_printscreen,report_aeroo_sample,report_designer,report_intrastat,report_synchronizer,report_webkit,report_webkit_sample,resource,sale_analytic_plans,sale_automatic_workflow,sale_crm,sale_enttec,sale_exceptions,sale_journal,sale_layout,sale_margin,sale_mrp,sale_order_dates,sale_quick_payment,sale_weight,share,ship_management,shop_floor_interface,stock_enttec,stock_invoice_directly,stock_location,stock_no_autopicking,stock_planning,subscription,survey,users_ldap,warning,web,web_calendar,web_dashboard,web_diagram,web_gantt,web_graph,web_hello,web_kanban,web_livechat,web_mobile,web_process,web_rpc,web_tests,web_uservoice,wiki,wiki_faq,wiki_quality_manual,wiki_sale_faq,

Tuesday, 10 July 2012

_constraints in Openerp

_constraints

    _constraint is a predefine field in OpenERP. It is used for adding a constraint on the object. It takes list of touple as its argument.The touple inside the list contains three parameter

1. Method(to check the constraint)
2. The Message(Constraint for End User)
3. List of Fields(fields to apply the constraint)
   
    _constraint will fire if the condition returns False on creation and updation of the record and display the message.

    The example code for the _constraint is displayed bellow.
   

 def _check_length(self, cr, uid, ids, context=None):
    record = self.browse(cr, uid, ids, context=context)
    for data in record:
        if data.length < 0:
            return False
    return True

 _columns = {
        'length': fields.integer('Length'),
    }

 _constraints = [(_check_length, 'Error: Length must be Positive', ['length'])]



    In the folloeing example the constraint is set on length field, when the record saved in the database it will check if the length is positive or negative, if it 's negative the constraint gets fired and the message will be display to end user.

Thursday, 16 February 2012

Image In OpenERP Web Kit Report

This is the Blog Post About How to put a image in OpenERP Custom Module, 

It is Quite easy To Put a image in The PDF fire. You just Need a binary field in Your Model, 

i have taken the example of Company logo in OpenERP, Which is the base class in OpenERP. The Name of the model is res.company 

I Think You Know About the MACO Template, and How To Customize it, if Don't no worries Please Comment it down,

<div id="exq">
        ${helper.embed_image("jpg",company.logo, width=100, height=100)}
        <img src="" alt="" >
</div>                                                                                                                          

In the module report_webkit There is a file report_helper, this file contain some methods like 
    • embed_image
    • get_logo_by_name
    • embed_logo_by_name
using This Method You can Put a image inYour webkit report .

For Any Query Please Comment.