Skip to content

Commit

Permalink
TA#46416[ADD]show_project_artwork,show_project_fee,show_project_perdi…
Browse files Browse the repository at this point in the history
…em,show_project_role,show_project_sale:Ajout de champs Notes sur les onglets Projet (#174)
  • Loading branch information
houdaBENTALEB authored Jan 5, 2023
1 parent a874d55 commit 1a377bd
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 26 deletions.
1 change: 1 addition & 0 deletions show_project_artwork/models/project_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class ProjectProject(models.Model):
"artwork_id",
"Artworks",
)
artwork_note = fields.Text(string="Notes")

@api.onchange("parent_id")
def _onchange_parent_propagate_artworks(self):
Expand Down
3 changes: 3 additions & 0 deletions show_project_artwork/views/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<field name="display_name"/>
</tree>
</field>
<label for="artwork_note"/>
<newline/>
<field name="artwork_note"/>
</page>
</page>
</field>
Expand Down
2 changes: 1 addition & 1 deletion show_project_fee/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"maintainer": "Numigi",
"license": "AGPL-3",
"installable": True,
"depends": ["show_project", "show_project_role", "project_type"],
"depends": ["show_project", "show_project_role", "show_project_sale", "project_type"],
"data": ["views/project_project.xml", "security/ir.model.access.csv"],
}
20 changes: 18 additions & 2 deletions show_project_fee/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ msgstr "Devise"
msgid "Display Name"
msgstr ""

#. module: show_project_fee
#: model_terms:ir.ui.view,arch_db:show_project_fee.show_project_sales_tab_form
msgid "Sale"
msgstr "Vente"

#. module: show_project_fee
#: model_terms:ir.ui.view,arch_db:show_project_fee.project_form
msgid "Fees"
Expand Down Expand Up @@ -122,6 +127,11 @@ msgstr "Montant de ventes min"
msgid "Min Sales"
msgstr "Ventes min"

#. module: show_project_fee
#: model:ir.model.fields,field_description:show_project_fee.field_project_project__show_fee_note
msgid "Notes"
msgstr "Notes"

#. module: show_project_fee
#: model:ir.model.fields,field_description:show_project_fee.field_project_show_fee__partner_id
msgid "Partner"
Expand Down Expand Up @@ -149,9 +159,9 @@ msgid "Role"
msgstr "Rôle"

#. module: show_project_fee
#: model_terms:ir.ui.view,arch_db:show_project_fee.project_form
#: model_terms:ir.ui.view,arch_db:show_project_fee.show_project_sales_tab_form
msgid "Sale Amount"
msgstr "Montant de ventes"
msgstr "Montant de vente"

#. module: show_project_fee
#: model:ir.model.fields,field_description:show_project_fee.field_project_show_fee__sequence
Expand Down Expand Up @@ -218,6 +228,7 @@ msgstr ""
"Si un cachet a un type de projet, un autre cachet ne peut pas être défini "
"avec le même rôle et aucun projet."


#. module: show_project_fee
#: code:addons/show_project_fee/models/project_show_fee.py:106
#, python-format
Expand All @@ -231,3 +242,8 @@ msgstr ""
"\n"
"Deux lignes de cachets avec le même rôle et le même type de projet ne "
"peuvent pas avoir des montant de ventes (min / max) qui se chevauchent."

#. module: show_project_fee
#: model_terms:ir.ui.view,arch_db:show_project_fee.show_project_sales_tab_form
msgid "Variable Income"
msgstr "Rémunération variable"
1 change: 1 addition & 0 deletions show_project_fee/models/project_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ProjectProject(models.Model):
show_sale_amount = fields.Monetary()

show_fee_ids = fields.One2many("project.show.fee", "project_id", "Show Fees")
show_fee_note = fields.Text(string="Notes")

def compute_show_fees(self):
for project in self:
Expand Down
56 changes: 35 additions & 21 deletions show_project_fee/views/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,60 @@
<field name="arch" type="xml">
<page name="show_venue" position="after">
<page
string="Fees"
name="show_fees"
attrs="{'invisible': [('show_type', 'not in', ('tour', 'show'))]}"
>
string="Fees"
name="show_fees"
attrs="{'invisible': [('show_type', 'not in', ('tour', 'show'))]}">
<button name="compute_show_fees" type="object" string="Compute Fees"
attrs="{'invisible': [('show_type', '!=', 'show')]}"/>
<group>
<group>
<field name="show_sale_amount" string="Sale Amount"
attrs="{'invisible': [('show_type', '!=', 'show')]}"/>
</group>
</group>
attrs="{'invisible': [('show_type', '!=', 'show')]}"/>

<newline/>
<field name="show_fee_ids" nolabel="1">
<tree editable="bottom">
<field name="sequence" widget="handle"/>
<field name="partner_id"
attrs="{'column_invisible': [('parent.show_type', '!=', 'show')]}"
/>
attrs="{'column_invisible': [('parent.show_type', '!=', 'show')]}"
/>
<field name="role_id"/>
<field name="project_type_id"
attrs="{'column_invisible': [('parent.show_type', '!=', 'tour')]}"
/>
attrs="{'column_invisible': [('parent.show_type', '!=', 'tour')]}"
/>
<field name="type_"/>
<field name="min_sale_amount" string="Min Sales"
attrs="{'readonly': [('type_', '=', 'fixed')],
attrs="{'readonly': [('type_', '=', 'fixed')],
'required': [('type_', '!=', 'fixed')]}"
force_save="1"
/>
force_save="1"
/>
<field name="max_sale_amount" string="Max Sales"
attrs="{'readonly': [('type_', '=', 'fixed')],
attrs="{'readonly': [('type_', '=', 'fixed')],
'required': [('type_', '!=', 'fixed')]}"
force_save="1"
/>
force_save="1"
/>
<field name="amount"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
<label for="show_fee_note"/>
<newline/>
<field name="show_fee_note"/>
</page>
</page>

</field>
</record>
<record id="show_project_sales_tab_form" model="ir.ui.view">
<field name="name">Project Form: Add Sales Amount in Sales Tab</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="show_project_sale.show_project_sale_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='has_benefits_sharing']/parent::group" position="attributes">
<attribute name="string"></attribute>
</xpath>
<xpath expr="//field[@name='has_benefits_sharing']" position="before">
<separator string="Sale"/>
<field name="show_sale_amount" string="Sale Amount"
attrs="{'invisible': [('show_type', '!=', 'show')]}"/>
<separator string="Variable Income"/>
</xpath>
</field>
</record>

Expand Down
2 changes: 1 addition & 1 deletion show_project_perdiem/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ msgstr ""
#~ msgstr "Rôle"

#~ msgid "Sale Amount"
#~ msgstr "Montant de ventes"
#~ msgstr "Montant de vente"

#~ msgid "Show Sale Amount"
#~ msgstr "Montant de vente du spectacle"
Expand Down
1 change: 1 addition & 0 deletions show_project_perdiem/models/project_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Project(models.Model):
"project_id",
"Show Per Diem",
)
show_perdiem_note = fields.Text(string="Notes")

@api.constrains("tour_perdiem_config_ids")
def _check_duplicate_tour_perdiems(self):
Expand Down
3 changes: 3 additions & 0 deletions show_project_perdiem/views/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
</tree>
</field>
</group>
<label for="show_perdiem_note"/>
<newline/>
<field name="show_perdiem_note"/>
</page>
</page>
</field>
Expand Down
1 change: 1 addition & 0 deletions show_project_role/models/project_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ProjectProject(models.Model):
show_member_ids = fields.One2many(
comodel_name="project.show.member", inverse_name="project_id"
)
show_members_note = fields.Text(string="Notes")

@api.onchange("parent_id")
def _onchange_tour_propagate_members(self):
Expand Down
3 changes: 3 additions & 0 deletions show_project_role/views/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
</tree>
</field>
</group>
<label for="show_members_note"/>
<newline/>
<field name="show_members_note"/>
</page>
</xpath>
</field>
Expand Down
13 changes: 12 additions & 1 deletion show_project_sale/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: show_project_sale
#: model:ir.model.fields,field_description:show_project_sale.field_project_project__accomodation
#: model:ir.model.fields,field_description:show_project_sale.field_project_project__has_accomodation
msgid "Accomodation"
msgstr "Hébergement"

#. module: show_project_sale
#: model:ir.model.fields,field_description:show_project_sale.field_project_project__other_contract_terms
msgid "Other terms of the contract"
msgstr "Autres termes du contrat"

#. module: show_project_sale
#: selection:project.project,benefits_sharing_type:0
msgid "After Fixed Expense Amount"
Expand Down Expand Up @@ -158,6 +162,8 @@ msgstr "Repas"
msgid "Other Artists"
msgstr "Autres artistes"



#. module: show_project_sale
#: model:ir.model.fields,field_description:show_project_sale.field_project_price_mixin__price
#: model:ir.model.fields,field_description:show_project_sale.field_project_service_fee__price
Expand Down Expand Up @@ -260,3 +266,8 @@ msgstr "Type de partage de profits"
msgid "Variable Income"
msgstr "Rémunération variable"

#. module: show_project_sale
#: model:ir.model.fields,field_description:show_project_sale.field_project_project__sales_note
msgid "Notes"
msgstr "Notes"

3 changes: 3 additions & 0 deletions show_project_sale/models/project_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ class ProjectProject(models.Model):
sale_currency_id = fields.Many2one(
related="show_sale_order_ids.pricelist_id.currency_id",
)
sales_note = fields.Text(string="Notes")
other_contract_terms = fields.Text(string="Other terms of the contract")

7 changes: 7 additions & 0 deletions show_project_sale/views/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@
}"/>
</group>
</group>
<label for="sales_note"/>
<newline/>
<field name="sales_note"/>
<newline/>
<label for="other_contract_terms"/>
<newline/>
<field name="other_contract_terms"/>
</page>
</xpath>
</field>
Expand Down

0 comments on commit 1a377bd

Please sign in to comment.