Skip to content
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

Merged

Conversation

cubells
Copy link
Member

@cubells cubells commented Sep 8, 2017

  • Update README
  • Update views
  • Update translations
  • Update demo data
  • Update tests

cc @Tecnativa

@cubells cubells force-pushed the 10.0-mig-account_invoice_production_lot branch from 3da2d3e to f98f223 Compare September 8, 2017 17:38
@pedrobaeza pedrobaeza mentioned this pull request Sep 11, 2017
11 tasks
#. 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"
Copy link
Member

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"
Copy link
Member

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 -*-
Copy link
Member

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',
Copy link
Member

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',
Copy link
Member

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",
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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(
Copy link
Member

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.

Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I understand.

@cubells cubells force-pushed the 10.0-mig-account_invoice_production_lot branch from 35f24d1 to a8656f2 Compare September 12, 2017 10:03
@pedrobaeza
Copy link
Member

@luismontalba @chienandalu please review

Copy link
Member

@luismontalba luismontalba left a 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',
Copy link
Member

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

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on runbot 👍

@pedrobaeza pedrobaeza force-pushed the 10.0-mig-account_invoice_production_lot branch from a8656f2 to bf1c6e2 Compare December 19, 2017 08:19
@pedrobaeza pedrobaeza merged commit 433879d into OCA:10.0 Dec 19, 2017
@pedrobaeza pedrobaeza deleted the 10.0-mig-account_invoice_production_lot branch December 19, 2017 08:21
pedrobaeza added a commit that referenced this pull request Dec 19, 2017
…tion_lot

[MIG] account_invoice_production_lot: Migration to 10.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants