Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2506 Lượt xem

Impacted versions:

Windows 10, Odoo V9, Python 2.7


Steps to reproduce:

# 1. at .py:

-- coding: utf-8 --

import logging from openerp import api, fields, models, _ from openerp.exceptions import UserError

_logger = logging.getLogger(name)

class Relative(models.Model): _name = 'hr.employee' _description = 'Relatives' _inherit = 'hr.employee'

relative_ids = fields.One2many('hr.relative.line', 'employee_id', string="Relatives")
relative_ids = fields.Many2many('hr.relative.line', 'employee_id', string="Relatives")

class Relative(models.Model): _name = 'hr.relative.line' _description = 'Relatives'

employee_id = fields.Many2one('hr.employee','Employee Name')
name= fields.Char('Name')
dob = fields.Date('Date of Birth')
id_number = fields.Char('ID number')


2. init.py

-- coding: utf-8 --

import relatives


3. at .xml

/> <!--name and file should mention the name of folder.name of tamplet--> </data>

Current behavior:

can't install the packages : from openerp import api, fields, models, _ it's installed successfully for a moment then the red lines appears again. when I restart the server and upgrade my module " error Context - field does not exist " Expected behavior: the module should correctly uploaded.


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Alaa

The problem is not well understood

You could explain more
Where is the file   __manifest__.py

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 23
3638
0
thg 4 22
2615
1
thg 12 16
6028
1
thg 7 15
5217
4
thg 9 20
3710