migrate field bran for report move by product
from module stock_co to product_reference
This commit is contained in:
parent
fe29eb0a22
commit
0aa38ab700
5
stock.py
5
stock.py
|
@ -112,7 +112,6 @@ class MoveByProductStart(ModelView):
|
|||
categories = fields.Many2Many('product.category', None, None, 'Categories')
|
||||
company = fields.Many2One('company.company', 'Company',
|
||||
required=True)
|
||||
brand = fields.Many2One('product.brand', 'Brand')
|
||||
party = fields.Many2One('party.party', 'Party')
|
||||
shipment_draft = fields.Boolean('Shipment Draft')
|
||||
start_time = fields.Time('Start Time',)
|
||||
|
@ -159,7 +158,7 @@ class PrintMoveByProduct(Wizard):
|
|||
from_location_id = self.start.from_location.id
|
||||
if self.start.categories:
|
||||
category_ids = [acc.id for acc in self.start.categories]
|
||||
if self.start.brand:
|
||||
if hasattr(self.start, 'brand') and self.start.brand:
|
||||
brand_id = self.start.brand.id
|
||||
if self.start.party:
|
||||
party_id = self.start.party.id
|
||||
|
@ -200,7 +199,6 @@ class MoveByProduct(Report):
|
|||
Move = pool.get('stock.move')
|
||||
Location = pool.get('stock.location')
|
||||
Party = pool.get('party.party')
|
||||
Brand = pool.get('product.brand')
|
||||
Category = pool.get('product.template-product.category')
|
||||
company = Company(data['company'])
|
||||
from_location = None
|
||||
|
@ -259,6 +257,7 @@ class MoveByProduct(Report):
|
|||
('product.template.account_category', 'in', data['categories'])
|
||||
)
|
||||
if data['brand']:
|
||||
Brand = pool.get('product.brand')
|
||||
dom_products.append(
|
||||
('product.template.brand', '=', data['brand']),
|
||||
)
|
||||
|
|
|
@ -18,8 +18,6 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="from_location"/>
|
||||
<label name="to_location"/>
|
||||
<field name="to_location"/>
|
||||
<label name="brand"/>
|
||||
<field name="brand"/>
|
||||
<label name="shipment_draft"/>
|
||||
<field name="shipment_draft"/>
|
||||
<label name="product"/>
|
||||
|
|
Loading…
Reference in New Issue