<commit_before><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://apps.axelor.com/xml/ns/object-views"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://apps.axelor.com/xml/ns/object-views http://apps.axelor.com/xml/ns/object-views/object-views_0.9.xsd">
    
    <grid name="project-grid" title="Affairs/Projects" model="com.axelor.apps.organisation.db.Project">
        <field name="clientPartner"/>
        <field name="contactPartner"/>
        <field name="affairName"/>
        <field name="isModel"/>
    </grid>
    
    <form cols="6" onNew="action-project-unit" name="project-form" title="Affair/Project" model="com.axelor.apps.organisation.db.Project">
	    <group showTitle="false" colSpan="4">
	        <field name="affairName"/>
	        <field name="responsibleUserInfo"/>
	        <field name="parentProject" onChange="action-project-unit"/>
	        <field name="projectUnit"/>
	        <field name="clientPartner"/>
	        <field name="contactPartner" domain="self.isContact = true"/>
	        <group name="specificSettings" title="Specific settings" colSpan="4" canCollapse="true">
	            <field name="isModel"/>
	            <field name="modelProject" hideIf="isModel" domain="self.isModel = true"/>
	            <field name="defaultTask" hideIf="!isTimeSheetImputable"/>
	            <field name="isReinvoicingExpense"/>
	            <field name="isReinvoicingTime"/>
	            <field name="isTimeSheetImputable"/> 
	        </group>
	    </group>
	    <group title="Actions" showTitle="false" colSpan="2" cols="1">
	        <button name="createSalesOrder" title="Create quote" colSpan="1"/>
	        <button name="generateNewInstanceOfProject" title="Generate new project instance" hideIf="!isModel" colSpan="1"/>
	        <button name="generateDraftInvoice" title="Generate draft invoice" colSpan="1" onClick="save,action-project-validate-generate-invoices,action-project-method-create-invoices"/>
	        <button name="showTask" title="Show tasks" colSpan="1" onClick="action-project-view-task"/>
	    </group>
	    <notebook colSpan="6">
	        <page title="Tasks">
	            <field name="taskList" grid-view="task-project-grid" form-view="task-form" colSpan="6"/>
	        </page>
	        <page title="Financial information" colSpan="4">
	            <group title="Initial Budget" colSpan="6" cols="6">
	                <field name="initialBudgetTurnover"/>
	                <field name="initialBudgetCost"/>
	                <field name="initialBudgetMargin"/>
	            </group>
	            <group title="Realized" colSpan="6" cols="6">
	                <field name="realizedTurnover"/>
	                <field name="realizedBudgetCost"/>
	                <field name="realizedBudgetMargin"/>
	            </group>
	            <group title="Remaining to do" colSpan="6" cols="6">
	                <field name="remainingTurnover"/>
	                <field name="remainingBudgetCost"/>
	                <field name="remainingBudgetMargin"/>
	            </group>
	            <group title="Estimated final" colSpan="6" cols="6">
	                <field name="expectedFinalTurnover"/>
	                <field name="expectedFinalCost"/>
	                <field name="expectedFinalMargin"/>
	            </group>
	            <group colSpan="6" cols="6">
	                <field name="plannedTime"/>
	                <field name="spentTime"/>
	                <field name="remainingTime"/>
	                <field name="budgetedExpenses"/>
	                <field name="incurredExpenses"/>
	                <field name="remainingExpenses"/>
	            </group>
	        </page>
	        <page title="Responsable / Membres" colSpan="4">
	            <field name="memberUserInfoSet" colSpan="6"/>
	        </page>
	    </notebook>
	</form>
    
    
    <action-view name="action-project-view-task" title="Tasks" model="com.axelor.apps.organisation.db.Task">
		<view type="grid" name="task-grid"/>
		<view type="form" name="task-form"/>
		<domain>self.project.id = :_projectId</domain>
		<context name="_projectId" expr="eval: __this__.id"/>
	</action-view>
    
    <action-record name="action-project-unit" model="com.axelor.apps.organisation.db.Project">
		<field name="projectUnit" expr="eval: parentProject?.projectUnit" if="parentProject &amp;&amp; parentProject.projectUnit"/>
		<field name="projectUnit" expr="call:com.axelor.apps.base.service.administration.GeneralService:getUnit()" if="!parentProject || parentProject.projectUnit == null"/>
	</action-record>
	
	<action-method name="action-project-method-create-invoices">
		<call class="com.axelor.apps.accountorganisation.web.ProjectInvoiceController" method="createInvoices"/>
	</action-method>
	
	<action-validate name="action-project-validate-generate-invoices">
   		<alert message="Generating invoice is impossible, Please link the task to a saleOrderLine to do so." if="eval: taskList?.collect(){ it?.salesOrderLine }?.contains(null) == true"/><commit_msg>organisationProject<commit_after><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://apps.axelor.com/xml/ns/object-views"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://apps.axelor.com/xml/ns/object-views http://apps.axelor.com/xml/ns/object-views/object-views_0.9.xsd">
    
    <grid name="project-grid" title="Affairs/Projects" model="com.axelor.apps.organisation.db.Project">
        <field name="clientPartner"/>
        <field name="contactPartner"/>
        <field name="company"/>
        <field name="affairName"/>
        <field name="isModel"/>
    </grid>
    
    <form cols="6" onNew="action-project-unit" name="project-form" title="Affair/Project" model="com.axelor.apps.organisation.db.Project">
	    <group showTitle="false" colSpan="4">
	        <field name="affairName"/>
	        <field name="responsibleUserInfo"/>
	        <field name="parentProject" onChange="action-project-unit"/>
	        <field name="projectUnit"/>
	        <field name="clientPartner"/>
	        <field name="contactPartner" domain="self.isContact = true"/>
	        <field name="company"/>
	        <group name="specificSettings" title="Specific settings" colSpan="4" canCollapse="true">
	            <field name="isModel"/>
	            <field name="modelProject" hideIf="isModel" domain="self.isModel = true"/>
	            <field name="defaultTask" hideIf="!isTimeSheetImputable"/>
	            <field name="isReinvoicingExpense"/>
	            <field name="isReinvoicingTime"/>
	            <field name="isTimeSheetImputable"/> 
	        </group>
	    </group>
	    <group title="Actions" showTitle="false" colSpan="2" cols="1">
	        <button name="createSalesOrder" title="Create quote" colSpan="1"/>
	        <button name="generateNewInstanceOfProject" title="Generate new project instance" hideIf="!isModel" colSpan="1"/>
	        <button name="generateDraftInvoice" title="Generate draft invoice" colSpan="1" onClick="save,action-project-validate-generate-invoice,action-project-method-create-invoice"/>
	        <button name="showTask" title="Show tasks" colSpan="1" onClick="action-project-view-task"/>
	    </group>
	    <notebook colSpan="6">
	        <page title="Tasks">
	            <field name="taskList" grid-view="task-project-grid" form-view="task-form" colSpan="6"/>
	        </page>
	        <page title="Financial information" colSpan="4">
	            <group title="Initial Budget" colSpan="6" cols="6">
	                <field name="initialBudgetTurnover"/>
	                <field name="initialBudgetCost"/>
	                <field name="initialBudgetMargin"/>
	            </group>
	            <group title="Realized" colSpan="6" cols="6">
	                <field name="realizedTurnover"/>
	                <field name="realizedBudgetCost"/>
	                <field name="realizedBudgetMargin"/>
	            </group>
	            <group title="Remaining to do" colSpan="6" cols="6">
	                <field name="remainingTurnover"/>
	                <field name="remainingBudgetCost"/>
	                <field name="remainingBudgetMargin"/>
	            </group>
	            <group title="Estimated final" colSpan="6" cols="6">
	                <field name="expectedFinalTurnover"/>
	                <field name="expectedFinalCost"/>
	                <field name="expectedFinalMargin"/>
	            </group>
	            <group colSpan="6" cols="6">
	                <field name="plannedTime"/>
	                <field name="spentTime"/>
	                <field name="remainingTime"/>
	                <field name="budgetedExpenses"/>
	                <field name="incurredExpenses"/>
	                <field name="remainingExpenses"/>
	            </group>
	        </page>
	        <page title="Responsable / Membres" colSpan="4">
	            <field name="memberUserInfoSet" colSpan="6"/>
	        </page>
	    </notebook>
	</form>
    
    
    <action-view name="action-project-view-task" title="Tasks" model="com.axelor.apps.organisation.db.Task">
		<view type="grid" name="task-grid"/>
		<view type="form" name="task-form"/>
		<domain>self.project.id = :_projectId</domain>
		<context name="_projectId" expr="eval: __this__.id"/>
	</action-view>
    
    <action-record name="action-project-unit" model="com.axelor.apps.organisation.db.Project">
		<field name="projectUnit" expr="eval: parentProject?.projectUnit" if="parentProject &amp;&amp; parentProject.projectUnit"/>
		<field name="projectUnit" expr="call:com.axelor.apps.base.service.administration.GeneralService:getUnit()" if="!parentProject || parentProject.projectUnit == null"/>
	</action-record>
	
	<action-method name="action-project-method-create-invoice">
		<call class="com.axelor.apps.accountorganisation.web.ProjectInvoiceController" method="createInvoice"/>
	</action-method>
	
	<action-validate name="action-project-validate-generate-invoice">
		<alert message="Generating invoice is impossible, the fields clientPartner and contactPartner must be filled." if="clientPartner == null || contactPartner == null"/>
   		<alert message="Generating invoice is impossible, Please link the task to a saleOrderLine to do so." if="eval: taskList?.collect(){ it?.salesOrderLine }?.contains(null) == true"/>
{'fraction_non_alphanumeric': 0.1568684516880093, 'fraction_numerical': 0.006596818005432673, 'mean_word_length': 2.913819286256644, 'pattern_counts': {'":': 0, '<': 178, '<?xml version=': 2, '>': 178, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4024626', 'n_tokens_mistral': 3160, 'n_tokens_neox': 2920, 'n_words': 526}