Dataset Viewer
Auto-converted to Parquet Duplicate
instruction
stringlengths
29
448
input
stringlengths
0
4.16k
output
stringlengths
30
15.9k
Create a Many2one field named company_id in Odoo 19.
Module: helpdesk Field Type: Many2one Parameters: 'res.company', 'Company', related='team_id.company_id', readonly=True, store=True
company_id = fields.Many2one('res.company', 'Company', related='team_id.company_id', readonly=True, store=True)
Quick question - please how to fix n+1 query problem? - case 63 #93 - case 1132 #19968 in Odoo 19.
πŸš€ **Fixing N+1 Query Problem** **Problem code:** ```python ``` **Issue:** Each iteration triggers a separate database query! **Solutions:** 1. **Use mapped():** ```python # Bad: N queries total = 0 for record in self: total += record.amount # Good: 1 query total = sum(self.mapped('amount')) ``` 2. **Prefetc...
Create a model class ExtractMixin inheriting from models.AbstractModel in Odoo 19.
Module: iap_extract Base Class: models.AbstractModel
class ExtractMixin(models.AbstractModel):
Create a One2many field named invoice_ids in Odoo 19.
Module: account Field Type: One2many Parameters: 'account.move', 'partner_id', string='Invoices', readonly=True, copy=False
invoice_ids = fields.One2many('account.move', 'partner_id', string='Invoices', readonly=True, copy=False)
Create a Datetime field named start_time in Odoo 19.
Module: TP00554 Business module m319 [third_ons] Field Type: Datetime Parameters: "Start Time"
start_time = fields.Datetime("Start Time")
Create a Boolean field named active in Odoo 19.
Module: TP00023 Business module m20 [custom_addons] Field Type: Boolean Parameters: string='Ativo', default=True, help="Uncheck to disable this stage without deleting it"
active = fields.Boolean( string='Ativo', default=True, help="Uncheck to disable this stage without deleting it" )
Create a Boolean field named symptom_pollakiuria in Odoo 19.
Module: TP00458 Healthcare module m2 [third_ons] Field Type: Boolean Parameters: 'Pollakiuiria'
symptom_pollakiuria = fields.Boolean('Pollakiuiria')
Implement compute_method method pattern in Odoo 19.
Module: account_payment Pattern: compute_method Method: suitable_payment_token_ids
def _compute_suitable_payment_token_ids
Tell me about Please i need to know: can you i need to know: how to debug assertions? - case 358 - case 3752 (scenario 4119) (scenario 10709) in Odoo 19.
πŸ› **Debugging Scenario: assertions** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` 3. *...
I need to know: Can you how to create a module like website_event_track_gantt? - case 905 (variant 2670) in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class EventTrack inheriting from models.Model ### Input: Module: website_event_track_gantt Base Class: models.Model ### Response: class EventTrack(models.Model): # First 500 chars of actua...
Create a Char field named partner_ups_carrier_account in Odoo 19.
Module: delivery_ups Field Type: Char Parameters: copy=False, compute='_compute_ups_carrier_account', inverse='_inverse_ups_carrier_account', readonly=False, string="UPS account number"
partner_ups_carrier_account = fields.Char(copy=False, compute='_compute_ups_carrier_account', inverse='_inverse_ups_carrier_account', readonly=False, string="UPS account number")
Create a Boolean field named is_health_insurance in Odoo 19.
Module: TP00012 Business module m9 [custom_addons] Field Type: Boolean Parameters: string="Is Health Insurance", compute="_compute_is_health_insurance", store=True, readonly=False,
is_health_insurance = fields.Boolean( string="Is Health Insurance", compute="_compute_is_health_insurance", store=True, readonly=False, )
Is there already Can you i need to know: i want to add a resolution_notes field [example 2048] - case 3796 - case 5527 - case 6047 (scenario 6151) in Odoo 19.
⚠️ **Hold on! Let me save you some time...** The `resolution_notes` field already exists in **14 different places** across Odoo! **Common implementations:** - Text field in TP00004 Business module [custom_addons] - Text field in TP00004 Business module [custom_addons] - Text field in TP00004 Business module [custom_...
Please can you please how to implement a workflow in odoo in Odoo 19?
πŸ”„ **Workflow Pattern in Odoo** Workflow with 14 states **Real example from your codebase:** ```python state = fields.Selection( [ ('draft', 'Draft'), ('new', 'New'), ('assigned', 'Assigned'), ('in_progress', 'In Progress'), ('resolved', 'Resolved'),...
How does Quick question - quick question - please quick question - how to debug logging? [example 248] #739 [example 1416] #37843 work in Odoo in Odoo 19.
πŸ› **Debugging Scenario: logging** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` 3. **Us...
Can you can you can you how to fix n+1 query problem? [example 222] (scenario 225) #7267 #10928 in Odoo 19.
πŸš€ **Fixing N+1 Query Problem** **Problem code:** ```python ``` **Issue:** Each iteration triggers a separate database query! **Solutions:** 1. **Use mapped():** ```python # Bad: N queries total = 0 for record in self: total += record.amount # Good: 1 query total = sum(self.mapped('amount')) ``` 2. **Prefetc...
Before implementing Can you can you how to create qty_available field? (variant 11103) (scenario 31404) #32065 in Odoo 19.
⚠️ **Hold on! Let me save you some time...** The `qty_available` field already exists in **14 different places** across Odoo! **Common implementations:** - Float field in unknown - Float field in unknown - Float field in unknown **Before creating a new one, check if you can:** 1. Use an existing field through inher...
Create a Datetime field named date_last_stage_update in Odoo 19.
Module: hr_recruitment Field Type: Datetime Parameters: "Last Stage Update", index=True, default=fields.Datetime.now
date_last_stage_update = fields.Datetime("Last Stage Update", index=True, default=fields.Datetime.now)
Create a Selection field named account_type in Odoo 19.
Module: account_asset Field Type: Selection Parameters: string="Type of the account", related='account_asset_id.account_type'
account_type = fields.Selection(string="Type of the account", related='account_asset_id.account_type')
Create a Text field named description in Odoo 19.
Module: TP00584 Helpdesk module [third_ons] Field Type: Text Parameters: string='Description', help='Description of what this rule does'
description = fields.Text( string='Description', help='Description of what this rule does' )
Create a Char field named color_field in Odoo 19.
Module: TP00139 Inventory module m2 [cybrosys] Field Type: Char Parameters: string='Background color', help='This field represents the background ' 'color of the product.'
color_field = fields.Char(string='Background color', help='This field represents the background ' 'color of the product.')
Create a Text field named description in Odoo 19.
Module: TP00584 Helpdesk module [third_ons] Field Type: Text Parameters: string='Description', translate=True
description = fields.Text( string='Description', translate=True )
Create a Boolean field named is_peppol_edi_format in Odoo 19.
Module: account_edi_ubl_cii Field Type: Boolean Parameters:
is_peppol_edi_format = fields.Boolean(compute='_compute_is_peppol_edi_format') # TODO remove in master
Create a Char field named signers_name in Odoo 19.
Module: whatsapp_sign Field Type: Char Parameters: compute='_compute_signers_name', string='Signers name'
signers_name = fields.Char(compute='_compute_signers_name', string='Signers name')
Best practices for Quick question - quick question - please show me _compute_allow_partials pattern (scenario 1252) [example 2884] #14024 in Odoo 19.
🎯 **Implementing `_compute_allow_partials` - Real Examples** This method appears in 2 places in your codebase. **Common implementation pattern:** ```python def _compute_allow_partials(self): for wizard in self: wizard.allow_partials = wizard.display_allow_partials and wizard.force_partials ...
Please can you when to use _compute_file_type? [example 664] (scenario 949) (variant 8129) #15494 [example 21363] in Odoo 19.
🎯 **Implementing `_compute_file_type` - Real Examples** This method appears in 4 places in your codebase. **Common implementation pattern:** ```python def _compute_file_type(self): """Detect file type from extension""" for wizard in self: if wizard.file_name: if wizard...
Implement compute_method method pattern in Odoo 19.
Module: hr_payroll Pattern: compute_method Method: affected_version_ids
def _compute_affected_version_ids
Quick question - show me the structure of industry_fsm_report (scenario 18192) in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class BaseDocumentLayout inheriting from models.TransientModel ### Input: Module: industry_fsm_report Base Class: models.TransientModel ### Response: class BaseDocumentLayout(models.Transie...
Implement compute_depends structure in Odoo 19.
Module: sales_team Structure Type: compute_depends
@api.depends('crm_team_id') def _compute_user_company_ids(self): all_companies = self.env['res.company'].search([]) for member in self: member.user_company_ids = member.crm_team_id.company_id or all_companies @api.depends('crm_team_id') def _compute_is_membership_multi(self): ...
Implement compute_depends structure in Odoo 19.
Module: helpdesk Structure Type: compute_depends
@api.depends('sla_deadline', 'sla_reached_late') def _compute_sla_fail(self): now = fields.Datetime.now() for ticket in self: if ticket.sla_deadline: ticket.sla_fail = (ticket.sla_deadline < now) or ticket.sla_reached_late else: ticket.sla_fail...
Explain Please can you show the structure of website_sale_stock_renting [example 493] (scenario 735) #1700 (variant 1957) [example 5880] #14755 in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class SaleOrder inheriting from models.Model ### Input: Module: website_sale_stock_renting Base Class: models.Model ### Response: class SaleOrder(models.Model): # First 500 chars of actual...
Create a Char field named origin in Odoo 19.
Module: sale Field Type: Char Parameters: string="Source Document", help="Reference of the document that generated this sales order request"
origin = fields.Char( string="Source Document", help="Reference of the document that generated this sales order request")
Can you i need to know: what's the best way to create qty_available field? (variant 462) #1559 (variant 5009) (variant 9502) in Odoo 19.
⚠️ **Hold on! Let me save you some time...** The `qty_available` field already exists in **14 different places** across Odoo! **Common implementations:** - Float field in unknown - Float field in unknown - Float field in unknown **Before creating a new one, check if you can:** 1. Use an existing field through inher...
Create a Many2one field named department_id in Odoo 19.
Module: TP00389 Human Resources module m3 [maxdoo_ao] Field Type: Many2one Parameters: "hr.department", "Departamento"
department_id = fields.Many2one("hr.department", "Departamento")
Explain Can you i need to know: can you i need to know: how to debug debug_comments? [example 140] (variant 237) - case 291 #458 #3727 [example 6883] (scenario 10896) in Odoo 19.
πŸ› **Debugging Scenario: debug_comments** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` ...
Create a Char field named reveal_ip in Odoo 19.
Module: website_crm_iap_reveal Field Type: Char Parameters: string='IP Address'
reveal_ip = fields.Char(string='IP Address')
Can you can you can you please can you how to fix silent_exception? - case 51 - case 150 #1102 (variant 1782) #2026 (scenario 4048) #4884 - case 10260 in Odoo 19.
πŸ”§ **Troubleshooting: silent_exception** **Common causes:** - Check error details - Review recent changes **Debugging steps:** 1. Check the error log for full traceback 2. Enable debug mode for more details 3. Use pdb to set breakpoints 4. Check related configuration **Quick fixes:** # Check specific error message ...
Create a Char field named display_name in Odoo 19.
Module: account_loans Field Type: Char Parameters:
display_name = fields.Char(string="Loan name", store=True) # stored for pivot view
Implement wizard_structure structure in Odoo 19.
Module: hr_homeworking_calendar Structure Type: wizard_structure
class HomeworkLocationWizard(models.TransientModel): _name = 'homework.location.wizard' _description = 'Set Homework Location Wizard' work_location_id = fields.Many2one('hr.work.location', required=True, string="Location") work_location_name = fields.Char(related='work_location_id.name', string="Locati...
Before implementing How to create percentage field? #16833 in Odoo 19.
πŸ’‘ **Quick tip before you start coding:** The `percentage` field already exists in **12 different places** across Odoo! **Common implementations:** - Float field in unknown - Float field in unknown - Float field in TP00537 Accounting module m45 [third_ons] **Before creating a new one, check if you can:** 1. Use an ...
Quick question - please please how to debug logging? (scenario 157) (scenario 169) (variant 5466) (scenario 8413) - case 18127 in Odoo 19.
πŸ› **Debugging Scenario: logging** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` 3. **Us...
Create a Selection field named benchmark_type in Odoo 19.
Module: TP00028 Business module m24 [custom_addons] Field Type: Selection Parameters: [ ('market_index', 'Market Index'), ('peer_fund', 'Peer Fund Average'), ('custom', 'Custom Benchmark'), ('hybrid', 'Hybrid (Composite)'), ], required=True, string='Benchmark Type', default='market_i...
benchmark_type = fields.Selection([ ('market_index', 'Market Index'), ('peer_fund', 'Peer Fund Average'), ('custom', 'Custom Benchmark'), ('hybrid', 'Hybrid (Composite)'), ], required=True, string='Benchmark Type', default='market_index')
Implement compute_depends structure in Odoo 19.
Module: stock Structure Type: compute_depends
@api.depends('quant_ids.owner_id') def _compute_owner_id(self): for package in self: package.owner_id = False if package.quant_ids and all( q.owner_id == package.quant_ids[0].owner_id for q in package.quant_ids ): package.owner_id = package...
Quick question - how to implement action_calculate_preview action? [example 4109] (variant 30011) in Odoo 19.
🎯 **Implementing `action_calculate_preview` - Real Examples** This method appears in 1 places in your codebase. **Common implementation pattern:** ```python def action_calculate_preview(self): """Calculate fees and display preview without applying (NON-DESTRUCTIVE).""" self.ensure_one() i...
Create a Char field named field_type in Odoo 19.
Module: TP00489 Business module m266 [third_ons] Field Type: Char Parameters: 'Field Type', readonly=True
field_type = fields.Char('Field Type', readonly=True)
How does How to create a module like point_of_sale? #4947 work in Odoo in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class PosCloseSessionWizard inheriting from models.TransientModel ### Input: Module: point_of_sale Base Class: models.TransientModel ### Response: class PosCloseSessionWizard(models.Transie...
Create a Boolean field named create_activity_option in Odoo 19.
Module: documents Field Type: Boolean Parameters: string='Create a new activity', compute='_compute_create_activity_option', store=True, readonly=False
create_activity_option = fields.Boolean(string='Create a new activity', compute='_compute_create_activity_option', store=True, readonly=False)
I need to know: Show me _compute_match_results_count pattern (scenario 1413) in Odoo 19.
🎯 **Implementing `_compute_match_results_count` - Real Examples** This method appears in 2 places in your codebase. **Common implementation pattern:** ```python def _compute_match_results_count(self): """Count number of match results""" for wizard in self: wizard.match_results_count =...
Can you best way to handle document states in Odoo 19.
πŸ”„ **Workflow Pattern in Odoo** Workflow with 6 states **Real example from your codebase:** ```python state = fields.Selection([ ('allocated', 'Allocated'), ('redeemed', 'Redeemed'), ('transferred', 'Transferred'), ] ``` **Best Practices for State Fields:** 1. Use Selection field with cle...
Create a Many2one field named original_id in Odoo 19.
Module: html_editor Field Type: Many2one Parameters: 'ir.attachment', string="Original (unoptimized, unresized) attachment", index='btree_not_null'
original_id = fields.Many2one('ir.attachment', string="Original (unoptimized, unresized) attachment", index='btree_not_null')
Please please can you how to debug logging? - case 26 [example 60] (variant 880) - case 24816 (scenario 28813) in Odoo 19.
πŸ› **Debugging Scenario: logging** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` 3. **Us...
Create a Char field named qcp_test_type in Odoo 19.
Module: quality_iot Field Type: Char Parameters: compute='_compute_qcp_test_type'
qcp_test_type = fields.Char(compute='_compute_qcp_test_type')
Before implementing I need to know: How to create section_main_report_ids field? (variant 10506) (scenario 29368) in Odoo 19.
⚠️ **Hold on! Let me save you some time...** The `section_main_report_ids` field already exists in **24 different places** across Odoo! **Common implementations:** - Many2many field in TP00056 Accounting module m10 [cybrosys] - Many2many field in TP00056 Accounting module m10 [cybrosys] - Many2many field in TP00056 ...
Implement compute_method method pattern in Odoo 19.
Module: website_sale_mass_mailing Pattern: compute_method Method: is_newsletter_enabled
def _compute_is_newsletter_enabled
Create a Many2one field named blast_configuration_id in Odoo 19.
Module: TP00274 Website module m16 [cybrosys] Field Type: Many2one Parameters: 'blast.configuration', help="Blast Configuration"
blast_configuration_id = fields.Many2one('blast.configuration', help="Blast Configuration")
How does Please please can you please show me _compute_show_code_history pattern (scenario 152) #276 (scenario 361) #2413 (variant 24951) - case 30592 work in Odoo in Odoo 19.
🎯 **Implementing `_compute_show_code_history` - Real Examples** This method appears in 2 places in your codebase. **Common implementation pattern:** ```python def _compute_show_code_history(self): self.show_code_history = False History = self.env["ir.actions.server.history"] for action in...
Before writing Odoo 19 code for browse() with correct ID type, what must you check to avoid common mistakes in Odoo 19?
Before writing code for browse() with correct ID type in Odoo 19, verify: **Critical rule:** Always pass integer IDs to `browse()`. When getting IDs from HTTP requests, URL params, or JSON payloads, cast with `int()` before calling `browse()`. **Why it matters:** `browse()` no longer accepts string IDs in Odoo 17+. P...
Implement compute_method method pattern in Odoo 19.
Module: account_reports Pattern: compute_method Method: is_account_coverage_report_available
def _compute_is_account_coverage_report_available
Implement compute_method method pattern in Odoo 19.
Module: hr_holidays Pattern: compute_method Method: has_mandatory_day
def _compute_has_mandatory_day
Create a Many2one field named refunded_orderline_id in Odoo 19.
Module: point_of_sale Field Type: Many2one Parameters: 'pos.order.line', 'Refunded Order Line', index='btree_not_null', help='If this orderline is a refund, then the refunded orderline is specified in this field.'
refunded_orderline_id = fields.Many2one('pos.order.line', 'Refunded Order Line', index='btree_not_null', help='If this orderline is a refund, then the refunded orderline is specified in this field.')
Create a Char field named mailing_filter_domain in Odoo 19.
Module: marketing_automation Field Type: Char Parameters: 'Favorite filter domain', related='mailing_filter_id.mailing_domain'
mailing_filter_domain = fields.Char('Favorite filter domain', related='mailing_filter_id.mailing_domain')
How does I need to know: Quick question - quick question - i need to know: how to debug performance_debugging? (scenario 84) [example 1358] (scenario 2078) #2409 [example 4583] - case 24642 work in Odoo in Odoo 19.
πŸ› **Debugging Scenario: performance_debugging** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debu...
Create a Char field named dpopay_transaction_ref in Odoo 19.
Module: pos_dpopay Field Type: Char Parameters: string='Transaction Reference', help="Reference number required for Mobile Money refund transactions."
dpopay_transaction_ref = fields.Char(string='Transaction Reference', help="Reference number required for Mobile Money refund transactions.")
Can you how to debug debug_comments? (variant 3452) [example 3592] in Odoo 19.
πŸ› **Debugging Scenario: debug_comments** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` ...
Create a Char field named reward_identifier_code in Odoo 19.
Module: sale_loyalty Field Type: Char Parameters: help="Technical field used to link multiple reward lines from the same reward together."
reward_identifier_code = fields.Char( help="Technical field used to link multiple reward lines from the same reward together." )
Quick question - when to use _compute_allow_partials? (scenario 3058) (variant 6403) (variant 7818) in Odoo 19.
🎯 **Implementing `_compute_allow_partials` - Real Examples** This method appears in 2 places in your codebase. **Common implementation pattern:** ```python def _compute_allow_partials(self): for wizard in self: wizard.allow_partials = wizard.display_allow_partials and wizard.force_partials ...
I need to know: I need to know: Best practices for module like stock [example 6025] (variant 26296) in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class StockOrderpointSnooze inheriting from models.TransientModel ### Input: Module: stock Base Class: models.TransientModel ### Response: class StockOrderpointSnooze(models.TransientModel)...
Create a Char field named target_record_name in Odoo 19.
Module: TP00489 Business module m266 [third_ons] Field Type: Char Parameters: 'Target Record Name'
target_record_name = fields.Char('Target Record Name')
Implement compute_method method pattern in Odoo 19.
Module: account Pattern: compute_method Method: display_attachments_widget
def _compute_display_attachments_widget
Please i need to know: can you i need to know: best practices for module like tp00564 business module m328 [third_ons] - case 187 (scenario 755) #1553 #34993 [example 37745] in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class ProductChangeImpactReport inheriting from models.AbstractModel ### Input: Module: TP00564 Business module m328 [third_ons] Base Class: models.AbstractModel ### Response: class Product...
Create a model class VolunteerType inheriting from models.Model in Odoo 19.
Module: TP00314 Business module m152 [cybrosys] Base Class: models.Model
class VolunteerType(models.Model):
Can you can you how to debug logging? - case 26 [example 60] (variant 880) - case 1031 [example 3908] #6880 (scenario 16013) [example 29622] (scenario 33003) in Odoo 19.
πŸ› **Debugging Scenario: logging** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` 3. **Us...
Implement compute_depends structure in Odoo 19.
Module: sale_subscription Structure Type: compute_depends
@api.depends('type', 'recurring_invoice', 'invoice_policy') def _compute_allow_prorated_price(self): for template in self: if template.recurring_invoice and template.type == 'service' and template.invoice_policy != 'delivery': template.allow_prorated_price = True else...
Is there already Please quick question - quick question - i want to add a valuation_date field - case 233 (variant 2927) (scenario 14355) #27679 in Odoo 19.
βœ‹ **Stop! This already exists in Odoo:** The `valuation_date` field already exists in **16 different places** across Odoo! **Common implementations:** - Date field in TP00028 Business module m24 [custom_addons] - Date field in TP00028 Business module m24 [custom_addons] - Date field in TP00028 Business module m24 [c...
Create a Integer field named end_month_num in Odoo 19.
Module: TP00442 Business module m232 [third_ons] Field Type: Integer Parameters: string="End Month Number", readonly=True
end_month_num = fields.Integer(string="End Month Number", readonly=True)
Please can you what's the best way to create a module like tp00568 business module m331 [third_ons]? (variant 765) (scenario 4108) - case 6494 (scenario 25487) [example 31587] in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class ProductProduct inheriting from models.Model ### Input: Module: TP00568 Business module m331 [third_ons] Base Class: models.Model ### Response: class ProductProduct(models.Model): # F...
Can you can you show the structure of base [example 45] - case 71 [example 1397] [example 3669] in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class ResDevice inheriting from models.Model ### Input: Module: base Base Class: models.Model ### Response: class ResDevice(models.Model): # First 500 chars of actual code ``` **Key takea...
Explain I need to know: Show me the structure of TP00464 Business module m247 [third_ons] (scenario 111) - case 754 (variant 5119) #13485 in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class Product inheriting from models.Model ### Input: Module: TP00464 Business module m247 [third_ons] Base Class: models.Model ### Response: class Product(models.Model): # First 500 chars...
Create a Selection field named code in Odoo 19.
Module: stock_TP00487 Shipping module [third_ons] Field Type: Selection Parameters: selection_add=[('dropship', 'Dropship')], ondelete={'dropship': lambda recs: recs.write({'code': 'outgoing', 'active': False})}
code = fields.Selection( selection_add=[('dropship', 'Dropship')], ondelete={'dropship': lambda recs: recs.write({'code': 'outgoing', 'active': False})})
Show me the structure of TP00454 Business module m241 [third_ons] #458 [example 36408] in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class AssetType inheriting from models.Model ### Input: Module: TP00454 Business module m241 [third_ons] Base Class: models.Model ### Response: class AssetType(models.Model): # First 500 c...
Best practices for Can you quick question - i need to know: show me the structure of mail (variant 607) #1736 [example 3026] (scenario 8368) #13979 in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class MailActivityScheduleSummary inheriting from models.TransientModel ### Input: Module: mail Base Class: models.TransientModel ### Response: class MailActivityScheduleSummary(models.Tran...
Create a Many2one field named interco_plc_journal_id in Odoo 19.
Module: TP00350 Business module m167 [erc_apps] Field Type: Many2one Parameters: "account.journal", string="P&L Intercompany Elimination Journal", domain="[('type', '=', 'general'), ('company_id', '=', active_id)]", help=( "Default general journal used for intercompany P&L e...
interco_plc_journal_id = fields.Many2one( "account.journal", string="P&L Intercompany Elimination Journal", domain="[('type', '=', 'general'), ('company_id', '=', active_id)]", help=( "Default general journal used for intercompany P&L elimination entries. " "Typic...
How does I need to know: Can you i need to know: can you what's the best way to debug logging? (scenario 79) (scenario 184) [example 397] (scenario 1505) [example 14604] - case 17342 [example 35008] work in Odoo in Odoo 19.
πŸ› **Debugging Scenario: logging** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` 3. **Us...
Can't modify Explain system limitations in Odoo [example 12] [example 345] in Odoo 19.
πŸ“ **System Limitation (from code comments)** Found in your codebase: ``` # If the supplier is not set, we cannot create a PO. ``` **This indicates a system constraint that developers encountered.** **General approach to limitations:** 1. Understand why the limitation exists 2. Find the official workaround 3. Docume...
Create a Selection field named visibility in Odoo 19.
Module: website_slides_forum Field Type: Selection Parameters: related='slide_channel_id.visibility', help="Forum linked to a Course, the visibility is the one applied on the course."
visibility = fields.Selection(related='slide_channel_id.visibility', help="Forum linked to a Course, the visibility is the one applied on the course.")
Create a Boolean field named display_invoice_edi_format in Odoo 19.
Module: account Field Type: Boolean Parameters: default=lambda self: len(self._fields['invoice_edi_format'].selection), store=False
display_invoice_edi_format = fields.Boolean(default=lambda self: len(self._fields['invoice_edi_format'].selection), store=False)
Can you i need to know: please quick question - i need to know: how to fix browse_in_loop performance issue? - case 3 - case 9 (scenario 13) (variant 80) (scenario 139) (variant 5920) (scenario 9519) in Odoo 19.
πŸš€ **Performance Optimization: browse_in_loop** **Problematic code:** ```python _xmlids) # search view in ir.ui.view view_by_id = {} field_names = [f.name for f in IrUiView._fields.values() if f.prefetch is True] if xmlids: domain = Domain('id', 'in', ids) | Domain(self._ge...
Create a Float field named max_leaves in Odoo 19.
Module: hr_holidays Field Type: Float Parameters: compute='_compute_leaves'
max_leaves = fields.Float(compute='_compute_leaves')
Create a Char field named eu_logical_id in Odoo 19.
Module: TP00004 Business module [custom_addons] Field Type: Char Parameters: string='EU Logical ID', index=True, help='EU sanctions list logical ID',
eu_logical_id = fields.Char( string='EU Logical ID', index=True, help='EU sanctions list logical ID', )
Please please can you can you how to debug logging? - case 26 [example 60] (variant 880) - case 1031 (variant 1762) (scenario 29966) - case 33918 in Odoo 19.
πŸ› **Debugging Scenario: logging** **Common debugging techniques:** 1. **Using Logs:** ```python import logging _logger = logging.getLogger(__name__) _logger.info("Debug: Variable value = %s", variable) ``` 2. **Using PDB:** ```python import pdb; pdb.set_trace() # Execution stops here, interactive debug ``` 3. **Us...
Create a model class PensionHoldingsBreakdown inheriting from models.Model in Odoo 19.
Module: TP00028 Business module m24 [custom_addons] Base Class: models.Model
class PensionHoldingsBreakdown(models.Model):
How does Can you can you please can you show me the structure of storage_media - case 491 [example 563] (variant 683) - case 733 #1942 (scenario 2187) (variant 11384) - case 23714 #37201 work in Odoo in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class StorageFileReplace inheriting from models.TransientModel ### Input: Module: storage_media Base Class: models.TransientModel ### Response: class StorageFileReplace(models.TransientMode...
Create a Date field named christmas_payment_date in Odoo 19.
Module: TP00389 Human Resources module m3 [maxdoo_ao] Field Type: Date Parameters:
christmas_payment_date = fields.Date()
Please please can you can you what's the best way to fix n+1 query problem? [example 55] [example 160] (variant 1276) (variant 1287) [example 1918] #15529 #20773 (scenario 34911) (scenario 38232) in Odoo 19.
πŸš€ **Fixing N+1 Query Problem** **Problem code:** ```python ``` **Issue:** Each iteration triggers a separate database query! **Solutions:** 1. **Use mapped():** ```python # Bad: N queries total = 0 for record in self: total += record.amount # Good: 1 query total = sum(self.mapped('amount')) ``` 2. **Prefetc...
Create a Integer field named alert_time in Odoo 19.
Module: product_expiry Field Type: Integer Parameters: string='Alert Date', help='Number of days before the Expiration Date after which an alert should be' ' raised on the lot/serial number. It will be computed on the lot/serial number.'
alert_time = fields.Integer(string='Alert Date', help='Number of days before the Expiration Date after which an alert should be' ' raised on the lot/serial number. It will be computed on the lot/serial number.')
How does Please best way to create action_create_missing_navs #1516 (variant 27723) work in Odoo in Odoo 19.
🎯 **Implementing `action_create_missing_navs` - Real Examples** This method appears in 1 places in your codebase. **Common implementation pattern:** ```python def action_create_missing_navs(self): """ Auto-create draft NAV records for all funds that are missing valuations """ self...
Implement compute_method method pattern in Odoo 19.
Module: account_payment_mode Pattern: compute_method Method: partner_bank_filter_type_domain
def _compute_partner_bank_filter_type_domain
Can you can you i need to know: please i need to know: how to implement _compute_name method? [example 32] (variant 39) (scenario 640) [example 3552] (scenario 5484) (variant 6810) [example 8694] #37943 in Odoo 19.
🎯 **Implementing `_compute_name` - Real Examples** This method appears in 78 places in your codebase. **Common implementation pattern:** ```python def _compute_name(self): """Compute display name for the wizard""" for wizard in self: if wizard.valuation_date: wizard.na...
Create a Boolean field named is_fully_flexible in Odoo 19.
Module: hr Field Type: Boolean Parameters: compute='_compute_is_flexible', store=True, groups="hr.group_hr_user"
is_fully_flexible = fields.Boolean(compute='_compute_is_flexible', store=True, groups="hr.group_hr_user")
Explain Please what's the best way to create a module like bus? - case 462 (variant 471) #8354 in Odoo 19.
πŸ“¦ **Module Pattern from Real Code** Based on the module structure in your codebase: ```python ### Instruction: Create a model class IrWebsocket inheriting from models.AbstractModel ### Input: Module: bus Base Class: models.AbstractModel ### Response: class IrWebsocket(models.AbstractModel): # First 500 chars of a...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
13