Guest User

Untitled

a guest
Oct 9th, 2019
107
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class CreatePurchase(Wizard):
  2.     'Create Purchase'
  3.     __name__ = 'purchase.request.create_purchase'
  4.  
  5.     @classmethod
  6.     def _group_purchase_key(self, requests, request):
  7.         pool = Pool()
  8.         Date = pool.get('ir.date')
  9.  
  10.         key = super(CreatePurchase, self)._group_purchase_key(
  11.             requests, request)
  12.         key += (
  13.             ('shipping_mode', request.shipping_mode.id
  14.                 if request.shipping_mode else None),
  15.             ('incoterm', request.party.incoterm),
  16.             ('incoterm_place', request.party.incoterm_place),
  17.             ('purchase_date', Date.today()),
  18.             ('delivery_date', request.supply_date),
  19.             )
  20.         return key
RAW Paste Data