Oct 19, 2012

[SOLVED] openerp 6.1.1 cannot inherit view sale.view_order_form

few days ago, i work on inheritance some views, there are so many ways to do that, you can use inherit_id with ref="view_id_that_you_want_to_inherit", but there are some views must use different ways.

i need to show you basic concept of view management in openerp first,

1. every views has id, you can name it by yourself or just check on debug view mode, some test was use this XML ID

2. some views of your module will inherit view that has been changed by other module on that time, sometime you don't realize it.

from those pictures, you can see that so many module want to inherit view_order_form 

3.  every view has priority, you should add this property to make your view is still valid while it inherit by other module.

4. some view (parent view) are very complecated structures, even you use xpath or copy its structures, sometimes its not work.

 well, on my case, to inherit view_order_form with complicated structures, just add data tags ( <data> ) for your new fields. see this :

Read more ...

[SOLVED] openerp 6.1.1 "No handler found."

2 days working on this error, i do solved this error,

No handler found

message was store on wsgi/core.py on application function.

def application(environ, start_response):
    """ WSGI entry point."""

    # Try all handlers until one returns some result (i.e. not None).
    wsgi_handlers = [
        ] + module_handlers
    for handler in wsgi_handlers:
        result = handler(environ, start_response)
        if result is None:
        return result

    # We never returned from the loop.
    response = 'No handler found.\n'
    start_response('404 Not Found', [('Content-Type', 'text/plain'), ('Content-Length', str(len(response)))])
    return [response]

# The WSGI server, started by start_server(), stopped by stop_server().
httpd = None

Since all basic module was loaded on memory by proxing all processing, my first diagones pointed on basic-modules will all of its heritance.

Yes, thats true, i do big modification on sale, pricelist, etc... (because i can not inherit it perfectly).

because it will be loaded to memory, for all function should be have default values, even by None values.

on my case, i found one parameter which is none of default values :

def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
            uom=False, qty_uos=0, uos=False, name='', partner_id=False,
            lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False, base_location_id=1, context=None):

if i make

def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
            uom=False, qty_uos=0, uos=False, name='', partner_id=False,
            lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False, base_location_id, context=None):

then it will be "No handler found"

So: Always assign default value on your function parameters.
Read more ...

Oct 6, 2012

[SOLVED] OpenERP Cannot change the category of existing UoM

During change UOM Category on OpenERP, i got error that shown it can not change the value with the new one.

OpenERP Cannot change the category of existing UoM

the problem is on "category checking", i guess its needless, because while inserting new value, there is taken from combo-box option. You can see below :

here is my step to solved this
  • go to addons/product/product.py
  • comment or remove some script as shown below : 

commenting that, restart your server and everythings DONE.
Read more ...

Jan 30, 2012

General Intelligence Part 1

Previously, i wrote this topic for it's implementation in FB (Facebook intelligence part 1,2,3), now, it will continued by this narration.

Inspired from some friends who know not about their children's do, i hope you read my note to be studied, improving your basic ability in intelligence is a must i guess.
I need to summaries it for you, so it will helpful towards obviously. It still in general views then in the end of parts, i will direct to give real example for you its implementations.

What Is Intelligence?
Despite the many definitions of “intelligence” that have been promulgated over the years, the simplest and clearest of these is “information plus analysis equals intelligence.”

analysis requires thoughtful contemplation that results in conclusions and recommendations. Thus, computers may assist with analysis by compiling large amounts of data into an easily accessible format, but this is only collated data; it is not analyzed data or information, and it falls far short of intelligence. For information to be useful, it must be analyzed by a trained intelligence professional. In other words, intelligence tells officials everything they need to know before they knowledgeably choose a course of action.

Tactical Intelligence Versus Strategic Intelligence.
Tactical intelligence contributes directly to the success of specific investigations. Strategic intelligence deals with “big-picture” issues, such as planning and manpower allocation.3 Tactical intelligence directs immediate action, whereas strategic intelligence evolves over time and explores long-term, large-scope solutions.

Why Intelligence Is Critical
Intelligence is critical for decisionmaking, planning, strategic targeting, and crime prevention.

Planning and Direction
Planning how data will be collected is key to the intelligence process. Planning and collection are a joint effort that requires a close working relationship between analysts, who understand how to manage, compile, and analyze information, and intelligence officers, who know the best ways to obtain information.

Planning requires an agency to identify the outcomes it wants to achieve from its collection efforts. This identification directs the scope of the officers’ and agents’

Data collection is the most labor-intensive aspect of the intelligence process. Traditionally, it has been the most emphasized segment of the process, with law enforcement agencies and prosecutors dedicating significant resources to gathering data

Processing/collation involves sifting through available data to eliminate useless, irrelevant, or incorrect information and to put the data into a logical order.

Analysis is quite simply a process of deriving meaning from data. The analytic process tells what information is present or missing from the facts or evidence. In law enforcement intelligence operations, data are analyzed to provide further leads in investigations, to present hypotheses about who committed a crime or how it was committed, to predict future crime patterns, and to assess threats facing a jurisdiction. Thus, analysis includes synthesizing data, developing inferences or conclusions, and making recommendations for action based on the data and inferences. These inferences constitute the finished intelligence product.

Dissemination requires getting intelligence to those who have the need and the right to use it in whatever form is deemed most appropriate. Intelligence reports kept within the intelligence unit fail to fulfill their mission. Those who need the information are most often outside the intelligence unit; therefore, the current dissemination protocol is to share by rule and to withhold by exception.

Reevaluation is the task of examining intelligence products to determine their effectiveness. Part of this assessment comes from the consumers of intelligence; that is, the managers, investigators, and officers to whom the intelligence is directed
Read more ...