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

[fix] default company

parent 6080cd34
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -47,7 +47,7 @@ class ScopHrTimesheetSheet(models.Model):
string="Company",
readonly=True,
states={"draft": [("readonly", False)]},
default=lambda self: self.env.user.company_id,
default=lambda self: self.env.company,
)
validation_date = fields.Date("Date de validation")
submit_date = fields.Date("Soumis le")
......
......@@ -15,7 +15,7 @@ class ScopTimesheetCode(models.Model):
company_id = fields.Many2one(
comodel_name="res.company",
string="Société",
default=lambda self: self.env.user.company_id,
default=lambda self: self.env.company,
)
ur_id = fields.Many2one(
"union.regionale",
......
......@@ -42,7 +42,7 @@ class ScopMonthTimesheet(models.Model):
company_id = fields.Many2one(
comodel_name="res.company",
string="Société",
default=lambda self: self.env.user.company_id,
default=lambda self: self.env.company,
)
ur_id = fields.Many2one(
"union.regionale",
......
......@@ -15,7 +15,7 @@ class ScopRegionalConvention(models.Model):
company_id = fields.Many2one(
comodel_name="res.company",
string="Société",
default=lambda self: self.env.user.company_id,
default=lambda self: self.env.company,
)
ur_id = fields.Many2one(
"union.regionale",
......
......@@ -130,9 +130,9 @@
</field>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="activity_ids" widget="mail_activity" />
<field name="message_ids" widget="mail_thread" />
<field name="message_follower_ids" options="{'post_refresh':True}" groups="base.group_user"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
......
......@@ -11,6 +11,13 @@
<field name="arch" type="xml">
<form string="Project">
<sheet string="Project">
<field name="active" invisible="1" />
<widget
name="web_ribbon"
title="Archivé"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<div
class="oe_button_box"
name="button_box"
......@@ -25,19 +32,6 @@
attrs="{'invisible': [('allow_timesheets', '=', False)]}"
groups="hr_timesheet.group_hr_timesheet_user"
/>
<button
name="toggle_active"
type="object"
confirm="(Un)archiving a project automatically (un)archives its tasks. Do you want to proceed?"
class="oe_stat_button"
icon="fa-archive"
>
<field
name="active"
widget="boolean_button"
options='{"terminology": "archive"}'
/>
</button>
</div>
<div class="oe_title">
<h1>
......@@ -106,12 +100,8 @@
</sheet>
<div class="oe_chatter">
<field
name="message_follower_ids"
widget="mail_followers"
help="Follow this project to automatically track the events associated to tasks and issues of this project."
groups="base.group_user"
/>
<field name="message_follower_ids" options="{'post_refresh':True}" groups="base.group_user"/>
<field name="message_ids"/>
</div>
</form>
</field>
......
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