-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[18.0] [MIG] sale_invoice_plan: Migration to 18.0 #3718
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
base: 18.0
Are you sure you want to change the base?
Conversation
635f10a to
6c46833
Compare
|
@bizzappdev Still draft ? |
|
@rousseldenis Yes, some manual test cases failed, we are working on the Fixes. next week it might be ready. |
6c46833 to
e063dd0
Compare
|
@rousseldenis MR is ready for the review. |
|
/ocabot migration sale_invoice_plan |
sale_invoice_plan/models/sale.py
Outdated
| if rec.state != "draft": | ||
| if rec.invoice_plan_ids.filtered(lambda plan: not plan.percent): | ||
| raise ValidationError( | ||
| _("Please fill percentage for all invoice plan lines") |
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 fill percentage for all invoice plan lines") | |
| self.env._("Please fill percentage for all invoice plan lines") |
Please replace all _ with self.env._ to improve performance in some cases.
According to the migration list to 18.0 at https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-18.0
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.
remark : Renaming the view ID from 'tree' to 'list' is optional.
| @@ -0,0 +1,233 @@ | |||
| <?xml version="1.0" encoding="utf-8" ?> | |||
| <odoo> | |||
| <record model="ir.ui.view" id="view_sale_invoice_plan_tree"> | |||
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.
| <record model="ir.ui.view" id="view_sale_invoice_plan_tree"> | |
| <record model="ir.ui.view" id="view_sale_invoice_plan_list"> |
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo> | ||
| <record model="ir.ui.view" id="view_sale_invoice_plan_tree"> | ||
| <field name="name">view.sale.invoice.plan.tree</field> |
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.
| <field name="name">view.sale.invoice.plan.tree</field> | |
| <field name="name">view.sale.invoice.plan.list</field> |
| /> | ||
| <field | ||
| name="invoice_plan_ids" | ||
| context="{'tree_view_ref': 'sale_invoice_plan.view_sale_invoice_plan_tree'}" |
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.
| context="{'tree_view_ref': 'sale_invoice_plan.view_sale_invoice_plan_tree'}" | |
| context="{'list_view_ref': 'sale_invoice_plan.view_sale_invoice_plan_list'}" |
| </field> | ||
| </record> | ||
| <record id="view_sale_invoice_plan_tree_readonly" model="ir.ui.view"> | ||
| <field name="name">view.sale.invoice.plan.tree</field> |
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.
| <field name="name">view.sale.invoice.plan.tree</field> | |
| <field name="name">view.sale.invoice.plan.list</field> |
| </search> | ||
| </field> | ||
| </record> | ||
| <record id="view_sale_invoice_plan_tree_readonly" model="ir.ui.view"> |
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.
| <record id="view_sale_invoice_plan_tree_readonly" model="ir.ui.view"> | |
| <record id="view_sale_invoice_plan_list_readonly" model="ir.ui.view"> |
| <field name="name">Sales Invoice Plan</field> | ||
| <field name="type">ir.actions.act_window</field> | ||
| <field name="res_model">sale.invoice.plan</field> | ||
| <field name="view_mode">tree</field> |
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.
| <field name="view_mode">tree</field> | |
| <field name="view_mode">list</field> |
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.
Could you please change the tree view mode to list, as the tree view is no longer in use and it's currently preventing the Sale Invoice Plan window from opening
| <field name="type">ir.actions.act_window</field> | ||
| <field name="res_model">sale.invoice.plan</field> | ||
| <field name="view_mode">tree</field> | ||
| <field name="view_id" ref="view_sale_invoice_plan_tree_readonly" /> |
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.
| <field name="view_id" ref="view_sale_invoice_plan_tree_readonly" /> | |
| <field name="view_id" ref="view_sale_invoice_plan_list_readonly" /> |
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.
@Pani-k-folk Changes are done.
e063dd0 to
d91139e
Compare
| <field name="arch" type="xml"> | ||
| <list editable="bottom"> | ||
| <field name="no_edit" column_invisible="1" /> | ||
| <field name="analytic_account_id" widget="many2many_tags" /> |
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.
@bizzappdev
Why are you show distribution_analytic_account_ids (analytic_account_id) in the Invoice Plan? Shouldn't it be analytic_distribution instead? Also, is this part still necessary to show?"
| ) | ||
| analytic_account_id = fields.Many2one(related="sale_id.analytic_account_id") | ||
| analytic_account_id = fields.Many2many( | ||
| related="sale_id.order_line.distribution_analytic_account_ids" |
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.
Mmmhh, I'm not sure of that. Naming a field with an id' and Ḿany2many` is not correct.
This should be changed.
|
Odoo.sh raise an error while doing test: Addon: 'sale_invoice_plan' View: view_order_form_invoice_plan Fields: View: view_sale_invoice_plan_list ` Other than that, i did some functional testing and seems to be great. |
d91139e to
9247027
Compare
rousseldenis
left a comment
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.
LGTM
|
@bizzappdev Hi, Did you still do this PR?
I solved by check condition amount_untaxed
path: |
|
Hi @bizzappdev, is it possible to mark a draft as ready for review? |
1. Plan date now passed to invoice date 2. Allow edit invoice plan, if no invoice created yet (invoice_count = 0) 3. Add new view Sales Invoice Plan
The implementation has changed in 14.0
…ding to invoice_date
remove the dependency on sale_stock which does not seem to be required. this allows to use the module in service companies which don't need the stock application
…f the product's unit of measure
Currently translated at 100.0% (75 of 75 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_invoice_plan Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_invoice_plan/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-15.0/sale-workflow-15.0-sale_invoice_plan Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_invoice_plan/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-16.0/sale-workflow-16.0-sale_invoice_plan Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_invoice_plan/
9247027 to
51a3d63
Compare
|
@Saran440 Changes are done. |
Saran440
left a comment
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.
Code Review 👍
sale_invoice_plan/models/sale.py
Outdated
| comodel_name="sale.invoice.plan", | ||
| inverse_name="sale_id", | ||
| string="Inovice Plan", | ||
| string="Invoice Plan", |
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.
Just a little comment.
no need to add because odoo will auto use string Invoice Plan
51a3d63 to
fc02c98
Compare
|
@bizzappdev Thanks for your work. If it's okay, let's we merge. |



No description provided.