Browse Source

beesdoo_base module : migration to version 12.0

pull/105/head
Elouan 5 years ago
parent
commit
4acac18783
  1. 2
      beesdoo_base/__init__.py
  2. 1
      beesdoo_base/__manifest__.py
  3. 2
      beesdoo_base/controllers/__init__.py
  4. 2
      beesdoo_base/models/__init__.py
  5. 1
      beesdoo_base/wizard/__init__.py
  6. 4
      beesdoo_base/wizard/member_card.py
  7. 3
      beesdoo_base/wizard/portal_wizard.py

2
beesdoo_base/__init__.py

@ -1,3 +1,3 @@
from . import models
from . import wizard
from . import controllers
from . import controllers

1
beesdoo_base/__manifest__.py

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
{
'name': "Beescoop Base Module",

2
beesdoo_base/controllers/__init__.py

@ -1 +1 @@
from . import report
from . import report

2
beesdoo_base/models/__init__.py

@ -1 +1 @@
from . import partner, membercard
from . import partner, membercard

1
beesdoo_base/wizard/__init__.py

@ -1,2 +1 @@
from . import member_card, partner, portal_wizard

4
beesdoo_base/wizard/member_card.py

@ -35,7 +35,7 @@ class RequestMemberCardPrintingWizard(models.TransientModel):
@api.one
def request_printing(self):
self.partner_ids.write({'member_card_to_be_printed' : True})
class SetAsPrintedWizard(models.TransientModel):
_name = 'membercard.set_as_printed.wizard'
@ -47,5 +47,5 @@ class SetAsPrintedWizard(models.TransientModel):
@api.one
def set_as_printed(self):
self.partner_ids.write({'member_card_to_be_printed' : False,
self.partner_ids.write({'member_card_to_be_printed' : False,
'last_printed' : fields.Datetime.now()})

3
beesdoo_base/wizard/portal_wizard.py

@ -10,7 +10,7 @@ class BeesdooWizard(models.TransientModel):
# for each partner, determine corresponding portal.wizard.user records
res_partner = self.env['res.partner']
partner_ids = self._context.get('active_ids', [])
contact_ids = set()
for partner in res_partner.browse(partner_ids):
for contact in (partner.child_ids | partner):
@ -23,4 +23,3 @@ class BeesdooWizard(models.TransientModel):
'email': contact.email,
'in_portal': in_portal,
})
Loading…
Cancel
Save