-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
[11.0] A better wizard for fiscal code generation. #569
Conversation
Hey @Byloth, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
Ok... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nel wizard del calcolo, lasciando vuoto il campo città e andando a modificare manualmente il campo provincia, ottengo
Traceback (most recent call last):
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/http.py", line 692, in dispatch
result = self._call_function(**self.params)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/http.py", line 936, in __call__
return self.method(*args, **kw)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/addons/web/controllers/main.py", line 934, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/models.py", line 5099, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/models.py", line 4994, in _onchange_eval
method_res = method(self)
File "/home/elbati/workspace/odoo/instances/odoo11/parts/l10n-italy/l10n_it_fiscalcode/wizard/compute_fc.py", line 88, in onchange_birth_province
names = city_ids.mapped('names')
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/models.py", line 4512, in mapped
recs = recs._mapped_func(operator.itemgetter(name))
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/models.py", line 4491, in _mapped_func
vals = [func(rec) for rec in self]
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/models.py", line 4491, in <listcomp>
vals = [func(rec) for rec in self]
File "/home/elbati/workspace/odoo/instances/odoo11/parts/odoo/odoo/models.py", line 4758, in __getitem__
return self._fields[key].__get__(self, type(self))
KeyError: 'names'
Personalmente rimuoverei l'onchange onchange_birth_province
, essendo sull'ultimo campo del form , la sua modifica non dovrebbe influire su campi precedenti
@Byloth prevedi di portare avanti questa? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, grazie
@Byloth potresti fare squash/fixup dei 3 commit? |
Here you are! 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grazie! Solo qualche consiglio ma per me è ok
This PR implements some little features within the wizard used for the generation of partner's fiscal code.
res.country.state
(which actually contains Italian provinces) is used for field "Birth province" (and all related logics).required
.<group>
for splitting fields in two different columns and give to the user a better experience.radio
widget.