Browse Source

[DEL] emc_eater: Module has been merged with b_emc

pull/85/head
Rémy Taymans 5 years ago
committed by robin.keunen
parent
commit
58eb22d60d
  1. 1
      easy_my_coop_eater/__init__.py
  2. 17
      easy_my_coop_eater/__manifest__.py
  3. 29
      easy_my_coop_eater/models/coop.py
  4. 10
      easy_my_coop_eater/models/product.py
  5. 15
      easy_my_coop_eater/view/product_view.xml

1
easy_my_coop_eater/__init__.py

@ -1 +0,0 @@
from . import models

17
easy_my_coop_eater/__manifest__.py

@ -1,17 +0,0 @@
# Copyright 2013-2017 Open Architects Consulting SPRL.
# Copyright 2018- Coop IT Easy SCRLfs
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Easy My Coop Eater/worker",
"version": "12.0.1.0.0",
"depends": ["easy_my_coop", "partner_age"],
"author": "Coop IT Easy SCRLfs",
"license": "AGPL-3",
"category": "Cooperative management",
"website": "https://coopiteasy.be",
"summary": """
This module allows to manage the activity of the cooperator in the supermarket.
""",
"data": ["view/product_view.xml"],
"installable": True,
}

29
easy_my_coop_eater/models/coop.py

@ -1,29 +0,0 @@
from odoo import api, models
class SubscriptionRequest(models.Model):
_inherit = "subscription.request"
def get_eater_vals(self, partner, share_product_id):
vals = {}
eater = share_product_id.eater
if partner.is_company or partner.age < 18:
eater = "eater"
vals["eater"] = eater
return vals
@api.multi
def validate_subscription_request(self):
self.ensure_one()
invoice = super(
SubscriptionRequest, self
).validate_subscription_request()[0]
partner = invoice.partner_id
vals = self.get_eater_vals(partner, self.share_product_id)
partner.write(vals)
return invoice

10
easy_my_coop_eater/models/product.py

@ -1,10 +0,0 @@
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
eater = fields.Selection(
[("eater", "Eater"), ("worker_eater", "Worker and Eater")],
string="Eater/Worker",
)

15
easy_my_coop_eater/view/product_view.xml

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="product_template_form_view_eater" model="ir.ui.view">
<field name="name">product.template.share.form</field>
<field name="model">product.template</field>
<field name="inherit_id"
ref="easy_my_coop.product_template_share_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='minimum_quantity']" position="after">
<field name="eater"
attrs="{'invisible':[('is_share','=',False)]}"/>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save