#!/usr/bin/python
# -*- coding: utf-8 -*-
class PythonDeveloper:
def __init__(self):
self.name = "Angie"
self.perceived_role = "Web developer"
self.official_title = " Developer Analyst"
self.language_spoken = ["esp_LATAM", "en_US"]
self.currently_learning = ["automated_test","JavaScript"]
self.currently_working = ["API's web", "Open Source", "ERP", "Personal Project"]
def say_random(self):
print("If a line of code from your life transcends, you've done more than most.")
me = PythonDeveloper()
me.say_random()
from odoo import models, fields, api
class OdooDeveloper(models.Model):
_name = 'python.developer'
_description = 'Partner Odoo Developer'
name = fields.Char(string='Name', default="Angie")
perceived_role = fields.Char(string='Perceived Role', default="Web Developer")
official_title = fields.Char(string='Official Title', default="Developer Analyst")
language_spoken = fields.Selection(
[('es_MX', 'Spanish (MEX)'), ('en_US', 'English (US)')],
string='Language Spoken',
default='es_MX'
)
currently_learning = fields.Many2many(
'learning.topic',
string='Currently Learning'
)
currently_working = fields.Many2many(
'work.topic',
string='Currently Working'
)
@api.model
def say_random(self):
return "If a line of code from your life transcends, you've done more than most."
def print_learning_and_working(self):
learning_topics = ', '.join(self.currently_learning.mapped('name'))
working_topics = ', '.join(self.currently_working.mapped('name'))
print(f"Currently Learning: {learning_topics}")
print(f"Currently Working: {working_topics}")
import pdb; set_trace()