|
|
@ -53,14 +53,6 @@ class ResPartner(models.Model): |
|
|
|
for partner, child_ids in all_partners_and_children.items(): |
|
|
|
partner.total_invoiced = sum(price['total'] for price in price_totals if price['partner_id'] in child_ids) |
|
|
|
|
|
|
|
@api.multi |
|
|
|
def _get_share_type(self): |
|
|
|
product_obj = self.env['product.product'] |
|
|
|
share_type_list = [('', '')] |
|
|
|
for share_type in product_obj.search([('is_share', '=', True)]): |
|
|
|
share_type_list.append((str(share_type.id), share_type.short_name)) |
|
|
|
return share_type_list |
|
|
|
|
|
|
|
@api.multi |
|
|
|
@api.depends('share_ids') |
|
|
|
def _compute_effective_date(self): |
|
|
@ -69,6 +61,15 @@ class ResPartner(models.Model): |
|
|
|
if partner.share_ids: |
|
|
|
partner.effective_date = partner.share_ids[0].effective_date |
|
|
|
|
|
|
|
@api.multi |
|
|
|
def _get_share_type(self): |
|
|
|
shares = ( |
|
|
|
self.env['product.product'] |
|
|
|
.search([('is_share', '=', True)]) |
|
|
|
) |
|
|
|
share_types = [(share.default_code, share.short_name) for share in shares] |
|
|
|
return [('', '')] + share_types |
|
|
|
|
|
|
|
@api.multi |
|
|
|
@api.depends('share_ids') |
|
|
|
def _compute_cooperator_type(self): |
|
|
|