Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
Added code documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalesedwin1123 committed Mar 22, 2023
1 parent 5fd91de commit 164635a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spp_custom_fields_ui/models/reqistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ class Registry(models.Model):
_inherit = "res.partner"

def _now(self):
"""Get the current date
To be used in the custom field compute field code.
:return: Date - current date
"""
return fields.Date.today()

def _relativedelta(self, **kwargs):
"""
To be used in the custom field compute field code.
:param kwargs:
:return: dateutil.relativedelta
"""
return relativedelta(**kwargs)

0 comments on commit 164635a

Please sign in to comment.