odoo

Expected singleton: res.company() error Odoo

Expected singleton: res.company() error Odoo Question: I am creating an API that searches and reverses an entry in the account.move model. I am able to find the correct entry and reverse it using the refund_moves() method. However, whenever I try to confirm the reversed entry using the action_post() method, I get a "Expected singleton: res.company()" …

Total answers: 1

Custom controller very slow for some users, really slow for others

Custom controller very slow for some users, really slow for others Question: We have built a custom controller for a customer which passed products data and loads their products in a custom url. The controllers are basically like this: class CustomProducts(http.Controller): @http.route(‘/custom’, type=’http’, auth=’public’, website=True, methods=[‘GET’]) def render_custom_products(self, **kw): if kw.get(‘order’): if kw.get(‘order’) != "": …

Total answers: 2

How to make button in tree view clickable?

How to make button in tree view clickable? Question: I have tree view added in wizard. I made wizard window wider due to higher number of fields. I have added button to tree view according to these guides: https://www.odoo.com/es_ES/forum/ayuda-1/adding-buttons-to-one2many-list-tree-view-as-one-column-182263 https://www.youtube.com/watch?v=JsnsaSnH8-U Simplified form view <record model="ir.ui.view" id="vendor_connector_purchase_wizard_form"> <field name="name">vendor.connector.purchase.wizard.form</field> <field name="model">vendor.connector.purchase.wizard</field> <field name="arch" type="xml"> <form string="Vendor …

Total answers: 2

Is it possible in Odoo to redirect to my module's view on my module's installation?

Is it possible in Odoo to redirect to my module's view on my module's installation? Question: I have created a module called ‘Ticket Booking’ and I want to redirect to that module whenever it is installed or upgraded. NB : I want similar functioning like what happens when we install website in Odoo. I have …

Total answers: 1

What is **error: [Errno 32] Broken pipe** in Odoo?

What is **error: [Errno 32] Broken pipe** in Odoo? Question: Exception happened during processing of request from (‘192.168.15.184’, 44813)Traceback (most recent call last): File "/usr/lib/python3.8/SocketServer.py", line 593, in process_request_thread self.finish_request(request, client_address) File "/usr/lib/python3.8/SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python3.8/SocketServer.py", line 651, in __init__ self.finish() File "/usr/lib/python3.8/SocketServer.py", line 704, in finish self.wfile.flush() File …

Total answers: 1

How to install cryptography library on Docker container?

How to install cryptography library on Docker container? Question: I develop our company website with Odoo 14. I installed Odoo on my local machine (macOS Monterey (12.5.1)) via Docker. I use Docker Desktop and I have created docker-compose.yaml taking official Odoo docker image page as reference. version: ‘2’ services: web: image: odoo:14.0 depends_on: – db …

Total answers: 2

How to make onchange field editable only for draft state?

How to make onchange field editable only for draft state? Question: I have onchange field, and i need to make it readonly for all state except the draft state. My .py file: class SaleOrderInherited(models.Model): _inherit = ‘sale.order’ custom_field = fields.Char(string=’Test’, store=True, default=randint(1, 1000) ) @api.onchange(‘tax_totals_json’, ‘date_order’) def _onchage_test(self): for record in self: if int(json.loads(record.tax_totals_json)[‘amount_total’]) == …

Total answers: 1

fields_view_get does not exist in Odoo 16

fields_view_get does not exist in Odoo 16 Question: I was testing the modules of Odoo 15 that I developed in Odoo 16, I was using a lot of the method fields_views_get to have some behaviors to inject domain and context, before to render the component, but currently I can not find this method. Someone here …

Total answers: 2

XML field position behind an inherited form [ Odoo ]

XML field position behind an inherited form [ Odoo ] Question: I want to do this in XML PICTURE This is my actual code. I want the field shipment_preferente to be just behind the last inherited data. Hope you can help me with this guys! 😀 <record model="ir.ui.view" id="view_order_form_inherit"> <field name="name">sale.order.form.inherit</field> <field name="model">sale.order</field> <field name="priority">15</field> …

Total answers: 2