openerp

getting error ImportError: No module named 'odoo.report' in odoo 11

我与影子孤独终老i 提交于 2019-12-11 06:44:54
问题 I'm getting an error ImportError: No module named 'odoo.report' while converting my codes from odoo version 10 to odoo version 11. My code is given below and how can I use those following code in Odoo 11? from odoo.report.render.rml2pdf import utils from odoo.report.render.rml2pdf import color Thanks in advance 回答1: In odoo 11 no need to use odoo.report lib. It is deprecated. You can use odoo.tools insted of that. Just import it with following statement: from odoo.tools import report 来源:

How to hide projects in “my timesheet” for users not assigned to the project in openerp 7.0?

牧云@^-^@ 提交于 2019-12-11 06:42:33
问题 Currently i have a question regarding the my timesheet function. If i create a project and select the timesheet/stundenzettel box, the employees are able to enter their working hours on the specific project using the my timesheet/"mein stundenzettel" function. So far so good. Unfortunately every user can book on every project where the timesheet/stundenzettel box is checked, regardless if he is a member of the project team or not. As an example i have some freelancers working and some

Creating security groups for a custom module in odoo 10

三世轮回 提交于 2019-12-11 06:38:04
问题 I have created a custom module on odoo 10. Now I wanted to create security groups with users where each group have a particular menu of my custom module. I've already asked this question and I followed the answers that I got but I did not get the results (I definitely messed up at some point but I can't see where, this is my first time working with odoo) so I ask again the question. Here's what I did: I created a file security.xml in my security folder with contain the following <?xml version

How to hide or disable “Edit” button in Odoo 9

試著忘記壹切 提交于 2019-12-11 06:24:53
问题 Can anyone help me how to hide or disable Edit and/or Create button when my workflow status value is "Done" I have workflow status "Draft > Approval > Confirmed > Done" so when status is Done i want 'Edit' to be hidden or disabled. Please help. thanks in advance. 回答1: You should be able to create a security rule which restricts write access when the status is done. Something like this. If you have a group you wish to specify then select it. If you have no group I am not sure however you may

How do i make and attache action to button

久未见 提交于 2019-12-11 05:59:51
问题 Hello I have created a button on my Odoo 10 form "SET geprint" now i want to attach an action to the button. If i press the button the value of the boolean geprint must change to 1. How can I make this possible? If possible i would also like to create that button in the list view to update multiple records. Thx for your help I tried your code but i am getting the following error now (name field to update is x_geprint) button code : 回答1: You can do it via following methods . Create object type

Odoo how to filter many2one field values in one2many field

馋奶兔 提交于 2019-12-11 05:59:25
问题 I have many2one field name_id . Usually when I use it in my_model.xml code below in this field I can select from all the values written in my.model.line . In this case I want to filter values and see the list of only these values which are written in current my.model. my_model.xml <record model="ir.ui.view" id="view_my_model_form"> <field name="name">my.model.form</field> <field name="model">my.model</field> <field name="arch" type="xml"> <form string="My Model"> <header> <field name="my

Showing created by user name on OpenERP records

醉酒当歌 提交于 2019-12-11 05:56:09
问题 On any record/object in OpenERP, such as Journal Voucher, Journal Entry, etc. is there a way to show which user created or posted this record? I would like to show this on the record itself when we open the detail view. Ideally this should also be visible in the search grids. The audit trail feature lets you view it in a separate area and it captures a lot more detail, but I would like to capture and show only the user name who worked on a record. Thanks 回答1: You can use write_uid, create_uid

How to remove “save&new” button from popup in odoo?

大兔子大兔子 提交于 2019-12-11 05:49:14
问题 I have a one2many field, and when I click to create a new record, I have 2 buttons. I want to remove the "Save & New" button and keep the "Save & Close" button. 回答1: I hope you do not mind sleazy hacks. In your form view you can try this. You may need to clear your cache before it works for you. This is only sensible if you do not want it to appear but its not really a security thing just for looks and process. You may need to ensure the class selector is correct for your version. I tested

Odoo 10.0 invalid constraint

浪子不回头ぞ 提交于 2019-12-11 05:47:19
问题 I've asked this question on odoo.com here. I'm trying to replace a field in the product.template view with a field of my own. In the gui, click Sales/Sales/Products, select a product, click the Invoice tab - I want to change the "Add Task to Project" option to "Generate project from Template". That's the ultimate goal - but first I need to be able to at least add a field to the template view, and I'm failing at that! Following the suggestions in the book https://www.amazon.co.uk/Odoo

How to Dynamic change paper format margins (Left, Right, Top, Bottom)?

百般思念 提交于 2019-12-11 05:26:39
问题 I want to change my report paper size dynamically while printing pdf report. Like I have type in my object. When type change then, I want to change my report margin(top, bottom, left, right) which value configure as per margin. Thanks for your valuable help 回答1: You can override the method that calls wkhtmltopdf and manipulate the parameters passed there. See odoo.addons.report.models.report.get_pdf function. You can override this, check your variable and call _run_wkhtmltopdf with different