Code review comment for lp:~pedro.baeza/openobject-addons/7.0-updated_l10n_es

Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Olivier,

I'm working on the refactorization we were talking here, and I have found one problem: if I define all the common taxes in the parent chart, when I want to select one of them as default tax, it doesn't appear in the wizard. There are two parts implied in this wizard that affect this problem:

- The onchange_chart_template_id, where the default tax is selected. I can overwrite method to construct by hand chart_ids (the selected chart id and all of its parents) to make the search ("chart_template_id", "in", chart_ids). Anyway, it would be clearer to make this little code change in the core.

- The domain in the view, that it's for now:

domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"

which lead to the current problem. We have an operation called 'child_of' to select current record and all of its children and grand-children, but I don't know if there is the reverse operation (the current record, its parent, its grand-parent, and so on...).

I beg you two things:
- Please guide me to get the correct domain in this view. It could be possible?
- Merge the changes in the core to avoid using patches in l10n_es module.

« Back to merge proposal