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

8.0 ref port account product fiscal classification #28

Merged

Conversation

legalsylvain
Copy link
Contributor

This PR :

@danimaribeiro : sorry but I dropped your brazilian translation because all fields and model have changed.

all the taxes;

.. image:: ./static/src/img/product_template_accounting_setting.png

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These images are not loading correctly. The names and path are wrong.

@legalsylvain
Copy link
Contributor Author

@danimaribeiro : about that comment, #24 (comment) i didn't create a new description field, because the new name has big size. (256), the old one was 32 and the old description was 64.
I don't see the interest of this field. Are you agree with this removal, or do you see any issue ?

product_tmpl_qty = fields.Integer(
string='Products Quantity', compute='_compute_product_tmpl_info')

purchase_tax_ids = fields.Many2many(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI : about #24 (comment)
I set purchase_tax_ids instead of purchase_base_tax_ids, for clarity. I used oldname and I set the same table name, so upgrade should work.
If your custom modules overload this field and sale_base_tax_ids, please make the changes.

@legalsylvain
Copy link
Contributor Author

@ ALL : about the migration between a database V7 using account_product_fiscal_classification (with properties) and a V8 DB using this account_product_fiscal_classification module, I suggest you to simply uninstall the module before the migration. The installation of the module in V8 will create again all fiscal classification depending of all your product template configuration and set them to the according templates.

doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='fiscal_classification_id']")
if nodes:
nodes[0].set('required', '1')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just didn't understand why you have to override fields_view_get just to set required.
Why not put to xml view directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @danimaribeiro,
Indeed, my explication was not clear. I updated it. Please let me know if you have any doubt.
https://github.com/OCA/account-fiscal-rule/pull/28/files#diff-95ba4f4a046cd577c87a220edad46e0dR59

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks.
About the description there is no problem if you don't create, we inherit and add to it.
We use the name for the code, and description to description of classification, maybe we create the code instead of descritption.
For me it's ok now, I also asked @mileo to test this.

@danimaribeiro
Copy link

I did a full test in all functionalities.
Working perfectly 👍

@rvalyi
Copy link
Member

rvalyi commented Sep 8, 2015

hey thanks @legalsylvain I was about to ping you about that one again. Seems you need some nice work, I'll review that in detail tomorrow.

@legalsylvain
Copy link
Contributor Author

@danimaribeiro or @mileo : could you pull translation again (BR) ?
If not, not a problem it could be done in another PR.
Kind regards.

@danimaribeiro
Copy link

I do the translations.

}
super(ProductTemplate, self.sudo()).write(tax_vals)
elif 'supplier_taxes_id' in vals.keys() or 'taxes_id' in vals.keys():
# product template Single update mode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see how this branch of code will be used if the by normal user if in view this fields are readonly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯
LGTM

@mileo
Copy link
Member

mileo commented Sep 10, 2015

Tested, nice work, we can do nice features in l10n-brazil with your work.

LGTM, just #28 (comment)

I can help in translations too.

@legalsylvain
Copy link
Contributor Author

@danimaribeiro, @mileo : pot file added. I set also a field as translate = true.

@renatonlima
Copy link
Member

I guys,

Maybe we can use transfix to manage translation for this repo? OCA/maintainer-quality-tools#194

I'll review that in detail...

thanks @legalsylvain

@danimaribeiro
Copy link

@legalsylvain I sent you a PR with translations.
grap#3
Could you at least copy the pt_BR.po file.

@renatonlima The translations in transifex work just after merge.

@legalsylvain
Copy link
Contributor Author

Thanks. Merged.
kind regards.

@legalsylvain
Copy link
Contributor Author

@rvalyi , @renatonlima : any news ?
kind regards.

@renatonlima
Copy link
Member

Hi @legalsylvain,

Sorry for delay, LGTM!

Some remarks:

  1. Here in Brazil our fiscal classifications has code and description, I think others fical classification uses too, like https://en.wikipedia.org/wiki/Harmonized_System;
  2. Harmonized System has a hierarchy in our old module we have the field parent_id;
  3. Template class, here in brazil we have around 14k fiscal classification records, we use one template to define sale and purchase taxes and use account.tax.template references from account chart to create records in account.fiscal.classification records.

I think we can aprove this PR and create others PR to implement these remarks

Good work!

kind regards.

@legalsylvain
Copy link
Contributor Author

@renatonlima : Thanks for your review.
point 1 : done ;
point 2 and 3 : Yes, better to implement this kind of extra-feature in another PR ;

@ALL : this PR can be merged. (3 approvals)

@rvalyi
Copy link
Member

rvalyi commented Sep 22, 2015

@legalsylvain could you rebase on 8.0 please?

@legalsylvain legalsylvain force-pushed the 8.0_REF_PORT_account_product_fiscal_classification branch from 5743141 to 0c7dafa Compare September 22, 2015 16:18
@legalsylvain
Copy link
Contributor Author

@rvalyi : done.

rvalyi added a commit that referenced this pull request Sep 22, 2015
…classification

8.0 ref port account product fiscal classification
@rvalyi rvalyi merged commit 7f2db78 into OCA:8.0 Sep 22, 2015
legalsylvain added a commit to grap/odoo-addons-misc that referenced this pull request Sep 23, 2015
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.

6 participants