I have a module created as follows:
But, when I try to install the module app, it gives me this error, as shown in the print below, I have already tried all the ways to correct the div for sheet or group, but this error always returns, can someone help me, what did I do wrong?
Thank you in advance!
I made the relationship as I send the print here, but as I said the error persists.
from odoo import models, fields
class SaleOrder(models.Model):
_inherit = 'sale.order'
use_csv_purchase = fields.Boolean(related='partner_id.use_csv_purchase', string='CSV')
def _prepare_purchase_order(self, partner):
resultado = super()._prepare_purchase_order(partner)
if partner.use_csv_purchase:
resultado['notes'] += '\n' + self.use_csv_purchase_text
return resultado
In your inherited form view change the below:
<field name="partner_id.use_csv_purchase"/>
to
<field name="use_csv_purchase"/>
Thank you very much. I think it worked now :)