콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4402 화면

The CRM module has the first encounter with this that I've seen. It's in crm/crm_phonecall.py at the very top. Appears to be new to 7.0. What does this mean? I can't find any good explanation in the documentation (the search feature was taken away!). Code sample from crm_phonecall.py:

from openerp.addons.base_status.base_state import base_state
# [...]

class crm_phonecall(base_state, osv.osv):
    """ Model for CRM phonecalls """
    _name = "crm.phonecall"
    _description = "Phonecall"
    _order = "id desc"
    _inherit = ['mail.thread']
    _columns = {
        # base_state required fields
        'date_action_last': fields.datetime('Last Action', readonly=1),
        'date_action_next': fields.datetime('Next Action', readonly=1),
        'create_date': fields.datetime('Creation Date' , readonly=True),
            # [...]

Going to that module there is a very small description:

""" Base utility mixin class for objects willing to manage their state.
    Object subclassing this class should define the following colums:
    - ``date_open`` (datetime field)
    - ``date_closed`` (datetime field)
    - ``user_id`` (many2one to res.users)
    - ``partner_id`` (many2one to res.partner)
    - ``email_from`` (char field)
    - ``state`` (selection field)
"""

But this isn't explaining all that much. Anyone have any clearer explanation?

Any help would be appreciated!

아바타
취소
베스트 답변

Hi,

There is module 'base_status' in addons directory. This is new working methodology of version 7. you can find this same class inherit in project module also.

It's managing states and stages globally instead of individual.

Email : info@acespritech.com
Skype : acespritech
Blog : acespritechblog.wordpress.com

아바타
취소
작성자

Can you give an example of where/why you'd want to do that? I'm having trouble understanding the point of it.