mirror of
https://bitbucket.org/presik/trytonpsk-stock_co.git
synced 2023-12-14 05:43:05 +01:00
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')
|
categories = fields.Many2Many('product.category', None, None, 'Categories')
|
||||||
company = fields.Many2One('company.company', 'Company',
|
company = fields.Many2One('company.company', 'Company',
|
||||||
required=True)
|
required=True)
|
||||||
brand = fields.Many2One('product.brand', 'Brand')
|
|
||||||
party = fields.Many2One('party.party', 'Party')
|
party = fields.Many2One('party.party', 'Party')
|
||||||
shipment_draft = fields.Boolean('Shipment Draft')
|
shipment_draft = fields.Boolean('Shipment Draft')
|
||||||
start_time = fields.Time('Start Time',)
|
start_time = fields.Time('Start Time',)
|
||||||
|
@ -159,7 +158,7 @@ class PrintMoveByProduct(Wizard):
|
||||||
from_location_id = self.start.from_location.id
|
from_location_id = self.start.from_location.id
|
||||||
if self.start.categories:
|
if self.start.categories:
|
||||||
category_ids = [acc.id for acc in 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
|
brand_id = self.start.brand.id
|
||||||
if self.start.party:
|
if self.start.party:
|
||||||
party_id = self.start.party.id
|
party_id = self.start.party.id
|
||||||
|
@ -200,7 +199,6 @@ class MoveByProduct(Report):
|
||||||
Move = pool.get('stock.move')
|
Move = pool.get('stock.move')
|
||||||
Location = pool.get('stock.location')
|
Location = pool.get('stock.location')
|
||||||
Party = pool.get('party.party')
|
Party = pool.get('party.party')
|
||||||
Brand = pool.get('product.brand')
|
|
||||||
Category = pool.get('product.template-product.category')
|
Category = pool.get('product.template-product.category')
|
||||||
company = Company(data['company'])
|
company = Company(data['company'])
|
||||||
from_location = None
|
from_location = None
|
||||||
|
@ -259,6 +257,7 @@ class MoveByProduct(Report):
|
||||||
('product.template.account_category', 'in', data['categories'])
|
('product.template.account_category', 'in', data['categories'])
|
||||||
)
|
)
|
||||||
if data['brand']:
|
if data['brand']:
|
||||||
|
Brand = pool.get('product.brand')
|
||||||
dom_products.append(
|
dom_products.append(
|
||||||
('product.template.brand', '=', data['brand']),
|
('product.template.brand', '=', data['brand']),
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,8 +18,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="from_location"/>
|
<field name="from_location"/>
|
||||||
<label name="to_location"/>
|
<label name="to_location"/>
|
||||||
<field name="to_location"/>
|
<field name="to_location"/>
|
||||||
<label name="brand"/>
|
|
||||||
<field name="brand"/>
|
|
||||||
<label name="shipment_draft"/>
|
<label name="shipment_draft"/>
|
||||||
<field name="shipment_draft"/>
|
<field name="shipment_draft"/>
|
||||||
<label name="product"/>
|
<label name="product"/>
|
||||||
|
|
Loading…
Reference in a new issue