odoo-10

Disable automatic addition of partner as follower in Odoo 10

冷暖自知 提交于 2021-02-18 08:38:53
问题 How can I stop automatic addition of partners as followers in Odoo 10. Whenever I create a new quotation or opportunity, the partner is automatically added to the followers list and an email notification is send to the partner which I don't want. How can I prevent this from happening? 回答1: You can do it using simple method. Ex: class sale_order(models.Model): _inherit="sale.order" @api.model def create(self,vals): res=super(sale_order,self.with_context('mail_create_nosubscribe':True)).create

Print report on print button in odoo10

筅森魡賤 提交于 2021-02-11 15:40:26
问题 Hi I am having a problem in printing the report. I have coded the report format in html and then made its module and attached it with the relevant model. and upload it on my online server First I was receiving this error : Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt,

Added users to Many2many field disappear after click save

久未见 提交于 2021-01-29 04:10:28
问题 I try to add users to many2many field. It's working to moment before clicking save. When i click save it's disappear. But if i before add some extra element do this field, other element stay after clicking save. Code: @api.multi @api.onchange('partner_id') def find_projects(self): mail_followers = self.env["mail.followers"] projects_follower_id = mail_followers.search([('partner_id', '=', self.partner_id.id), ('res_model', '=', 'project.project')]) projects_list = [] for x in range(len

How to organize many2many checkboxes in lines (rows) rather than columns?

独自空忆成欢 提交于 2021-01-28 03:03:03
问题 I am creating one module where I have a Many2many field and I would like to convert it into a checkbox group. I have written this in my XML view to achieving it <field name="location_ids" widget="many2many_checkboxes"/> But the field is shown all the options in a long column. I would like to show the options in multiple rows as in the following image: 回答1: I think I have found a good approach for you. Research First I have search the original template which is rendered with the widget

How to organize many2many checkboxes in lines (rows) rather than columns?

我的未来我决定 提交于 2021-01-28 00:47:43
问题 I am creating one module where I have a Many2many field and I would like to convert it into a checkbox group. I have written this in my XML view to achieving it <field name="location_ids" widget="many2many_checkboxes"/> But the field is shown all the options in a long column. I would like to show the options in multiple rows as in the following image: 回答1: I think I have found a good approach for you. Research First I have search the original template which is rendered with the widget

Method to get product price for a given customer

浪子不回头ぞ 提交于 2021-01-07 03:46:23
问题 I need to retrieve product price via XMLRPC. I am using Product Price Lists so each customer can be assigned a given price list which gives specific discounts based on categories, etc. I am struggling to find which method can be used to retrieve the price for a given product_template id at a given quantity, if that is actually possible. So far I have not been able to try any specific method as I can not identify how can this be achieved without actually creating a sales order. 回答1: The module