Skip to content
Extraits de code Groupes Projets
Valider c3394dee rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

Remove print and add no create options

parent 80ee43f8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -10,13 +10,11 @@ class ScopHrTimesheetExp(models.Model): ...@@ -10,13 +10,11 @@ class ScopHrTimesheetExp(models.Model):
expense_ids = fields.One2many( expense_ids = fields.One2many(
comodel_name='hr.expense', comodel_name='hr.expense',
inverse_name='timesheet_id', inverse_name='timesheet_id',
string='Dépsenses associées') string='Dépenses associées')
@api.multi @api.multi
def create_expense(self): def create_expense(self):
for ts in self: for ts in self:
print("__ Fonction dépense")
print(ts)
return { return {
"type": 'ir.actions.act_window', "type": 'ir.actions.act_window',
"res_model": 'hr.expense', "res_model": 'hr.expense',
......
...@@ -16,7 +16,7 @@ class CGScopProductTemplate(models.Model): ...@@ -16,7 +16,7 @@ class CGScopProductTemplate(models.Model):
string="Type de calcul", string="Type de calcul",
default="free", default="free",
help=""" help="""
Défini l'option de calcul dans la note de frais : Définit l'option de calcul dans la note de frais :
- Libre : permet à l'utilisateur de définir le prix et la quantité - Libre : permet à l'utilisateur de définir le prix et la quantité
- Forfait : l'utilisateur n'a pas la possibilité de modifier le - Forfait : l'utilisateur n'a pas la possibilité de modifier le
prix ni la quantité égale à 1 par défaut prix ni la quantité égale à 1 par défaut
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<field name="model">hr.expense</field> <field name="model">hr.expense</field>
<field name="inherit_id" ref="hr_expense.view_expenses_tree"/> <field name="inherit_id" ref="hr_expense.view_expenses_tree"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="analytic_account_id" position="attributes"> <field name="analytic_account_id" position="attributes" options="{'no_open': True, 'no_create': True}">
<attribute name="groups"></attribute> <attribute name="groups"></attribute>
</field> </field>
</field> </field>
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
<attribute name="required">True</attribute> <attribute name="required">True</attribute>
</field> </field>
<field name="product_id" position="attributes"> <field name="product_id" position="attributes">
<attribute name="options">{'no_open': True}</attribute> <attribute name="options">{'no_open': True, 'no_create': True}</attribute>
</field> </field>
<field name="employee_id" position="attributes"> <field name="employee_id" position="attributes">
<attribute name="options">{'no_open': True}</attribute> <attribute name="options">{'no_open': True, 'no_create': True}</attribute>
</field> </field>
<field name="unit_amount" position="attributes"> <field name="unit_amount" position="attributes">
<attribute name="attrs">{'invisible': [('expense_formula', '!=', 'free')]}</attribute> <attribute name="attrs">{'invisible': [('expense_formula', '!=', 'free')]}</attribute>
...@@ -67,12 +67,12 @@ ...@@ -67,12 +67,12 @@
<attribute name="string">Code activité UR</attribute> <attribute name="string">Code activité UR</attribute>
<attribute name="groups"></attribute> <attribute name="groups"></attribute>
<attribute name="readonly">True</attribute> <attribute name="readonly">True</attribute>
<attribute name="options">{'no_open': True}</attribute> <attribute name="options">{'no_open': True, 'no_create': True}</attribute>
<attribute name="attrs">{'invisible': [('timesheet_id', '=', False)]}</attribute> <attribute name="attrs">{'invisible': [('timesheet_id', '=', False)]}</attribute>
</field> </field>
<field name="analytic_account_id" position="after"> <field name="analytic_account_id" position="after">
<field name="coop_id" attrs="{'invisible': [('timesheet_id', '=', False)]}" readonly="True" options="{'no_open': True}" /> <field name="coop_id" attrs="{'invisible': [('timesheet_id', '=', False)]}" readonly="True" options="{'no_open': True, 'no_create': True}" />
<field name="ur_financial_system_id" attrs="{'invisible': [('timesheet_id', '=', False)]}" readonly="True" options="{'no_open': True}"/> <field name="ur_financial_system_id" attrs="{'invisible': [('timesheet_id', '=', False)]}" readonly="True" options="{'no_open': True, 'no_create': True}"/>
</field> </field>
<label for="payment_mode" position="attributes"> <label for="payment_mode" position="attributes">
<attribute name="invisible">True</attribute> <attribute name="invisible">True</attribute>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter