"Sequence and tree editable migration to 6.0 [SKIP CI]."

This commit is contained in:
Sergio Morillo 2021-06-08 16:34:22 +02:00
parent 12b4c40fab
commit 0686f9ddcf
2 changed files with 6 additions and 6 deletions

View file

@ -14,7 +14,7 @@ class SaleLine:
__metaclass__ = PoolMeta
last_prices = fields.Function(
fields.One2Many('sale.line', None, 'Last prices',
fields.Many2Many('sale.line', None, None, 'Last prices',
domain=[('product', '=', Eval('product'))],
depends=['product']),
'get_last_prices')
@ -43,7 +43,7 @@ class SaleLine:
(sale.id != record.sale.id) &
(sale_line.product == record.product.id) &
(sale.party == record.sale.party.id) &
(sale.state != 'cancel') &
(sale.state != 'cancelled') &
(sale.sale_date <= record.sale.sale_date)),
order_by=(sale_line.product, sale.id),
group_by=(sale_line.product, sale.id),

View file

@ -17,7 +17,7 @@ class Move:
__metaclass__ = PoolMeta
last_prices = fields.Function(
fields.One2Many('stock.move', None, 'Last move prices',
fields.Many2Many('stock.move', None, None, 'Last move prices',
domain=[('product', '=', Eval('product'))],
depends=['product']),
'get_last_prices')
@ -57,7 +57,7 @@ class Move:
where=((move.product == record.product.id) &
(move.shipment != '%s,%s' % (_shipment_name,
record.shipment.id)) &
(move.state != 'cancel') &
(move.state != 'cancelled') &
(Column(shipment,
Shipment._get_last_price_party_fieldname()) ==
_party.id) &
@ -74,7 +74,7 @@ class Move:
class ShipmentLastPriceMixin(object):
last_prices = fields.Function(
fields.One2Many('stock.move', None, 'Last move prices'),
fields.Many2Many('stock.move', None, 'Last move prices'),
'get_last_prices')
@classmethod
@ -101,7 +101,7 @@ class ShipmentLastPriceMixin(object):
where=((active_move.shipment ==
Concat('%s,' % cls.__name__, record.id)) &
(shipment.id != record.id) &
(shipment.state != 'cancel') &
(shipment.state != 'cancelled') &
(Column(shipment,
cls._get_last_price_party_fieldname()) ==
party.id) &