Odoo 18 Development Assessment - Answer Key

Just highlight and ticks some answers for fun, they are not correct!

Question 1

You are developing a human resources module in Odoo 18 and have a model for employee contracts, hr.contract. A business rule states that the date_end (contract end date) must always be after the date_start (contract start date). If a user tries to save a contract where the end date is before or the same as the start date, the system must prevent the save operation and show an informative error message. Which ORM decorator is the most appropriate tool to implement this kind of validation rule that checks field values at the database level?


Question 2

A client requires a new "Commission" field on the res.users model in Odoo 18. This field should be visible and editable only by users who have "Administration / Settings" access rights. Additionally, the value of this field should be hidden from all other users, even via export or RPC calls. The implementation must be secure and follow Odoo's best practices. Which of the following elements are required for a complete and secure implementation? (Select all that apply)


Question 3

You are building a custom dashboard in Odoo 18 and need to display a key performance indicator (KPI): the total untaxed amount of all confirmed sales orders from the last 30 days. This value needs to be calculated efficiently in a single database query. You have a model sales.dashboard with a total_sales_last_30_days float field. Which of the following are valid and efficient ways to compute this value and assign it to the field? (Select all that apply).


Question 4

A client wants to completely overhaul the form view of res.partner in their Odoo 18 instance. Their requirements are: 1) Remove the "Sales & Purchases" notebook page entirely. 2) Move the vat field from its original position to be right next to the partner's name. 3) Add a new button in the header to "Verify Address" which calls a server action. 4) These changes must be in a custom module, and the final view should have a higher priority than other inherited views to ensure these changes take precedence. Which of the following steps are critical for correctly implementing this view overhaul? (Select all that apply).


Question 5

You are tasked with creating a custom reporting feature in Odoo 18 for fleet management. The requirements are: 1) Create a wizard that allows the user to select a start date and an end date. 2) When the user clicks a "Generate Report" button on the wizard, the system should generate a new custom QWeb PDF report. 3) This report should list all fleet.vehicle.log.services records that fall between the selected dates. 4) The wizard should then close, and the user should be prompted to download the generated PDF. Which of the following components are essential to build this feature? (Select all that apply)


Question 6

You need to extend the functionality of the mail.thread mixin in Odoo 18. The goal is to automatically add a specific user, the "Compliance Officer", as a follower to any new record created on certain models (e.g., purchase.order, hr.contract) that inherit from mail.thread. This must be done programmatically from a custom module. The Compliance Officer is identified by a specific XML ID: my_module.user_compliance_officer. Which of the following steps are part of a valid and robust implementation? (Select all that apply)


Question 7

You are building a rental management system in Odoo 18. You have a rental.contract model and need to add a field rental_asset_id. This asset could be a vehicle (fleet.vehicle), a piece of equipment (maintenance.equipment), or a property (property.asset). These three models are distinct and do not share a common parent. Which field type allows you to create a dynamic Many2one relationship that can point to a record in any of these different models?


Question 8

In Odoo 18, you need to create a database view (a virtual table based on a SQL query) instead of a physical table for a model. This is useful for complex reporting where you need to join and aggregate data from multiple tables. Which attribute do you set on your models.Model class to tell the ORM not to create a physical table for it, and which method must you then override to define the SQL query for the view?


Question 9

You are working with a legacy Odoo 18 module that uses the older _columns dictionary syntax for defining fields instead of the fields.Something() syntax. You need to add a new Char field to an existing model using classical inheritance (_inherit). Which is the correct way to add a field to the _columns dictionary in an inherited model?


Question 10

You are tasked with creating an inline, editable list view for project.task.material records within the project.task form view in Odoo 18. The requirements are: 1) The inline view must be a tree view. 2) It should have three editable columns: product_id (Many2one), quantity (Float), and uom_id (Many2one, unit of measure). 3) When a user selects a product_id, the uom_id field for that line should automatically be populated with the product's default uom_id. 4) This auto-population must happen on the client-side for a smooth user experience. Which Odoo development techniques and components must be combined to achieve this functionality? (Select all that apply)


Question 11

You are tasked with a complex customization of the sale.order model in Odoo 18 for a client with specific business rules. The requirements are as follows: 1) Add a new boolean field called is_high_value to the sale.order model. 2) This field should be automatically calculated and stored: it should be True if the order's amount_total is greater than 10,000, and False otherwise. 3) A new server action must be created that allows a manager to manually approve a high-value order, which sets a separate is_approved boolean field to True. 4) This server action should only be available for orders that are in the 'sent' state and where is_high_value is True. Which of the following components are necessary to correctly implement this entire feature set in a custom module? (Select all that apply)


Question 12

You are creating a model that should not have a corresponding table in the database. This model will be used as a mixin class to provide shared methods and fields to other, regular models. For example, you might create a mail.thread.blacklist mixin to add blacklisting functionality to any model that has followers. Which class must this model inherit from, or which attribute must be set, to achieve this behavior?


Question 13

You are developing a sophisticated security model for a multi-company Odoo 18 environment. The goal is to restrict access to purchase.order records. The rules are: 1) A regular user can only see purchase orders that they created themselves (create_uid). 2) A "Team Manager" can see all purchase orders created by anyone in their own department (hr.department). 3) An "Accountant" can see all purchase orders regardless of creator or department, but only for companies they are allowed to access (standard multi-company rule). Which of the following are necessary components to properly implement this layered security? (Select all that apply).


Question 14

You are working on an Odoo 18 module and need to add a priority field to your project.task model. This field should allow users to select a priority level from a predefined list: 'Low', 'Medium', 'High'. Instead of a standard dropdown, you want to display these options as clickable star icons, where clicking the third star sets the value to 'High'. This requires using a specific user interface component. Which field type and widget combination should you use in your model's Python definition and the view's XML definition to implement this star-based priority selector?


Question 15

A developer is creating a custom module and has added several new Python files inside the models directory: project_task.py, project_milestone.py, and project_budget.py. For the Odoo framework to recognize and load these new model definitions when the module is installed or updated, these files must be imported into the directory's corresponding package. Which file needs to be modified to include these new Python files, and what is the correct syntax to do so?


Question 16

You have inherited the res.partner model in Odoo 18 to add a new Many2one field x_account_manager_id referencing res.users. You need to ensure that when a user clicks on this field, the list of users they can select from is limited to only those who belong to the "Sales / Salesperson" security group. How can you restrict the selectable records for this Many2one field?


Question 17

In your Odoo 18 application for a logistics company, you have a tree view for stock.picking (stock movements). By default, Odoo sorts records by their ID. The logistics manager wants the list of pickings to be sorted by their scheduled_date in descending order (newest first) as the default sorting order whenever they open the view. If two pickings have the same scheduled date, they should then be sorted by their priority level, also in descending order. How do you define this default sorting behavior on the stock.picking model itself, so it applies to all views unless overridden?


Question 18

In your Odoo 18 module, you have a model with a state field. You want to display a visual progress bar in the form view header that shows the current state. For example, for a sale.order, it might show "Quotation -> Sent -> Sale Order". Which widget is used on a selection field to render it as a clickable status bar in the header of a form view?


Question 19

You are implementing a complex data import routine in Odoo 18. You need to import customer data from a legacy system. The requirements are: 1) The process should be triggered by a button on a custom data.importer model. 2) The import might take a long time (several minutes), so it must run in the background to avoid blocking the user interface or causing an HTTP request timeout. 3) After the job is complete, a log note should be posted in the chatter of the data.importer record indicating success or failure. 4) The code for the import logic is defined in a method called _import_customer_data. Which Odoo features and techniques should be used to correctly implement this? (Select all that apply)


Question 20

In Odoo 18, you are configuring security for a res.partner model. You want to prevent any user, including the system administrator, from deleting a partner record if that partner has any associated sales orders. This is a critical data integrity rule. Which is the most appropriate place to implement this kind of undeletable record logic that depends on related data?


Question 21

You are developing a custom Odoo 18 module and have a Many2one field product_id on your model. When a user selects a product, you need to automatically populate the description and unit_price fields on your form with the corresponding values from the selected product.template record. You want to achieve this using the most efficient mechanism that avoids writing a custom onchange Python method. How can you define the description and unit_price fields to achieve this automatic population?


Question 22

You are building a custom sales dashboard in Odoo 18. You have a model sale.order.line with fields price_unit (price per unit) and product_uom_qty (quantity sold). You need to display the total price for each line, which is calculated by multiplying these two values. This total price should be automatically calculated and stored in the database for reporting efficiency. Which field definition correctly creates a stored, computed field named price_subtotal for this purpose? The source code as below: price_subtotal = fields.Float(compute='_compute_subtotal', store=True)


Question 23

You are inheriting the product.template form view to add a new field. You want to place your new field, x_custom_spec, directly after the existing default_code field. You have correctly set up the inherited view record. Which XPath expression and position attribute combination should you use to achieve this precise placement?


Question 24

You have a Many2many field tag_ids on your model, linking to a custom.tag model. In your form view, you want to display these tags not as a list but as a series of colorful, clickable pills or badges. This is a very common UI pattern in Odoo for handling tags. Which widget should you apply to the Many2many field in the XML view to achieve this visual representation?


Question 25

You are creating a Pivot view in Odoo 18 for sales analysis. You want the default view to show the total sale amount (amount_total) grouped by salesperson (user_id) in the rows and by month (date_order:month) in the columns. How do you define this in the <pivot> view's XML?


Question 26

In Odoo 18, you are customizing the res.partner form view. You want to group related fields together under a clear heading for better user readability. Specifically, you want to place the street, city, zip, and country_id fields under a section titled "Address Details". Which XML tag is used within a <form> view to create a visual grouping of fields, often with a string label?


Question 27

You are using delegation inheritance (_inherits) in Odoo 18 to embed the fields of res.partner into a new school.student model. Your student model has a Many2one field partner_id which is the delegation link. When a user creates a new student, a corresponding res.partner record should be created automatically. Which attribute is essential on the partner_id field definition to ensure this automatic creation?


Question 28

In an Odoo 18 purchasing module, you are customizing the purchase.order form. When a user selects a partner_id (the vendor), you want to immediately suggest a default payment_term_id based on the payment term set on that vendor's record. This should happen in the user interface without requiring the user to save the purchase order. The goal is to improve user experience by pre-filling related information. Which ORM decorator should be used on a method to trigger this client-side update when the partner_id field is changed?


Question 29

Your team is building an advanced inventory management module for Odoo 18. You need to extend the stock.quant model and its corresponding tree view. The requirements are: 1) Add a new Many2one field x_storage_bin_id to the stock.quant model. 2) Add a new Char field x_storage_bin_location_name to the stock.quant model that displays the name of the location of the storage bin (i.e., x_storage_bin_id.location_id.name). 3) In the existing stock.quant tree view, add a new column to display this new x_storage_bin_location_name field. 4) The entire implementation must be done in a custom module without modifying the original stock addon code, ensuring upgradability. Which of the following actions are required to fulfill these requirements according to Odoo best practices? (Select all that apply)


Question 30

Your team is creating a custom module for a real estate agency in Odoo 18. After defining the property.listing model, you need to add a default set of property types (e.g., "Apartment", "Villa", "Land") into a property.type model when the module is installed. This initial data should be loaded automatically and should not be updated on subsequent module upgrades unless specified. Where is the most appropriate place to define this initial data, and what is the correct tag to ensure the records are created only if they do not already exist (based on their XML ID)?


Question 31

You are creating a custom calendar view in Odoo 18 for a training.session model. The requirements are complex: 1) The calendar events should be colored based on the session's category (category_id). For example, "Technical" sessions are blue, "Soft Skills" are green. 2) The calendar should display the session's name and the trainer_id. 3) The events should span multiple days if the date_start and date_end fields are different. 4) Users should not be able to create new sessions directly by clicking on the calendar. Which attributes must be correctly configured on the <calendar> tag in the view XML to meet all these requirements? (Select all that apply)


Question 32

You are developing a custom module in Odoo 18 that adds features to the website. You need to create a new web page at the URL /my_courses that lists all available training courses from the training.course model. To do this, you need a controller. In which directory within your module should you create the Python file containing your controller class, and which decorator is used to map a method to a specific URL?


Question 33

You are creating a sales report in Odoo 18 and need a graph view to show total sales per month. You have defined a graph view for the sale.order model. By default, when a user clicks on a bar in the graph (e.g., the bar for "February 2026"), Odoo opens a tree view of all sales orders from that month. The requirement is to change this behavior so that clicking a bar opens a pivot view instead of a tree view. How would you achieve this customization?


Question 34

In your custom Odoo 18 module, you have created a new model library.book and its corresponding tree and form views. Now, you need to make this model accessible to users through the user interface. The requirement is to add a new top-level menu item named "Library" and, under it, a submenu item named "Books" that, when clicked, opens the tree view of all library books. Which two types of records must you create in an XML file to achieve this menu structure and its associated action?


Question 35

In an Odoo 18 implementation for a manufacturing company, you are defining a new model mrp.quality.check to store quality control results. You need to add a field to store the name or title of the quality check, such as "Visual Inspection" or "Component Stress Test". This field is fundamental, should be a simple text string, and must be mandatory for every record created. Which of the following field definitions correctly creates a mandatory character field named name in the model's Python class?


Question 36

You need to add a "Sequence" field to a custom model to allow users to manually reorder records in a tree view by dragging and dropping them. After adding an integer field named sequence to your Python model, what additional component is required in the tree view's XML definition to enable the drag-and-drop functionality?


Question 37

You are creating a custom QWeb report in Odoo 18. You need to display a specific field's value, but only if the current user is in the "Accounting / Manager" group. The report is rendered on the server side. How can you check the current user's group membership from within the QWeb template?


Question 38

You have created a wizard (a transient model) to update the status of multiple selected records. After the user fills out the wizard and clicks a button, a Python method is executed. To get the list of records that the user had selected in the previous view (e.g., the tree view of sales orders), where does Odoo typically store this information for the wizard's method to access?


Question 39

You are creating a custom model in Odoo 18 to represent a physical location, which has a latitude and longitude field. You want to display these coordinates on a map within the form view. Odoo has a built-in widget for this purpose. Which widget can be used to display and interact with geographical coordinates, often integrating with a map service?


Question 40

You are tasked with creating a Kanban view for the crm.lead model in Odoo 18. The requirements are to group the leads by their stage_id (e.g., New, Qualified, Won). Each Kanban card must display the lead's name, the partner_name, and the expected_revenue. Additionally, if a lead has a priority set to 'High' (a selection field), the entire Kanban card for that lead should be colored red to draw immediate attention. Which combination of XML tags and attributes is needed to correctly structure the Kanban view and apply the conditional coloring?


Question 41

You are creating a custom Gantt view in Odoo 18 for a project.task model. The Gantt view needs to display tasks on a timeline. To render correctly, the Gantt view requires specific attributes to be set on its root tag. These attributes tell Odoo which fields in the model represent the start date of a task, the end date (or duration) of a task, and how to group the tasks (e.g., by project). Which set of attributes is essential for a basic, functional Gantt view definition?


Question 42

You have a button in Odoo 18 that performs a potentially risky action. To prevent accidental clicks, you want to display a confirmation dialog box (e.g., "Are you sure you want to archive this record?") before the button's action is executed. What is the simplest, most declarative way to add this confirmation dialog to a button in an XML view?


Question 43

You are configuring security for a new res.project model in your Odoo 18 application. You need to create a new security group called "Project Viewer" whose members should only be able to read project data but not create, edit, or delete it. After creating the group in an XML file, you must define an access control list (ACL) to grant this specific permission. Which of the following ir.model.access.csv entries correctly grants read-only access to the "Project Viewer" group for the res.project model?


Question 44

A client wants to add an "Approval" workflow to the account.move (Invoice) model in Odoo 18. The requirements are: 1) Add a state field with selections: draft, to_approve, approved, posted. 2) Add an "Submit for Approval" button, visible only in the draft state, which moves the invoice to to_approve. 3) Add an "Approve" button, visible only in the to_approve state and only for users in the "Accounting / Manager" group, which moves the invoice to approved. 4) The original "Post" button should now only be visible in the approved state. Which combination of XML and Python components is required to build this feature? (Select all that apply)


Question 45

You are overriding the write() method of sale.order in Odoo 18. Your goal is to log a specific message to the chatter whenever the user_id (Salesperson) field is changed. The log message should read: "Salesperson changed from [Old Salesperson] to [New Salesperson]". The implementation must be efficient and robust, correctly handling single and multi-record writes. Which elements are part of a correct implementation of this overridden method? (Select all that apply)


Question 46

The sales team using your Odoo 18 instance wants a more powerful way to filter opportunities in the crm.lead tree view. They need to be able to quickly find leads created by the current logged-in user and leads that are in the "Won" stage. Instead of manually applying filters each time, you need to add predefined filters to the search view. Which XML structure correctly adds these two predefined filters ("My Leads" and "Won") to the search panel for the crm.lead model?


Question 47

You are enhancing an Odoo 18 module that manages research projects. You have a model research.project with a state field ('draft', 'in_progress', 'done', 'cancelled'). You need to add a button to the form view that allows users to cancel a project. This button should only be visible when the project is in the 'draft' or 'in_progress' state. Clicking the button should call a Python method action_cancel. What is the correct way to define this button in the form view's XML to ensure it has the required conditional visibility?


Question 48

You are working on a method that performs a batch update on 10,000 records. To avoid memory issues, you want to process these records in batches of 500. Which ORM feature allows you to iterate over a large recordset without loading all records into memory at once?


Question 49

You need to create a new res.config.settings view in Odoo 18 to allow administrators to configure settings for your custom manufacturing module. The requirements are: 1) Add a setting for a default_warehouse_id (a Many2one to stock.warehouse). 2) Add a boolean setting enable_advanced_mrp_logic. 3) These settings should be stored globally using ir.config_parameter. 4) The settings must appear in a new "Custom MRP" section within the main Settings dashboard. Which of the following components must you create in your module? (Select all that apply)


Question 50

You are tasked with heavily customizing the sale.order.line inline tree view (within the sale.order form) in Odoo 18. The requirements are: 1) Prevent users from deleting any line that has already been invoiced (qty_invoiced > 0). 2) Prevent users from creating new lines directly in the inline view; they must use a special "Add Product" wizard instead. 3) The price_unit field should become read-only if the sale order is in the 'sale' or 'done' state. Which techniques and attributes must be combined in the inherited view XML for the sale.order form to implement these rules? (Select all that apply)


Question 51

You need to customize the form view of the product.template model in Odoo 18. The requirement is to add a new page titled "Quality Control" to the notebook (the tabbed section) of the form. This new custom field, x_quality_notes. This customization must be done in a separate module, leaving the original view untouched. Which is the correct approach using view inheritance to add this new page and field?


Question 52

You are designing a form view in Odoo 18 for an hr.employee model. You want to prevent users from creating new employees directly from this form view, forcing them to use a different, more controlled process. However, they should still be able to edit existing employee records. Which attribute should you add to the root <form> tag in the view's XML definition to disable the "Create" button for this specific view?


Question 53

You are building a custom view in Odoo 18 that needs to display data grouped by date. In the search view, you want to provide predefined date filters like "This Month", "Last Quarter", and "This Year". What is the correct way to add a date filter for "This Month" to a search view, assuming you are filtering on a field named create_date?


Question 54

A junior developer is tasked with creating a new module for an Odoo 18 project to manage internal training courses. For Odoo to recognize this new directory as an installable module, a specific manifest file must be present. This file contains metadata like the module's name, version, author, and, crucially, its dependencies on other modules, such as hr for managing employees as attendees. The developer needs to ensure that the 'HR' module is loaded before their custom module. Which file is absolutely essential in the root of the module's directory, and what is the correct key within that file to declare this dependency?


Question 55

You are working on a form view and want to display a field as a clickable link that opens an external URL. For example, you have a tracking_number field and want it to link to a carrier's tracking website. You need a widget that renders a Char field as an anchor (<a>) tag. Which widget is designed for this purpose?


Question 56

You are developing an Odoo 18 module and want to add a new button to the header of the crm.lead form view. This button should only be visible to users who are members of the "Sales / Manager" group. While you could use attrs with a domain on the user's groups, Odoo provides a more direct and standard way to control visibility based on security groups. Which attribute should be added to the <button> tag in the XML to achieve this?


Question 57

You are developing a simple helpdesk module in Odoo 18. For the helpdesk.ticket model, you need to create the most basic list view possible to display existing tickets. This view should show only two columns: the ticket's name (subject) and its current state. All other fields should be hidden in this view. Which of the following XML structures correctly defines this simple tree view, ensuring only the 'name' and 'state' fields are visible as columns for the users?


Question 58

In an Odoo 18 module for managing employee assets, you have two models: hr.employee and asset.assignment. You need to create a field in the asset.assignment model that links a single assignment record to one specific employee. From the employee's form view, you should not see a list of their assignments by default. This relationship is a classic "many-to-one" link, where many asset assignments can point to one employee. Which field definition correctly establishes this relationship from the asset.assignment model to the hr.employee model?


Question 59

You are creating a search view for your custom library.book model in Odoo 18. You want to make it easy for users to find books by a specific author. You need to add a "Group By" option in the search panel that groups all books by their author_id. Which XML snippet correctly defines this "Group By" filter within a <search> view?


Question 60

You are inheriting the sale.order model to add a custom field x_is_priority. You need to ensure that this field is copied when a sales order is duplicated. By default, custom fields are not copied. Which attribute do you need to set on the field's definition in Python to make it part of the duplication process?


Question 61

In an Odoo 18 project, you're building a system to manage event registrations. You have an event.registration model with a Many2one field event_id pointing to the event.event model. The event.event model has a boolean field is_premium. You need to create a filter in the registration search view that allows users to easily find all registrations for premium events. Which is the correct domain to use in the <filter> tag of the search view to achieve this?


Question 62

You are creating a custom event.registration model in Odoo 18. You need to add a field registration_date. If a user does not manually enter a date when creating a new registration, you want the system to automatically set it to the current date. Which is the correct way to define this Date field to have the current date as its default value?


Question 63

A client wants a button on the purchase.order form in Odoo 18 that generates a PDF report of the RFQ and immediately prompts the user to send it by email. The standard "Print" and "Send by Email" buttons are separate. You need to combine these two actions. Which type of action allows you to chain multiple other actions together, executing them sequentially?


Question 64

You need to raise an exception in an Odoo 18 model method that will be displayed to the user in a clean, translated, and user-friendly dialog box. This exception is for a business rule violation caused by the user's input (e.g., "You cannot set a project deadline in the past."). Which exception class should you import from odoo.exceptions and raise for this purpose?


Question 65

You are developing a module for a university and have created a set of records for different academic departments (e.g., 'Computer Science', 'Physics', 'History') in an XML file. This data is intended for demonstration purposes only and should not be installed in a production environment. How do you specify in the module's manifest file that this data file should only be loaded when a user explicitly checks the "Load demo data" option during module installation?


Question 66

You are creating a custom theme for the Odoo 18 website. You have written custom SASS styles in a file named my_theme/static/src/scss/styles.scss. How do you properly include this SASS file in the website's assets so that it gets compiled into CSS and loaded on all front-end pages?


Question 67

You're working on an Odoo 18 module and need to create a wizard that allows a user to select a new salesperson and reassign multiple selected leads (crm.lead) to them. This wizard should be a pop-up form. Which combination of model type and action configuration is required to correctly implement this wizard?


Question 68

You are working on a custom CRM module in Odoo 18. You need to add a validation rule to the crm.lead model. The rule is that if a lead's stage_id is set to "Won", the expected_revenue field cannot be zero. If a user tries to save a "Won" lead with zero revenue, an error message must be displayed. Which is the correct Python constrains method signature to implement this logic?


Question 69

A user reports that a specific tree view is loading very slowly. You investigate and find that it's displaying a One2many field, which causes the ORM to perform a separate query for each row to fetch the count of related records (the N+1 problem). To optimize this, you want to create a computed field that calculates the count but stores the value in the database. What is the most efficient way to define a stored field that counts the number of related records in a One2many field named child_ids?


Question 70

You have a One2many field named task_ids on your project.project model, which links to the project.task model. For this relationship to work correctly, the project.task model must have a corresponding Many2one field that points back to the project.project model. What is the name of the argument in the One2many field definition that specifies the name of this corresponding Many2one field in the target model?


Question 71

In Odoo 18, you are customizing the sale.order form view. You want to display the order_line records directly within the order form, allowing users to add, edit, or remove products without navigating to a separate view. This embedded list view is a common pattern in Odoo. Which combination of a relational field type on the sale.order model and a view element in the form's XML is used to achieve this "inline view" presentation for order lines?


Question 72

You are optimizing a piece of code in Odoo 18 that iterates over a large number of sale.order records and, for each order, accesses the name of the salesperson's country (order.user_id.partner_id.country_id.name). This code is causing a large number of individual SQL queries (a severe N+1 problem). Your goal is to fetch all the necessary data efficiently. Which of the following are valid and efficient strategies to mitigate this performance issue? (Select all that apply)


Question 73

You are tasked with creating a fully custom user interface component in Odoo 18 using the Odoo Web Library (OWL). This component will be a special dashboard widget on the res.partner form view. The requirements are: 1) The widget must be defined as an OWL component in JavaScript. 2) It needs to be registered with the framework so it can be used in XML views. 3) It should be placed on the res.partner form view using a <field> tag with the custom widget name. 4) The JavaScript file containing the component definition must be loaded by Odoo's asset management system. Which of the following steps are all required to correctly implement and display this custom OWL widget? (Select all that apply)


Question 74

You are defining a Many2one field user_id on a model. By default, when a user starts typing in this field, Odoo searches on the name field of the res.users model. However, you want the search to also include the user's email address. Which ORM method should you override on the res.users model to customize this search behavior for all Many2one fields pointing to it?


Question 75

In an Odoo 18 form view, you have a notes field of type Text. By default, this field is a simple multi-line textbox. You want to provide users with a full-featured rich text editor, including options for bold, italics, lists, and embedding images. Which widget should you apply to the notes field in the XML view definition to enable this functionality?


Question 76

Your Odoo 18 module needs to interact with an external REST API. You've created a button that, when clicked, calls a Python method action_sync_with_api. This method makes an HTTP request that could take a few seconds. To provide feedback to the user, you want the button to display a loading indicator (spinner) while the API call is in progress. How can you achieve this using standard Odoo features?


Question 77

You are working on a custom fleet.vehicle model in Odoo 18. You need to add a button to the vehicle's form view that, when clicked, executes a server-side Python method called action_perform_maintenance. This method will create a new maintenance request record for the vehicle. The button should be of type "object" to call a method on the current model. Which of the following XML snippets correctly defines such a button within a form view's <header> section?


Question 78

When developing a custom module in Odoo 18, you need to add a dependency on a third-party Python library (e.g., requests or pandas) that is not included with Odoo's standard distribution. Where should you declare this external Python library dependency to ensure it is automatically installed via pip when Odoo is set up?


Question 79

In an Odoo 18 module, you have a One2many field line_ids. When a user deletes a record containing this field, you want all the associated line records to be automatically deleted as well. This is known as a cascading delete. Which attribute do you add to the corresponding Many2one field on the "many" side of the relationship to ensure this behavior?


Question 80

You are creating a custom ir.cron job in Odoo 18 to automatically process pending records every night. The requirements are: 1) The job should run once every day at 2:00 AM server time. 2) The job must call a specific model method: _process_pending_records on the model my.custom.model. 3) The job should be created via an XML data file within your module. 4) The job should not automatically run if the server is started in "demo mode" (with --load=web,base,my_module and --demo my_db). Which of the following XML elements and attributes are correctly configured in your <record id="..." model="ir.cron"> definition to meet all these requirements? (Select all that apply)


Question 81

A company using Odoo 18 wants to add an 'Internal Reference' field (internal_ref) to the res.partner model. They need this change to be implemented in a custom module to ensure it is maintainable and separate from the base Odoo code. The goal is to add a new field to the existing res.partner model without replacing it or altering the original source code. Which Python class definition correctly inherits from the res.partner model to add this new field?


Question 82

You are creating a custom action in Odoo 18. When this action is triggered, instead of opening a view, you want it to download a dynamically generated CSV file containing data from the current model. The generation logic is in a Python method. Which type of action should you return from your Python method to trigger a file download in the user's browser?


Question 83

In an Odoo 18 application for managing a digital library, you need to store the actual e-book file (e.g., a PDF or EPUB) directly on the library.book record. This field should allow users to upload a file from their computer and store its contents in the database. The file size could be several megabytes. Which Odoo field type is specifically designed for storing binary file content like documents, images, or other media files?