odoo

Domain for Many2One field not working in odoo

梦想与她 提交于 2021-01-28 05:40:13
问题 I have an Entity payment (pago) with a Many2One field bill (factura). A bill could have 3 states 'creado', 'pendiente' y 'pagado'. I want to add a domain for the Many2One field: For each payment you can only select a bill in the states 'creado' y 'pendiente'. I have tried with the following code but ii is nt working class PlanificacionFactura(models.Model): _name = 'utepda_planificacion.factura' _rec_name = 'numero' _description = 'Factura' _inherit = ['mail.thread', 'mail.activity.mixin']

what does attachment=True do odoo 13

一世执手 提交于 2021-01-28 04:57:16
问题 I created a custom module in which I have this field record_file = fields.Binary(string='file', attachment=True, help='Upload the file') from what I understand attachment=True should save my images or pdfs to ir.attachment but am not seeing any there am I doing something wrong 回答1: You are not doing something wrong, ir.attachment records are hidden when the value of res_field (a Char field) is set. When you upload the file and save, an attachment is created and the value of the res_field is

XML Odoo field conditional color formatting

混江龙づ霸主 提交于 2021-01-28 04:21:05
问题 I'm working with Odoo and studio. I want to format a selection field text based on the selected value using XML. Here is what I have already tried but it has no effect at all: <field name="my_status" string="Status" colors="orange:my_status == 'negotiation';green:my_status == 'signed';purple:my_status == 'internal'"/> I have also tried: <field name="my_status" string="Status" decoration-success="my_status == 'signed'" decoration-danger="my_status == 'negociation'" decoration-muted="my_status

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

How to format Qweb variables in Odoo

非 Y 不嫁゛ 提交于 2021-01-27 22:56:40
问题 I have been trying to display a calculated variable in qweb separated by comma's. <td align="right"> <t t-set="total" t-value="0"/> <t t-foreach="l.invoice_line_tax_id" t-as="t"> <t t-set="total" t-value="total + (t.amount * l.price_subtotal)" /> </t> <span t-esc="'%.2f'%(l.price_subtotal + total)"/> </td> - This line displays the values with decimal points, whereas the digits before decimal is not separated by comma's. For example, the above code would display value as 400000.00 whereas I

全球第一免费开源ERP Odoo Ubuntu最佳开发环境独家首发分享

流过昼夜 提交于 2021-01-12 07:27:09
起源 近年来随着国内的互联网经济的快速腾飞,诞生了很多开源软件创造的市场价值以及企业价值神话,特别是对于企业ERP领域,一直以来都是高昂的国内外产品充实,国内的中小成长型企业越来越需要一套好看又能打,死磕性价比的开源替代解决方案用于解决企业的管理与投入并存的信息化难题,从2011年开始由开源智造为代表的最早国内开源软件服务企业为这夙愿贴补国内空白服务领域而扎根至今。也是因为开源智造的不懈努力,才造就了一大批的国内的用户、教学研究者、个人爱好者、从业者纷纷投入全球第一免费开源ERP Odoo的事业中,形成了蓬勃的美好生态前景。 当然发展必然有时代问题,时代问题造就了版本问题,故而国内多数客户分别分布在8、9、10、11、12等多数版本中,虽然国内一些爱好者为了解决这一问题也一直在更新开发环境,但都是以单个版本形式存在,有的也搞出类似的Windows绿色版,但Odoo最佳的开发环境是Ubuntu与MacOS,官方一直推荐以Ubuntu为最优开发环境,以保障开发后的结果能迅速部署在生产环境中。 这时需要有一套基于Ubuntu且能包含Odoo最大的用户群的多版本的开发环境的诉求就此诞生,但去整合和底层优化这套开发环境并不容易,Odoo官方也仅仅是基于Ubuntu原生版本做了个11、12的二合一的开发环境版,缺点是不符合国内的开发人员使用,对开发人员的使用要求过高,无法做到大面积的普及作用

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

Odoo 14: Add a section functionality in tree view

社会主义新天地 提交于 2021-01-04 06:41:49
问题 I need add a section functionality like sales > quotation view has, in one of my tree views. . Code of my view is something like this: <record id="view_qualification_form_inh" model="ir.ui.view"> <field name="name">hr.applicant.form</field> <field name="model">hr.applicant</field> <field name="inherit_id" ref="hr_recruitment.hr_applicant_view_form" /> <field name="arch" type="xml"> <xpath expr="//field[@name = 'description']" position="after"> <notebook> <page string="Qualification"> <field

Odoo 14: Add a section functionality in tree view

萝らか妹 提交于 2021-01-04 06:41:45
问题 I need add a section functionality like sales > quotation view has, in one of my tree views. . Code of my view is something like this: <record id="view_qualification_form_inh" model="ir.ui.view"> <field name="name">hr.applicant.form</field> <field name="model">hr.applicant</field> <field name="inherit_id" ref="hr_recruitment.hr_applicant_view_form" /> <field name="arch" type="xml"> <xpath expr="//field[@name = 'description']" position="after"> <notebook> <page string="Qualification"> <field