[MIG] stock_picking_report_custom_description: Migration to v11

This commit is contained in:
cubells
2017-05-15 15:44:38 +02:00
committed by Ernesto Tejeda
parent f47695a8a7
commit 95bc026a6e
5 changed files with 46 additions and 10 deletions

View File

@@ -0,0 +1,40 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
=======================================
Stock Picking Report Custom Description
=======================================
This module allows to print moves description in picking reports.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/stock-logistics-reporting/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Carlos Dauden <carlos.dauden@tecnativa.com>
Maintainer
----------
.. image:: http://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: http://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.

View File

@@ -1,3 +1,2 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Stock Picking Report Custom Description",
"summary": "Show moves description in picking reports",
"version": "9.0.1.0.0",
"version": "11.0.1.0.0",
"category": "Warehouse",
"website": "http://www.tecnativa.com",
"website": "https://www.tecnativa.com",
"author": "Tecnativa, "
"Odoo Community Association (OCA)",
"license": "AGPL-3",

View File

@@ -1,3 +1,2 @@
# -*- coding: utf-8 -*-
from . import stock

View File

@@ -1,12 +1,11 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import api, fields, models
from odoo import api, fields, models
class StockPackOperation(models.Model):
_inherit = 'stock.pack.operation'
class StockMoveLine(models.Model):
_inherit = 'stock.move.line'
several_product_description = fields.Boolean(
compute='_compute_several_product_description',
@@ -15,6 +14,6 @@ class StockPackOperation(models.Model):
@api.multi
def _compute_several_product_description(self):
for operation in self:
names = operation.linked_move_operation_ids.mapped('move_id.name')
names = operation.mapped('move_id.name')
operation.several_product_description = (
not all(x == names[0] for x in names))