Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4394 Weergaven

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!

Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer
Auteur

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