Merge pull request #764 from expsa/membership_task

Membership task
This commit is contained in:
zainab2097 2024-08-15 17:03:36 +03:00 committed by GitHub
commit 5d3bf8a840
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 34 additions and 27 deletions

View File

@ -187,28 +187,7 @@
<xpath expr="//field[@name='title']" position="replace"></xpath>
<!-- <xpath expr="//div/h1" position="replace">-->
<!-- <h1 class="o_addressformat">-->
<!-- <div class="o_address_row"-->
<!-- style="display: flex; justify-content: space-between;"> &lt;!&ndash; Title Field on the Right &ndash;&gt;-->
<!-- <div attrs="{'invisible': [('company_type', '=', 'company')]}" style="flex: 1;" class="o_address_state">-->
<!-- <field widget="selection" name="title" placeholder="Title"-->
<!-- options="{'no_quick_create': True}"-->
<!-- attrs="{'invisible': [('company_type', '=', 'company')]}"/>-->
<!-- </div>-->
<!-- &lt;!&ndash; Name Field on the Left &ndash;&gt;-->
<!-- <div style="flex: 1;" class="o_address_zip">-->
<!-- <field name="name" default_focus="1" placeholder="e.g. Lumber Inc"-->
<!-- attrs="{'required': [('type', '=', 'contact'), ('is_company', '=', True)],-->
<!-- 'invisible': [('is_company','=', False)]}"/>-->
<!-- <field name="name" default_focus="1" placeholder="e.g. Brandon Freeman"-->
<!-- attrs="{'required': [('type', '=', 'contact'), ('is_company', '=', False)],-->
<!-- 'invisible': [('is_company','=', True)]}"/>-->
<!-- </div>-->
<!-- </div>-->
<!-- </h1>-->
<!-- </xpath>-->
<xpath expr="//div/h1" position="replace">
<h1 class="o_addressformat">
<div class="o_address_row" style="display: flex; justify-content: flex-start; align-items: center;">
@ -218,7 +197,10 @@
options="{'no_quick_create': True}"
attrs="{'invisible': [('company_type', '=', 'company')]}"/>
</div>
<!-- Separator -->
<div attrs="{'invisible': [('company_type', '=', 'company')]}" style="flex: 0 0 auto; margin: 0 10px;">
/
</div>
<!-- Name Field -->
<div style="flex: 0 0 auto;">
<field name="name" default_focus="1" placeholder="e.g. Lumber Inc"
@ -249,11 +231,32 @@
</group>
</page>
</xpath>
<xpath expr="//field[@name='function']" position="after">
<field name="employer"/>
</xpath>
<xpath expr="//field[@name='function']"position="attributes">
<attribute name="attrs">{'required':[('is_member','=',True)]}</attribute>
</xpath>
<xpath expr="//field[@name='street']"position="attributes">
<attribute name="attrs">{'required':[('is_member','=',True)]}</attribute>
</xpath>
<xpath expr="//field[@name='street2']"position="attributes">
<attribute name="attrs">{'required':[('is_member','=',True)]}</attribute>
</xpath>
<xpath expr="//field[@name='city']"position="attributes">
<attribute name="attrs">{'required':[('is_member','=',True)]}</attribute>
</xpath>
<xpath expr="//field[@name='state_id']"position="attributes">
<attribute name="attrs">{'required':[('is_member','=',True)]}</attribute>
</xpath>
<xpath expr="//field[@name='zip']"position="attributes">
<attribute name="attrs">{'required':[('is_member','=',True)]}</attribute>
</xpath>
<xpath expr="//field[@name='vat']" position="attributes">
<attribute name="attrs">{'invisible':[('company_type','!=','company')]}</attribute>

View File

@ -41,12 +41,16 @@
url("/membership_card_odoo/static/fonts/ce7b5754581057e6f7444e2192850cc8.ttf") format("truetype");
}
#font{
font-family: 'Sakkal Majalla'!important;
font-family: Sakkal Majalla;
}
.font_cairo{
font-family: Sakkal Majalla;
}
</style>
<div style="font-family:'Sakkal Majalla'!important;" id="font" class="page">
<div style="font-family:'Sakkal Majalla'!important;" id="font" class="page font_cairo">
<div t-attf-style="background-color:{{membrship_level_color }};">
<div style="font-family:'Sakkal Majalla'!important;">
<div style="font-family:'Sakkal Majalla'!important;" class="font_cairo">
<center>
<h2><t t-esc="company.name"/></h2>
</center>