Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing type fields in account templates #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

austinrutta
Copy link

Activating module on a new Tryton 7.2 instance returns errors for a number of account template records that don't have the type defined. I skimmed through and added a type for any records that Tryton complained about.

trytond@d392070ac651:/tmp$ trytond-admin -d atrx-dev -u account_us
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 465, in parse_xmlstream
    self.sax_parser.parse(source)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.11/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 468, in EndElement
  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 336, in end_element
    self._cont_handler.endElement(name)
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 520, in endElement
    self.taghandler = self.taghandler.endElement(name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 314, in endElement
    self.mh.import_record(
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 696, in import_record
    self.create_records(model, [values], [fs_id])
  File "/usr/local/lib/python3.11/dist-packages/trytond/convert.py", line 702, in create_records
    records = Model.create(vlist)
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/trytond/model/modelsql.py", line 262, in wrapper
    return func(cls, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/trytond/model/modelsql.py", line 979, in create
    cls._validate(sub_records)
  File "/usr/local/lib/python3.11/dist-packages/trytond/transaction.py", line 50, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/trytond/model/modelstorage.py", line 1443, in _validate
    required_test(record, field)
  File "/usr/local/lib/python3.11/dist-packages/trytond/model/modelstorage.py", line 1431, in required_test
    raise RequiredValidationError(
trytond.model.modelstorage.RequiredValidationError: A value is required for field "Type" in record "500120 - Paid leave—direct labor" of "Account Template". - 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant