odoo-8

how to import QOH in odoo 8

我的未来我决定 提交于 2019-12-03 15:46:45
I want to update my stock in odoo either its by odoo frontend or using backend (postgres query). I have my stock value in csv file. Finally, I want to update quantity on hand in bulk. It's finally solved, simply follow the step Step – 1 ; 1-> select product in warehouse module (open in list view). 2-> select the product which you want to update the inventory . 3-> click on more button and export column i-> product name and any other one if you needed . you have file with name of product.temlate.csv . 4-> Add a column qty and enter the quantity of product . Step – 2; 1-> select inventory

Set and get store data Odoo with TransientModel

走远了吗. 提交于 2019-12-03 08:57:39
I'm trying to store config data in odoo, I need to store 3 reference to 'account.journal'. The model is created in database, the view is shown in configuration base menu, the data is store in database when I push the APPLY button BUT when I reload the menu the data is not shown The code use: from openerp import fields, models, osv, api, _ class Configuration(models.TransientModel): _inherit = 'res.config.settings' _name = 'transporte_carta_de_porte.config.settings' ft_mercaderia = fields.Many2one( 'account.journal',string='Debito ft mercaderia', help="Diario de ajuste al transportista por

What is difference between @api.one, @api.multi and @api.model?

只愿长相守 提交于 2019-12-03 06:23:50
I am confused regarding @api.one , @api.multi , and @api.model in Odoo. What are the differences between the three and what are their use cases? Andrius api.one is meant to be used when method is called only on one record. It makes sure, that there are no multiple records when calling method with api.one decorator. Let say you got record partner = res.partner(1,) . It is only one record and there is method for example (in res.partner ): @api.one def get_name(self): return self.name #self here means one record calling it like this works: partner.get_name() But if there would be more records,

How to Get the ID field value in Odoo [duplicate]

流过昼夜 提交于 2019-12-02 17:50:51
问题 This question already has an answer here : How do I get the value from a form field using Odoo? (1 answer) Closed 4 years ago . I'm new in Odoo 8 and have some difficulties getting the ID value of a object for example the ID field value of hr.employee, can you give me some sample in this matter 回答1: Please read the Official Doc for v8.0 , it will give you clear idea. For note, if your are using New API then you just directly create model_object and fetch using model_obj.id As on your example

When should I use XML-RPC instead of a Controller in Odoo?

僤鯓⒐⒋嵵緔 提交于 2019-12-02 15:13:57
问题 I'm very confusing with this both concepts of exchanging information. I asked a question few days ago and it seems I was doing wrong. Are the controllers web services or kind of? Only XML-RPC is a web service? So I would like to know when I should use a controller on Odoo and when I should use XML-RPC to exchange information between Odoo and any other different application. Which is the safest way? In my previous question I wanted the client to send me information about some customers to

How to Get the ID field value in Odoo [duplicate]

泄露秘密 提交于 2019-12-02 13:00:56
This question already has an answer here: How do I get the value from a form field using Odoo? 1 answer I'm new in Odoo 8 and have some difficulties getting the ID value of a object for example the ID field value of hr.employee, can you give me some sample in this matter Bazzinga... Please read the Official Doc for v8.0 , it will give you clear idea. For note, if your are using New API then you just directly create model_object and fetch using model_obj.id As on your example HrEmployee = self.env['hr.employee'] employee_id = HrEmployee.id 来源: https://stackoverflow.com/questions/32754056/how-to

Could not display Selected Image in Odoo 9

帅比萌擦擦* 提交于 2019-12-02 09:01:09
I have problem with image loading in product.template form view. When i upload a new image it is uploading and displaying correctly in product kanban view , but in product form view it is giving me error Could not display Selected Image as displaying in attached image Someone please tell me about why it is happening. I'll be very thankful .. 来源: https://stackoverflow.com/questions/37987347/could-not-display-selected-image-in-odoo-9

Odoo throws a MissingError On treeview Second line record

百般思念 提交于 2019-12-02 08:08:01
How can i solve this error Odoo throws a MissingError on TreeView Second line button when clicked . The first Record line works but i need such that for each record on the tree the code below will be able to pass the contexts and open the appropriate view . Kindly assist Here is the code called on the button @api.multi def action_four_weeks_schedule_form(self): self.ensure_one() res = {} ids = self._ids cr = self._cr uid = self._uid context = self._context.copy() for id in self.browse(self.ids): print 'id in ++++ ' , id order_obj = self.pool.get('ratecard.multiple').browse(cr,uid,ids)[0]

Override python function in odoo

放肆的年华 提交于 2019-12-02 03:04:42
I make some changes in the read_group function which is located in the odoo/server/openerp/models . What I need now is to override this function in my own module. So I copy this function in the .py file of my module but this doesn't work for me. Can any one tell me how to do that? Please find the example as below from openerp import models def read_group(): #YOUR OVERRIDDEN Function models.BaseModel.read_group = read_group For New API and old API compatibility issue you can also use _register_hook as given in example on this link. https://stackoverflow.com/a/34854721/1451220 来源: https:/

Are Odoo rules working OK actually?

偶尔善良 提交于 2019-12-02 01:33:09
MY PURPOSE I'm trying to use security rules to achieve the following purpose: I need to add in users model a field which will set which warehouses each user can modify. This is because I want to hide the stock moves you aren't allowed to see (stock moves of other warehouses). WHAT I DID I've created a Many2many field named allowed_warehouses in res.users model. From here, the administrator can select which warehouses can be used by each user. Then, I took advantage of the existing fields of Odoo, stock.move model has a Many2one field named picking_type_id , pointing to stock.picking.type model