Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Geraldine and albert together (1)
1. Geraldine andGeraldine and
Albert TogetherAlbert Together
(Based on Aesop’s Fable The(Based on Aesop’s Fable The
Grasshopper and the Ant)Grasshopper and the Ant)
By Shannon L. MoxceyBy Shannon L. Moxcey
2. Geraldine and Albert both lived in the same town. Geraldine lived in aGeraldine and Albert both lived in the same town. Geraldine lived in a
trim little house where she swept the porch every morning. Her grasstrim little house where she swept the porch every morning. Her grass
was always mowed, her flowers were always happy and healthy, herwas always mowed, her flowers were always happy and healthy, her
front walk was always swept and tidy. Inside her home, everythingfront walk was always swept and tidy. Inside her home, everything
was neat as a pin and the house always smelled of somethingwas neat as a pin and the house always smelled of something
delicious cooking or just cooked. Geraldine didn’t have a lot of timedelicious cooking or just cooked. Geraldine didn’t have a lot of time
for fun and friends, but she had neatness, order and quiet.for fun and friends, but she had neatness, order and quiet.
3. Albert didn’t have his own home, but he spent lots of time with hisAlbert didn’t have his own home, but he spent lots of time with his
many friends and had lots of fun. He didn’t have his own homemany friends and had lots of fun. He didn’t have his own home
but Albert didn’t care. He would sometimes stay with his friends,but Albert didn’t care. He would sometimes stay with his friends,
Tom or Ralph, at their homes, where they would watch tv, playTom or Ralph, at their homes, where they would watch tv, play
video games, or go with them on trips to the beach or to the zoo.video games, or go with them on trips to the beach or to the zoo.
4. One day, when Albert, Tom and Ralph were going to theOne day, when Albert, Tom and Ralph were going to the
movies, they saw Geraldine outside, busily sweepingmovies, they saw Geraldine outside, busily sweeping
the sidewalk in front of her trim little house. Albert said,the sidewalk in front of her trim little house. Albert said,
“Hey Geraldine, come to the movies with us!”“Hey Geraldine, come to the movies with us!”
““No, no, no, I have too much work to do, I have no timeNo, no, no, I have too much work to do, I have no time
for fun,” said Geraldine, and she waved them on, stillfor fun,” said Geraldine, and she waved them on, still
busily sweeping.busily sweeping.
5. Albert didn’t understand this. Albert didn’t have a home of hisAlbert didn’t understand this. Albert didn’t have a home of his
own, but that never bothered him. He always had great funown, but that never bothered him. He always had great fun
doing fun things with his friends. Sometimes, when hedoing fun things with his friends. Sometimes, when he
wasn’t invited to sleep at one of his friend’s homes, hewasn’t invited to sleep at one of his friend’s homes, he
would find a cozy place to curl up outside, where he wouldwould find a cozy place to curl up outside, where he would
fall peacefully asleep under the stars, thinking of the placesfall peacefully asleep under the stars, thinking of the places
he’d gone with his friends and the things they had done andhe’d gone with his friends and the things they had done and
seen, and talked about.seen, and talked about.
6. ““Oh, well, who wants to spend all their timeOh, well, who wants to spend all their time
working on chores anyway,” he thought toworking on chores anyway,” he thought to
himself as he and Tom and Ralph waved tohimself as he and Tom and Ralph waved to
Geraldine and continued on their merry way toGeraldine and continued on their merry way to
the movie theater.the movie theater.
7.
8. The summer months passed, the leaves startedThe summer months passed, the leaves started
to change color and finally to fall from the trees,to change color and finally to fall from the trees,
and the mornings became colder and colder.and the mornings became colder and colder.
Geraldine made sure put her flower gardens toGeraldine made sure put her flower gardens to
bed against the coming cold weather, laid in abed against the coming cold weather, laid in a
supply of firewood, and made a batch of muffins.supply of firewood, and made a batch of muffins.
9. As she ate one with a cup of hot tea as she sat in herAs she ate one with a cup of hot tea as she sat in her
solitary rocking chair alone in her cozy little kitchen, shesolitary rocking chair alone in her cozy little kitchen, she
thought to herself, “It would be nice to have someone tothought to herself, “It would be nice to have someone to
share these delicious muffins and tea with. It would beshare these delicious muffins and tea with. It would be
nice to have someone to talk to.” But Geraldine justnice to have someone to talk to.” But Geraldine just
finished her muffin and got back to her chores.finished her muffin and got back to her chores.
10. Albert woke up one morning feeling cold and hungry.Albert woke up one morning feeling cold and hungry.
Snow had fallen in the night, and Albert was shiveringSnow had fallen in the night, and Albert was shivering
and hopping up and down trying to keep warm. Heand hopping up and down trying to keep warm. He
walked to his friend Tom’s house and asked to come inwalked to his friend Tom’s house and asked to come in
to get warm and have something to eat. Tom said, I’mto get warm and have something to eat. Tom said, I’m
sorry but my whole family is here and there is no moresorry but my whole family is here and there is no more
room.room.
11. Albert walked to Ralph’s house, feeling even colderAlbert walked to Ralph’s house, feeling even colder
and hungrier, but when he got there, he saw a note onand hungrier, but when he got there, he saw a note on
the door that said “On vacation, won’t be back untilthe door that said “On vacation, won’t be back until
spring.”spring.”
12. Albert felt terrible. He didn’t know what to do, so heAlbert felt terrible. He didn’t know what to do, so he
just kept walking to keep warm. He passed byjust kept walking to keep warm. He passed by
Geraldine’s house, where he saw smoke puffing fromGeraldine’s house, where he saw smoke puffing from
the chimney. The light coming from behind thethe chimney. The light coming from behind the
cheerful curtains and the clean windows looked socheerful curtains and the clean windows looked so
appealing that Albert knocked on Geraldine’s door.appealing that Albert knocked on Geraldine’s door.
13. Geraldine had been home alone sitting beside the fire,Geraldine had been home alone sitting beside the fire,
and when she heard the door she was surprised, sheand when she heard the door she was surprised, she
didn’t have many visitors. Her friends used to ask herdidn’t have many visitors. Her friends used to ask her
to do things with them, but she always answered thatto do things with them, but she always answered that
she had too much work to do, so eventually they hadshe had too much work to do, so eventually they had
stopped asking.stopped asking.
14. When Geraldine opened the door, there wasWhen Geraldine opened the door, there was
Albert, looking cold and miserable. “Geraldine,Albert, looking cold and miserable. “Geraldine,
may I come in and get warm and maybe havemay I come in and get warm and maybe have
a bite to eat?” Geraldine was surprised, buta bite to eat?” Geraldine was surprised, but
she said, “Sure, come on in.”she said, “Sure, come on in.”
15. Albert came in and Geraldine gave him some warmAlbert came in and Geraldine gave him some warm
muffins and a cup of hot tea. The two sat and talkedmuffins and a cup of hot tea. The two sat and talked
and laughed the day away. Albert told Geraldine aboutand laughed the day away. Albert told Geraldine about
the things he and his friends had done last summer,the things he and his friends had done last summer,
the places they’d gone, the things they’d seen, thethe places they’d gone, the things they’d seen, the
funny things they’d laughed about. Geraldine couldn’tfunny things they’d laughed about. Geraldine couldn’t
remember when she had enjoyed herself more.remember when she had enjoyed herself more.
16. Later, when the fire was beginning to get low and theLater, when the fire was beginning to get low and the
muffins were all gone, Geraldine stood up to bring inmuffins were all gone, Geraldine stood up to bring in
wood for the fire, tidy up the kitchen and make morewood for the fire, tidy up the kitchen and make more
muffins. Albert wanted to spend more time talking andmuffins. Albert wanted to spend more time talking and
laughing, so he said, “Hey Geraldine, I will fill the woodlaughing, so he said, “Hey Geraldine, I will fill the wood
box while you make muffins, then maybe we could gobox while you make muffins, then maybe we could go
outside and make a snowman…together,” said Albert.outside and make a snowman…together,” said Albert.
17. Geraldine smiled. “That’s a great idea,” she said, andGeraldine smiled. “That’s a great idea,” she said, and
the two made quick work of tidying up after their snackthe two made quick work of tidying up after their snack
and filling the woodbox. They bundled up and ranand filling the woodbox. They bundled up and ran
outside, and quickly made a snowman. When Albert’soutside, and quickly made a snowman. When Albert’s
friends, Tom and Ralph came by, they were surprised tofriends, Tom and Ralph came by, they were surprised to
see their friend and Geraldine p[laying together, but theysee their friend and Geraldine p[laying together, but they
all laughed and played and had a wonderful snowballall laughed and played and had a wonderful snowball
fight.fight.
18. Albert remained with Geraldine through theAlbert remained with Geraldine through the
winter. In the spring time, the two of them wentwinter. In the spring time, the two of them went
out and started working on the garden, plantingout and started working on the garden, planting
food and flowers and making the yard trim, tidyfood and flowers and making the yard trim, tidy
and welcoming.and welcoming.
19. The two of them worked hard in the mornings, and in theThe two of them worked hard in the mornings, and in the
middle of the day then they had a delicious lunchmiddle of the day then they had a delicious lunch
together, and in the evenings they had parties, went totogether, and in the evenings they had parties, went to
the movies, or talked and laughed together before thethe movies, or talked and laughed together before the
fire. Geraldine learned to enjoy herself more and Albertfire. Geraldine learned to enjoy herself more and Albert
learned how good it felt to work hard and help others.learned how good it felt to work hard and help others.
They both learned to balance work and play and theyThey both learned to balance work and play and they
both lived happily ever after.both lived happily ever after.