-
-
Notifications
You must be signed in to change notification settings - Fork 281
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][IMP] account_invoice_inter_company: option to avoid product_id in invoice lines #111
[11.0][IMP] account_invoice_inter_company: option to avoid product_id in invoice lines #111
Conversation
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.
Curious use case, but modifications are correct and they don't mean any performance penalty. I think any way that this should be put at inter-company rule level instead, for better flexibility. Is it possible?
@pedrobaeza the point is that some users can have access to multiple companies, so products belonging to a different company than the one of the invoice could be used. In our environment we use different product for different companies. I cannot find a working solution by inter-company rule level. |
I'm talking about putting the "no product" option in the inter-company rule level, although a product mapping can be also a good addition. |
I think I didn't understand then... What do you mean with inter-company rule? 🤔 |
@pedrobaeza I think the productmapping will be quite complex if you have a lot of products. We are working with 4 companies and mapping them would be a lot of work. For now I would suggest to keep it as simple as possible and leave it empty. Maybe in the future we can add a matrix with the products on the left side and on the top row the companies. And a good addition would be to have a flag on the products for intercompany usage, so the list of the to be mapped is shorter. |
OK, I see that there's no other place but company to put this. Then it's OK for me. You can mention in the roadmap the mapping part. |
@@ -250,6 +252,11 @@ def _prepare_invoice_line_data(self, dest_invoice, dest_company): | |||
% (self.env.ref('account.data_account_type_revenue').name, | |||
dest_company.name, dest_company.id)) | |||
tax_ids = dest_line_data.get('invoice_line_tax_ids', False) | |||
|
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.
Please don't add empty lines inside methods code.
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.
Works fine. All the lines are copied to the intercompany invoice without products
e131e71
to
8b238d4
Compare
Well it would be nice to add the possibility to create an invoice without any products. At this moment the system will raise an user error when I try confirm the invoice, and it wont create the inter-company invoice in the other company.
|
Failure of tests in travis seems not related with this module |
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
… in invoice lines (OCA#111) * Add product mapping in roadmap * Allow creation of invoice lines without products
For our multicompany environment we need an option to skip the product_id in the created invoice lines.