Add area_id to family
This commit is contained in:
parent
2599eb55fb
commit
a9888427ec
@ -145,6 +145,11 @@ class GolemFamily(models.Model):
|
|||||||
note = fields.Text()
|
note = fields.Text()
|
||||||
count = fields.Integer(compute='_compute_count', store=True)
|
count = fields.Integer(compute='_compute_count', store=True)
|
||||||
|
|
||||||
|
area_id = fields.Many2one(
|
||||||
|
'golem.partner.area', index=True, auto_join=True, string='Area',
|
||||||
|
help="Area, quarter... for statistics and activity price."
|
||||||
|
)
|
||||||
|
|
||||||
@api.depends('member_ids')
|
@api.depends('member_ids')
|
||||||
def _compute_count(self):
|
def _compute_count(self):
|
||||||
for family in self:
|
for family in self:
|
||||||
|
@ -45,6 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name="street" placeholder="Street..." />
|
<field name="street" placeholder="Street..." />
|
||||||
<field name="street2" />
|
<field name="street2" />
|
||||||
<field name="zip" placeholder="ZIP" />
|
<field name="zip" placeholder="ZIP" />
|
||||||
|
<field name="area_id" placeholder="Area, quarter..."
|
||||||
|
options="{'no_create': true}" />
|
||||||
<field name="city" placeholder="City" />
|
<field name="city" placeholder="City" />
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
|
Loading…
Reference in New Issue
Block a user