Merge pull request #618 from expsa/membership_dev

Membership dev
This commit is contained in:
zainab2097 2024-08-08 17:16:16 +03:00 committed by GitHub
commit adbfc2267b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 13 additions and 3 deletions

View File

@ -11,7 +11,8 @@ class MembershipLevel(models.Model):
color = fields.Char(string='Membership Card Color')
level_no = fields.Char("Number", default=lambda self: self._get_next_levelno(), tracking=True,copy=False)
sequence = fields.Integer(string="Sequence", help="Define the display order")
company_id = fields.Many2one('res.company', string='Company', readonly=True,
default=lambda self: self.env.company)
@api.model
def _get_next_levelno(self):

View File

@ -16,6 +16,8 @@ class ProductTemplate(models.Model):
type_no = fields.Char("Number", default=lambda self: self._get_next_projectno(), tracking=True,copy=False)
sequence_no = fields.Integer(string="Sequence", help="Define the display order")
company_id = fields.Many2one('res.company', string='Company', readonly=True,
default=lambda self: self.env.company)
@api.model
def _get_next_projectno(self):

View File

@ -61,7 +61,7 @@ class CancellReason(models.Model):
name = fields.Char(string='Reasone of Cancellation')
reasone_no = fields.Char("Number", default=lambda self: self._get_next_reasone_no(), tracking=True,copy=False)
sequence = fields.Integer(string="Sequence", help="Define the display order")
company_id = fields.Many2one('res.company', string='Company', readonly=True,default=lambda self: self.env.company)
@api.model
def _get_next_reasone_no(self):

View File

@ -10,6 +10,8 @@
<field name="years"/>
<field name="min"/>
<field name="max"/>
<field name="max"/>
<field widget='color' name="color"/>
</tree>
</field>
@ -25,6 +27,8 @@
<field name="years"/>
<field name="min"/>
<field name="max"/>
<field invisible="1" name="company_id"/>
<field widget='color' name="color"/>
</group>
</form>

View File

@ -6,8 +6,8 @@
<field name="model">product.template</field>
<field name="arch" type="xml">
<tree string="Membership Product Tree View">
<field name="sequence_no" widget="handle"/>
<field name="type_no"/>
<field name="sequence_no" widget="handle"/>
<field name="name"/>
<field name="default_code"/>
<field name="duration"/>
@ -51,6 +51,7 @@
<field name="default_code"/>
<field name="categ_id"/>
<field name="active"/>
<field invisible="1" name="company_id"/>
</group>
<group>
<label for="duration" string="Membership Duration"/>

View File

@ -117,6 +117,8 @@
<field name="sequence" widget="handle"/>
<field name="reasone_no"/>
<field name="name"/>
<field invisible="1" name="company_id"/>
</tree>
</field>
</record>