Featured
-
Function calling on button click in OpenERP
Adding a button on an OpenERP view is very easy an
by dinesh.singh
Tags
How to notifychannel API and logging module instead in OpenERP
In OpenERP notifyChannel API shouldn't be used anymore because API is used to connect to other framework. OpenERP provide the logging module instead and it is used for any one in OpenERP server.
Use this funtion given below
def notify...
How to handle a rpc call in OpenERP
In OpenERP rpc help to change the post, like user want to excute two server in same systems then use rpc and change port number of other server. Basically rpc is used to run server in local systems.
Use this function given below
def rpc(s...
How to calculates quantity and Confirms production order in OpenERP
In OpenERP first we create the product and then calculates the quantity of product. In product form picking Id is generated and picking id will return to the value of this product and then product will calculated automatically in stock.
U...
How to retrun partner delivery address in OpenERP
In OpenERP first create delivery address in delivery form and then we need to define a partner for the brand of the product and also dedicated_delivery_address stand for the case a new type of address. In stock form move all the delivery address ...
How to create users in login form in OpenERp
In OpenERP first create the users and then users is retrieve an active resource of model res_users with the specified login. When users login in web page then verify all the rights and authentication. If users rights and authentication both is fi...
How to Share filter created by user in OpenERP?
In OpenERP first we create users and configure users access rights, then user will create a new filter, use filter group and also add a new ir.rule entry for model_id and domain on the target group_id. If restrict is True then instead of adding a...
how to add access rights and group_id in object models in OpenERP
In OpenERP to add access rights and group_id in object models first we have to create users and users have many type of access rights and those access rights were provided by admin. object models reference in fields_relations intersects with acce...
How does tuples represent recursive relationships type in OpenERP
In OpenERP, Tuple represents recursive relationship of type and the tuple models is a browsable model which start loading relationships type from and use it param ttypes which is a list of relationship types and follow 'one2many' and '...
How to Create a new res.users record for each email address in OpenERP?
A new res.users for email address is created for wizard_data. If users already exist then a new res.users will be ignored. New res.users also have a value for the password field, so that they can receive it by email and Returns the ids of the cre...
How to create function to returns value of product name, unit price based on event in OpenERP?
In OpenERP first you have to create the product and price of the product and then relate both price and product to the event form and return the value of the product and validate it to database like as in param self and param cr. Param self ...
How to create function of open event registration and send email to user in OpenERP
In OpenERP, first we create registration in event form and then pass the param ids like as list of event registration's IDs and also mapp to the standard dictionary for contextual values than we create email for users and validate to the even...
How user clicks the selection's icon in the web client in OpenERP
In OpenERP for clicking the selection's icon in the web client, first create the users and check all rights of the users and than click the selection icon in web client and compose a default action for the model in the user's selecti...
How to create wizard resource and return the action in OpenERP
In OpenERP when creating the wizard resource than the action of form is returned so agian we have to create the users and relate it to wizard resourse and also clicks the init icon in the web client than retrieve translated version of wizard'...
Apply mutations on the user's saved selection and report back to the client in OpenERP
In OpenERp we first create report of the client and apply mutations on the user's saved selection of the search domain to be processed. The domain is only processed if no ids are present. If both domain and ids are missing, this will lead to ...
How to create Opens Wiki Page of Group in OpenERP
In OpenERP to create opens wiki page first you have to create the current row and than the current user’s ID for security checks. user ID find List of open wiki group’s IDs and also maps the dictionary of open wiki window on giv...
How to create print template of the survey in OpenERP
In openerp to create print template of the survey means that first check response or survey and if response is available then print this response otherwise print survey form and the current row, from the database cursor and also the current user&...
How to create Picking List when planned date if it is greater than value in OpenERP
To create the picking list of User defined argument and to the calculates planned date if it is greater than value and than if condition is true and its also user defined argument so you have to validate the Name of field and also Value of field ...
How to Compute stock value and stock quantity in product stock in OpenERP
When we create the product(real and virtual) and computes the stock value and quantity of product in stock and validate than the product(real and virtual) is also maintained in the stock and updated in warehouse and also returns the dic...
How to generates and returns pdf version of a report in openerp?
In openerp you make a request to read the assets while the transaction creating is not done and As the assets are generated during the same transaction and the rendering of the templates will call them. There is a scenario where the assets are un...
How to generates and returns html version of a report in openerp
In openerp If the report is using a custom model to render its html and fallback on the generic html rendering. report is generates and returns html version of a new report.
use this function in your own module in .py file,
def get_html(...
How to create and Allow to render a QWeb template python-side openerp
In openerp render function returns the 'ir.ui.view' but embellish it with some variables/methods used in reports. param values is additional methods/variables used in the rendering returns is html representation of the template.
use this code sh...
How to Register the given presence of the current user in openerp
In openerp register the given presence of the current user, and trigger a im_status change if necessary. The status will not be written or sent if not necessary and param user_presence : True, if the user (self._uid) is still detected using its b...
How to Disconnect the users having a too old last_poll in openerp
In openerp to disconnect user and show the massage that user is disconnected and users having to old last_pool and search the limit date and write the status presences when presences is offline.
use this function .py file show in given below,
...
How to get previous date of date in openerp
In openerp first install the resource module and inherit the object of resource.calendar and If no calendar is provided, just return the previous day and day of a resource.calendar. If calendar resource is no given simply remove one day from the ...
How Utility method removes leave intervals from a base interval in openerp
In openerp It will first clean the leave intervals, to have an ordered list of not-overlapping intervals and initiate the current interval to be the base interval then before finishing skip the current interval and go to next beginning after the ...
How to Dispatch postgres notifications to the relevant polling threads and greenlets in openerp
In openerp Dispatch PostgreSQL notifications to the relevant polling threads to Bus.loop listen imbus on db PostgreSQL and create the listen imbus and check the condition dispatch to local threads and greenlets in channel.
Example
use this code...
How to handle a longpolling request in openerp
In openerp to handle a long-polling request, we need to bypass private attribute access because we do not know before starting that the thread and handles a long-polling request and rename the thread to avoid tests waiting for a long-polling.
Ex...
Convert the amount in company currency using the currency rate and voucher conversion in openerp
To convert the amount in company currency using the currency rate and voucher conversion in openerp.
use this function def _convert_amount in .py file in account voucher module in openerp
def _convert_amount(self, cr, uid, amount, voucher_id,...
How to inherit and add new fields in account module in openerp
In openerp first install account module and inherit the views of account module and pass the id of account module views form xml file then give reference in your own module and add your new fields in xml file.
Use this code in your own module in...
how to create filter in openerp?
To create a filters in OpenErp,
First install product module and inherit view of product module and use filtering for particular fields and create filter in your own module. For example use this below code in .xml file
<record id="rent_p...
Waht is a functional field and how to calculate it's value
A functional field is a field whose value is calculated by a function in openerp, hence in openerp functional fields values is calculated by the function and its process of function given below,
Parameters:
fnct,
arg=None,
fnct_inv=None,...
How to get image in product module in openerp
To get small image in product module first inherit the product.product object in product module and add one fields like image_small and write the fucntion _get_image in your own module in openerp.
for example you can use the below fucntion in .p...
How to check your description is valid or invalid in openerp
First install the description module and check weather the description in valid or invalid you can do this on basis of the partner name and company name and user signature and also date in description module in openerp.
using below fucntion in ....
How to check company unique or not in openerp
To configure and check weather the company is single or double in openerp you have to write this function in your own module in .py file,
def check&_companyuniq(self, cr, uid, ids, context=None):
sr_id = self.search(cr,uid,[],cont...
How to override field_view_get field in orm model in openerp
In openerp first override the orm model and add fields field_view_get in orm model then return the Dictionary of Fields, arch and toolbar in orm model.
you can use this function as given below.
def fields_view_get(self, cr, user, view_id=Non...
How to create a new record in board.board object in opererp
In openerp first install board module and inherit object and views in board module and check the current users id values and dictionary values for every fields and then create new record in board module in openerp.
you can use this function as...
How to create view in board.board object in openerp
In openerp first install board module and inherit object in your own module and write this function name createview and this function will check the user id and list of the board id in board.board object in openerp.
You can use this as given bel...
Different position values used in xpath
In Odoo/OpenERP many times we need to inherit views in order to add/remove/replace few elements of the original view. Simple use of `` can make that easier. With this tag we have to provide an attribute called "position". This attribute contains ...
How to override method that generated the link to access the document in openerp
In Openerp first Override the method of function and then write the function in your own module and link the documents at of the classic form view and redirect the documents to the online quote if exists using this get_access function as show in ...
How to override the function and confirm the sale order when transaction is done in openerp
To override the function first install the sale module and override the class sale.order and set draft and use feedback function as show in given below code
def feedback(self, cr, uid, data, acquirer_name, context=None):
tx = None
...
How to Return the 1st UoM present into the Duration category in openerp
First create fields rent_duration_unity in your own module then create class and use this rent_duration_unity fields which you created first
in .py file, as shown in code given below.
'rent_duration_unity' : fields.many2one('product.uom', s...
How to Onchange of product and sets some values in openerp
In product module use onchange function and sets some value and return dictionary of value in on_client_changed function to first inherit the product module class like as product.template class and then use this function in .py file in openerp
u...
How to create an osv_memory wizard systems in Odoo-9 ?
In osv_memory wizard, just create a normal object, But in place of inheriting from model.model you should it from Inherit from model.model_memory.
Methods of wizard are inside the object and if the wizard is complex, You can define workflow on...
Activate the developer mode and Updates, Update Apps List and Apply Scheduled Upgrades in Odoo-9
Step-1 Go to browser.
Step-2 Click on Question Mark which is located under your (?) in the top right corner of Odoo.
Step-3 Click on about and Updates,Update Apps List and Apply Scheduled Upgrades.
Step-4 Click on acti...
Remove 'provision' from selection list when configuring Cash Flow Codes in OpenERP(Odoo)
In below example, I have written Python script to remove 'provision' from selection list when configuring Cash Flow Codes . see below python code and use it in .py file :
def fields_get(self, cr, uid, fields=None, context=None):
res = super...
How to Add followers linked to new partner in OpenERP(Odoo)?
To add followers linked to new partner fields first we have to go in .py file (Python file) After that we have to decide where we want followers linked to new partner fields and then write start to end python code in .py file:
for field in fi...
How to get oldest cache time in point of sale module in openerp
To achieve the oldest cache time first you have to install point of sale module and inherit the pos_config class in your own module and fetch cache ids in pos_config class and then use this function in your own module.
@api.depends('cach...
How to set process in subscription module in openerp?
To set process in subscription module, first you need to install subscription module and set interval number and interval type fields in subscription module is used to set the process. You can use this function as given below
def process(self...
How to create different units of measure in Odoo?
To create Unit Of Measure(UOM) in openerp first install sale module and go to sale module menus in openerp and following these step given below
Step-1 go to Sales Configuration menu and click it.
Step-2 then go to Configuration Settings->...
How to Generate all the objects from the templates in openerp
TO Generate all the objects from the templates in wizard follow below given point in openerp
1-param company: It refers company the wizard is running for.
2-param code_digits: It is a number of digits that accounts code should have in the COA
...