-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
[18.0] [MIG] sale_commission: Migration to 18.0 #583
Open
Borruso
wants to merge
119
commits into
OCA:18.0
Choose a base branch
from
Borruso:18.0-mig-sale_commission
base: 18.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
There will be 2 settlement per month, one covering the first 15 days, and the other for the rest of the month. TT35385
…e_commission_queued
- Make specific top-level menu and permissions for commissions. - Don't depend on account. - Reorganize elements. - Change some parts of the code to fit better ORM tools. - Adjust permissions in children modules. - Add <sheet> to some form views to get modern view.
This way, we can restrict which commissions we can select or be automatically populate in the different documents.
Currently translated at 100.0% (22 of 22 strings) Translation: commission-15.0/commission-15.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-15-0/commission-15-0-sale_commission/ja/
Currently translated at 13.0% (3 of 23 strings) Translation: commission-16.0/commission-16.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission/pt_BR/
Steps to reproduce: - With a user with only sales permission and no invoicing one. - Go to an invoiced sales order. - Click on the smart-button "Invoice". You get a permission error on `account.invoice.line.agent` model. With this commit, we add read permission to salesmen over that object to avoid the problem. The other option would be to protect the view under the invoicing group, but it's interesting that salesmen can check its own invoices commissions. TT44083
Currently translated at 100.0% (23 of 23 strings) Translation: commission-16.0/commission-16.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission/es/
Currently translated at 100.0% (23 of 23 strings) Translation: commission-16.0/commission-16.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission/it/
Currently translated at 100.0% (23 of 23 strings) Translation: commission-16.0/commission-16.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission/it/
Currently translated at 100.0% (23 of 23 strings) Translation: commission-16.0/commission-16.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission/it/
Currently translated at 100.0% (23 of 23 strings) Translation: commission-16.0/commission-16.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission/pt_BR/
Currently translated at 100.0% (23 of 23 strings) Translation: commission-16.0/commission-16.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission/it/
Currently translated at 100.0% (23 of 23 strings) Translation: commission-16.0/commission-16.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-16-0/commission-16-0-sale_commission/it/
Currently translated at 100.0% (22 of 22 strings) Translation: commission-17.0/commission-17.0-sale_commission Translate-URL: https://translation.odoo-community.org/projects/commission-17-0/commission-17-0-sale_commission/tr/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migration from 17.0 to 18.0
Issue: #564