Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3151 Zobrazení

my code is as follow:

class FormFeedback(models.Model):
    _name = 'form.feedback'
    _description = "Form Feedback"

    feedback_type = fields.Char(string="Type", require=True)
    feedback_description = fields.Char(string="Description", require=True)
    feedback_date = fields.date(string="Date", require=True)
    obstetrics_feedback = fields.Many2one('ec.medical.obstetrics', string='Obstetrics')
    
    
    ------------------------------------------------------------------------------------------------------

class OehObstetrics(models.Model):
    _name = 'ec.medical.obstetrics'
    _inherit = ['ec.medical.patient.gfields', 'ec.medical.patient.summery']
    _description = 'Obstetrics of Patient'

    previous_obs_files = fields.One2many('ec.medical.obstetrics', 'obs_file_inverse', store=False,
                                         compute='fetch_previous_obs_files')
    obs_file_inverse = fields.Many2one('ec.medical.obstetrics')
    feedbacks = fields.One2many('form.feedback', 'obstetrics_feedback',string='Feedback')

Avatar
Zrušit
Nejlepší odpověď

Hello Tangent,

Have you imported OehObstetrics class first?

If yes then you should first load Form Feedback class(or file if you created different file).

Here It seems "obstetrics_feedback" is not created so the system can not access it.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
lis 23
17997
3
lis 24
25880
1
dub 23
6552
2
pro 22
7374
1
lis 22
4495