-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
[15.0][MIG] Commission : Migration to 15.0 #363
[15.0][MIG] Commission : Migration to 15.0 #363
Conversation
…e_commission rev 7)
* PEP 8 fixes * Replace depreciated osv for orm and other depreciation fixes * Code fix and optimization * Add context
* migrate models security and i18n * add demo data and minor fixes * add sale agent and commission views * add stock dependency add views and product/stock overrides * fixed related fields * minor fixes: names and labels * change 'onchange' attribute in view to api.onchange' * improve comments about migration * add invoice view * add wizards * use api.onchange * add store attribute on res.partner.agent * set default currency * change state field to readonly * migrate stock picking and settlements views * fix invoice view * fix invoice wizard * change osv.except_osv to openerp.exceptions * add missed report * fix taxes in action_invoice_create
* Take default commission when manual adding agents + error on settled filter * Many2one pointer of comission section * Fix translation problem + add commission total on sales orders * Cancel settlement when the associated invoice is cancel and go back to invoiced when re-validated
…users w/o sale rights
On generate agent invoice you can only select journal of type "sale". This can cause the numbers of sales invoices not correlated. IMHO, agent invoices must be of type purchase and this solves it, allowing to select journals of type purchase.
… state of the invoice
…elect if commission is calculated from subtotal or from margin * added python tests
Tests create invoices in a month previous the current date, which makes that they fail on January, as previous fiscal year doesn't exist. This is fixed creating invoices in the current date, and calling the settle wizard with one month more. This won't fail on December, because there's no need of the next fiscal year for this operation
When creating a refund from an invoice, pass correct values (converted as dictionary) for the agents lines, so that the refund keep the same commissions (but reversed) than the original invoice.
…omer. (instead of showing when agent is not an agent)
Without this condition, all partners are suppliers, because the default value for agent_type is agent and the onchange is executed.
add same method for account invoice
FIX after changing customer on SO with lines, can't save sale order anymore See odoo/odoo#17618 Also add button to recompute agents on SO lines
as May would have June as period start: ((5 - 1) // 3 + 1) * 3 instead, the new formula: >>> for m in range(1, 13): ... print (m - 1) // 3 * 3 + 1 ... 1 1 1 4 4 4 7 7 7 10 10 10 See hurrinico#2 and odoo/odoo#17618 This extends the workaround, fixing "Record not found" after changing invoice date, for example
Currently translated at 79.4% (124 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 100.0% (156 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 80.1% (125 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 80.7% (126 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 76.2% (119 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 95.5% (149 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 97.4% (152 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 98.7% (154 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 98.7% (154 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Currently translated at 100.0% (156 of 156 strings) Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: commission-14.0/commission-14.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-14-0/commission-14-0-sale_commission/
@manuelcalerosolis To be honest, I don't see the point on removing sale_comission in 5fb8108 in order to add it again in bf13df3 This process only removes the original authors of the lines... |
Hello any update about this PR? |
We are interested in working on this migration if this one is not moving forward soon. If that happens, I was wondering whether we should create one PR covering |
Only one, as the split occurs from the same previous module. |
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.
I feel that the split is not done in an optimal way although I haven't done a thorough check. For example, shouldn't settlement be part of the commission module instead of sale_commission?
There is also this comment #328 (comment) from @pedrobaeza of intending to have commission
, account_commission
and sale_commission
out of 14.0 sale_commission. I think we should go in line with this.
Edit: Sorry, commented in the wrong PR (it was meant to be here #372 (review)), but I guess it applies to this one as well...
Hello @manuelcalerosolis has the migration finished? |
Yes, it is finished, in fact I use it in several clients. |
The problem with this one is that the refactoring is not what we talked about, so let's supersede by #374 |
[This is the migration of the "commissions" repo to 15.0 but there are important changes with respect to previous versions.]
(#343)