-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
[MIG] account_invoice_production_lot: Migration to 10.0 #61
[MIG] account_invoice_production_lot: Migration to 10.0 #61
Conversation
3da2d3e
to
f98f223
Compare
#. module: account_invoice_production_lot | ||
#: model:ir.model.fields,field_description:account_invoice_production_lot.field_account_invoice_line_order_line_ids | ||
msgid "Order Lines" | ||
msgstr "Lineas de factura" |
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.
s/factura/pedido
#: model:ir.model.fields,field_description:account_invoice_production_lot.field_account_invoice_line_prod_lot_ids | ||
#: model:ir.ui.view,arch_db:account_invoice_production_lot.view_invoice_line_form_prod_lots | ||
msgid "Production Lots" | ||
msgstr "Lotes de producción" |
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.
Lotes/Nº de serie
@@ -0,0 +1,58 @@ | |||
# -*- coding: utf-8 -*- |
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.
File should be named account_invoice.py
column2='order_line_id', | ||
string='Order Lines', | ||
readonly=True, | ||
oldname='order_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.
As this is not a field with column, you don't need oldname
. relation
, column1
and column2
already point to the correct place to see for preserving data.
|
||
prod_lot_ids = fields.Many2many( | ||
comodel_name='stock.production.lot', | ||
relation='stock_prod_lot_invoice_rel', |
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.
Being this a computed not stored field, you don't need to put relation
nor column1
"summary": "Display delivered serial numbers in invoice", | ||
'website': 'http://www.agilebg.com', | ||
'license': 'AGPL-3', | ||
'category': 'Accounting & Finance', | ||
"depends": [ | ||
"account_accountant", | ||
"sale_stock", | ||
"stock_picking_invoice_link", |
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.
There's no more need of stock_picking_invoice_link
dependency, as you are fetching data from other place. Please remove this dependency.
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.
This line force me to add this dependency:
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.
line.prod_lot_ids = self.mapped( | ||
'move_line_ids.lot_ids') | ||
else: | ||
line.prod_lot_ids = self.mapped( |
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.
Why don't you just simply use this and remove the dependency as stated. There's no other way now of creating invoices (you can't invoice from pickings), so this is enough.
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.
Or is there any rough edge I don't find?
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.
Ok, I understand.
35f24d1
to
a8656f2
Compare
@luismontalba @chienandalu please review |
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.
Tested on runbot (minor comment in code)
"sale_stock", | ||
"stock_picking_invoice_link", | ||
], | ||
"version": "10.0.1.0.0", | ||
"author": "Agile Business Group,Odoo Community Association (OCA)", | ||
"summary": "Display delivered serial numbers in invoice", | ||
'website': 'http://www.agilebg.com', |
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.
You could change website key following last convention:
https://github.com/OCA/maintainer-tools/blob/master/template/module/__openerp__.py#L9
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.
Tested on runbot 👍
a8656f2
to
bf1c6e2
Compare
…tion_lot [MIG] account_invoice_production_lot: Migration to 10.0
cc @Tecnativa