[IMP] account views

bzr revid: fp@tinyerp.com-20120605081910-o4ehqzhvhs80zdl7
This commit is contained in:
Fabien Pinckaers 2012-06-05 10:19:10 +02:00
parent b84c3a198d
commit d226ca4d35
79 changed files with 471 additions and 50136 deletions

View File

@ -51,22 +51,24 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invoice Line">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field colspan="2" name="name"/>
<label string="Quantity" for="quantity" align="1.0"/>
<group colspan="1" col="2">
<field name="quantity" nolabel="1"/>
<field name="uos_id" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)" nolabel="1"/>
<group col="4">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="name"/>
<label string="Quantity" for="quantity" align="1.0"/>
<div>
<field name="quantity" class="oe_form_inline"/>
<field name="uos_id" class="oe_form_inline"
on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
</div>
<field name="price_unit"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="discount"/>
<field name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
</group>
<field name="price_unit"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="discount"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<separator string="Notes" colspan="4"/>
<field colspan="4" name="note" nolabel="1"/>
<separator colspan="4" string="Taxes"/>
<field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" nolabel="1"/>
<separator string="Notes"/>
<field name="note"/>
</form>
</field>
</record>
@ -93,19 +95,21 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Manual Invoice Taxes">
<field name="name"/>
<field name="sequence"/>
<field name="account_id"/>
<field name="manual"/>
<field name="amount"/>
<field name="base" readonly="0"/>
<separator colspan="4" string="Tax Codes"/>
<field name="base_code_id"/>
<field name="base_amount"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="factor_base" invisible="True"/>
<field name="factor_tax" invisible="True"/>
<group col="4">
<field name="name"/>
<field name="sequence"/>
<field name="account_id"/>
<field name="manual"/>
<field name="amount"/>
<field name="base" readonly="0"/>
<separator colspan="4" string="Tax Codes"/>
<field name="base_code_id"/>
<field name="base_amount"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="factor_base" invisible="True"/>
<field name="factor_tax" invisible="True"/>
</group>
</form>
</field>
</record>
@ -142,39 +146,55 @@
<field name="type">form</field>
<field name="priority">2</field>
<field name="arch" type="xml">
<form layout="manual">
<form>
<header>
<button name="invoice_open" states="draft,proforma2" string="Validate"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' states='open,paid'/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
</header>
<sheet string="Supplier Invoice" layout="auto">
<group col="8" colspan="4" class="oe_form_header">
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="number" readonly="1" placeholder="PO0025"/>
<field name="type" invisible="1"/>
<field name="currency_id" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
<newline/>
<field string="Supplier" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" options='{"quick_create": false}' domain="[('supplier', '=', True)]"/>
<field name="fiscal_position" widget="selection"/>
<newline/>
<field name="date_invoice"/>
<field name="period_id" domain="[('state', '=', 'draft')]" groups="account.group_account_user" widget="selection"/>
<group colspan="2" col="1" groups="account.group_account_user">
<label align="0.0" string="(keep empty to use the current period)"/>
<sheet string="Supplier Invoice">
<h1>
<field name="state" class="oe_form_inline"/>
<field name="number"/>
</h1>
<group>
<group>
<field string="Supplier" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
domain="[('supplier', '=', True)]"/>
<label string="Address"/>
<div>
<p>Put multi-line address function field here</p>
</div>
<field name="fiscal_position" widget="selection"/>
</group>
<group>
<field name="date_invoice"/>
<field name="period_id" domain="[('state', '=', 'draft')]"
groups="account.group_account_user" widget="selection"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"
groups="account.group_account_user"/>
<field domain="[('company_id', '=', company_id), ('type', '=', 'payable')]"
name="account_id" groups="account.group_account_user"/>
<field name="currency_id"/>
<field name="type" invisible="1"/>
</group>
<group>
<label for="reference"/>
<div>
<field name="reference_type"/>
<field name="reference" placeholder="Payment Reference"/>
</div>
<field name="date_due"/>
</group>
</group>
<notebook colspan="4">
<notebook>
<page string="Invoice">
<field domain="[('company_id', '=', company_id), ('type', '=', 'payable')]" name="account_id" groups="account.group_account_user"/>
<field name="reference_type" nolabel="1" size="0"/>
<field name="reference" nolabel="1" placeholder="Payment Reference"/>
<field name="date_due"/>
<field colspan="4" context="{'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False, 'type': type}" name="invoice_line" nolabel="1">
<field context="{'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False, 'type': type}" name="invoice_line">
<tree string="Invoice lines">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)"/>
@ -188,46 +208,50 @@
<field invisible="True" name="uos_id"/>
</tree>
</field>
<group col="1" colspan="2">
<field name="tax_line" nolabel="1">
<tree editable="bottom" string="Taxes">
<field name="name"/>
<field name="account_id" groups="account.group_account_invoice"/>
<field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
<field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
<group>
<group>
<field name="tax_line">
<tree editable="bottom" string="Taxes">
<field name="name"/>
<field name="account_id" groups="account.group_account_invoice"/>
<field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
<field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
<field invisible="True" name="base_amount"/>
<field invisible="True" name="tax_amount"/>
<field name="factor_base" invisible="True"/>
<field name="factor_tax" invisible="True"/>
</tree>
</field>
</group>
<group col="4" colspan="2">
<button colspan="2" name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="terp-stock_format-scientific" help="This action will erase taxes"/>
<field name="amount_untaxed"/>
<label string="" colspan="2"/>
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="residual"/>
<field invisible="True" name="base_amount"/>
<field invisible="True" name="tax_amount"/>
<field name="factor_base" invisible="True"/>
<field name="factor_tax" invisible="True"/>
</tree>
</field>
<button name="button_reset_taxes" states="draft" string="Compute Taxes" type="object" icon="terp-stock_format-scientific" help="This action will erase taxes"/>
</group>
<group class="oe_form_subtotal_footer">
<field name="amount_untaxed"/>
<field name="amount_tax"/>
<field name="amount_total" class="oe_form_subtotal_footer_separator"/>
<field name="residual" style="margin-top: 10px"/>
<field name="reconciled" invisible="1"/>
</group>
</group>
<label for="comment" string="Terms and Conditions"/>
<field name="comment"/>
</page>
<page string="Other Info">
<field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
<field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="payment_term" widget="selection"/>
<field name="name"/>
<newline/>
<field name="origin" placeholder="PO0025"/>
<field name="user_id"/>
<field name="move_id" groups="account.group_account_user"/>
<separator colspan="4" string="Additional Information"/>
<field colspan="4" name="comment" nolabel="1"/>
<group col="4">
<field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
<field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="payment_term" widget="selection"/>
<field name="name"/>
<newline/>
<field name="origin" placeholder="PO0025"/>
<field name="user_id"/>
<field name="move_id" groups="account.group_account_user"/>
</group>
</page>
<page string="Payments">
<field name="payment_ids" colspan="4" nolabel="1" >
<field name="payment_ids">
<tree string="Payments">
<field name="date" string="Payment Date"/>
<field name="move_id"/>
@ -243,9 +267,9 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
<footer>
<field name="message_ids" widget="ThreadView"/>
</footer>
</form>
</field>
</record>
@ -255,10 +279,10 @@
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form layout="manual">
<form>
<header>
<button name="action_invoice_sent" type="object" string="Send by Email" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}"/>
<button name="invoice_print" string="Print Invoice" type="object" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}"/>
<button name="action_invoice_sent" type="object" string="Send by Email" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}"/>
<button name="invoice_print" string="Print Invoice" type="object" states="open" attrs="{'invisible':['|',('sent','=',True), ('state', '=', 'draft')]}"/>
<button name="invoice_open" states="draft,proforma2" string="Validate"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" groups="account.group_proforma_invoices"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='paid'/>
@ -268,68 +292,102 @@
<!--button name="%(account_invoices)d" string="Print Invoice" type="action" states="open,paid,proforma,sale,proforma2"/-->
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
</header>
<sheet string="Invoice" layout="auto">
<group colspan="4" col="8" class="oe_form_header">
<field name="journal_id" groups="base.group_user" on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field name="number"/>
<sheet string="Invoice">
<h1>
<field name="state" class="oe_form_inline"/>
<field name="number"/>
</h1>
<label string"Concerns" for="name" class="oe_form_readonly_hidden"/>
<h2>
<field name="name" placeholder="Project XYZ"/>
</h2>
<field name="type" invisible="1"/>
<field name="currency_id" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
<newline/>
<field string="Customer" name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user" context="{'search_default_customer': 1}" options='{"quick_create": false}' domain="[('customer', '=', True)]"/>
<field name="fiscal_position" widget="selection" options='{"quick_create": false}'/>
<newline/>
<field name="date_invoice"/>
<field name="period_id" domain="[('state', '=', 'draft')]" groups="account.group_account_user" widget="selection"/>
<field name="payment_term" widget="selection"/>
<newline/>
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]" name="account_id" groups="account.group_account_user"/>
<field name="name" placeholder="Project XYZ"/>
<field name="sent"/>
<group>
<group>
<field string="Customer" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
groups="base.group_user" context="{'search_default_customer': 1}"
domain="[('customer', '=', True)]"/>
<label string="Address"/>
<div>
<p>Put multi-line address function field here</p>
</div>
<field name="fiscal_position" widget="selection" options='{"quick_create": false}'/>
<field name="payment_term" widget="selection"/>
</group>
<group>
<field name="date_invoice"/>
<field name="period_id" domain="[('state', '=', 'draft')]"
groups="account.group_account_user" widget="selection"/>
<field name="journal_id" groups="account.group_account_user"
on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]"
name="account_id" groups="account.group_account_user"/>
<label for="currency_id"/>
<div>
<field name="currency_id" class="oe_form_inline"/>
<button name="%(action_account_change_currency)d" type="action"
icon="terp-stock_effects-object-colorize"
attrs="{'invisible':[('state','!=','draft')]}"
groups="account.group_account_user"/>
</div>
</group>
</group>
<field name="sent" invisible="1"/>
<notebook colspan="4">
<page string="Invoice">
<field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}"/>
<group col="1" colspan="2">
<field name="tax_line" nolabel="1">
<tree editable="bottom" string="Taxes">
<field name="name"/>
<field name="account_id" groups="account.group_account_invoice"/>
<field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
<field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
<field invisible="True" name="base_amount"/>
<field invisible="True" name="tax_amount"/>
<field name="factor_base" invisible="True"/>
<field name="factor_tax" invisible="True"/>
</tree>
</field>
</group>
<group col="4" colspan="2">
<group colspan="2" col="1">
<button name="button_reset_taxes" states="draft,proforma2" string="Compute Taxes" type="object" groups="base.group_user" icon="terp-stock_format-scientific" help="This action will erase taxes"/>
<group>
<group>
<field name="tax_line">
<tree editable="bottom" string="Taxes">
<field name="name"/>
<field name="account_id" groups="account.group_account_invoice"/>
<field name="base" on_change="base_change(base,parent.currency_id,parent.company_id,parent.date_invoice)" readonly="1"/>
<field name="amount" on_change="amount_change(amount,parent.currency_id,parent.company_id,parent.date_invoice)"/>
<field invisible="True" name="base_amount"/>
<field invisible="True" name="tax_amount"/>
<field name="factor_base" invisible="True"/>
<field name="factor_tax" invisible="True"/>
</tree>
</field>
<button name="button_reset_taxes" states="draft,proforma2" string="Compute Taxes"
type="object" groups="account.group_account_user" icon="terp-stock_format-scientific"
help="This action will erase taxes"/>
</group>
<group class="oe_form_subtotal_footer">
<field name="amount_untaxed"/>
<field name="amount_tax"/>
<field name="amount_total" class="oe_form_subtotal_footer_separator"/>
<field name="residual" style="margin-top: 10px"/>
<field name="reconciled" invisible="1"/>
</group>
<field name="amount_untaxed"/>
<label string="" colspan="2"/>
<field name="amount_tax"/>
<field name="reconciled"/>
<field name="amount_total"/>
<field name="residual"/>
</group>
</page>
<page string="Other Info">
<field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="date_due"/>
<field name="user_id"/>
<newline/>
<field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"/>
<field name="origin" placeholder="SO0032"/>
<field name="move_id" groups="account.group_account_user"/>
<separator colspan="4" string="Additional Information"/>
<field colspan="4" name="comment" nolabel="1"/>
<group col="4">
<field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="date_due"/>
<field name="user_id"/>
<newline/>
<field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"/>
<field name="origin" placeholder="SO0032"/>
<field name="move_id" groups="account.group_account_user"/>
</group>
<separator string="Additional Information"/>
<field name="comment"/>
</page>
<page string="Payments">
<field name="payment_ids" colspan="4" nolabel="1">
<field name="payment_ids">
<tree string="Payments">
<field name="date"/>
<field name="move_id"/>
@ -345,9 +403,9 @@
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<footer>
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</footer>
</form>
</field>
</record>

View File

@ -80,31 +80,35 @@
<field name="model">account.analytic.account</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form layout="manual">
<sheet string="Analytic account" layout="auto">
<group colspan="4" col="6">
<field name="name" colspan="4"/>
<field name="code"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="company_id" on_change="on_change_company(company_id)" select="2" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>
<field name="type" select="2"/>
<form string="Analytic Account">
<sheet>
<group>
<group>
<field name="name" colspan="4"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="company_id" on_change="on_change_company(company_id)" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>
</group>
<group>
<field name="type"/>
<field name="code"/>
</group>
</group>
<notebook colspan="4">
<notebook>
<page string="Account Data">
<group colspan="2" col="2">
<separator colspan="2" string="Contacts"/>
<field name="partner_id"/>
<field name="user_id"/>
</group>
<group colspan="2" col="2" name="contract">
<separator colspan="2" string="Contract Data"/>
<field name="date_start"/>
<field name="date"/>
<field name="quantity_max"/>
<group>
<group string="Contacts">
<field name="partner_id"/>
<field name="user_id"/>
</group>
<group name="contract" string="Contract Data">
<field name="date_start"/>
<field name="date"/>
<field name="quantity_max"/>
</group>
</group>
</page>
<page string="Description">
<field colspan="4" name="description" nolabel="1"/>
<field name="description"/>
</page>
</notebook>
</sheet>
@ -154,30 +158,37 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Analytic Entry">
<group colspan="4" col="6">
<field name="name"/>
<field name="ref"/>
<field name="account_id"/>
<field name="journal_id"/>
<field name="date"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group colspan="2" col="4">
<separator string="Amount" colspan="4"/>
<field name="amount" colspan="4"/>
<field name="amount_currency" colspan="2"/>
<field name="currency_id" colspan="2" nolabel="1"/>
</group>
<group colspan="2" col="4">
<separator string="Product Information" colspan="4"/>
<field name="product_id" colspan="4"/>
<field name="unit_amount" colspan="2"/>
<field name="product_uom_id" colspan="2" nolabel="1"/>
</group>
<group colspan="2" col="2">
<separator string="General Accounting" colspan="2"/>
<field name="general_account_id"/>
<field name="move_id" readonly="1"/>
<group>
<group>
<field name="name"/>
<field name="account_id"/>
<field name="journal_id"/>
</group>
<group>
<field name="date"/>
<field name="ref"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group string="Amount">
<field name="amount"/>
<label for="amount_currency"/>
<div>
<field name="amount_currency" class="oe_form_inline"/>
<field name="currency_id" class="oe_form_inline"/>
</div>
</group>
<group string="Product Information">
<field name="product_id"/>
<label for="unit_amount"/>
<div>
<field name="unit_amount" class="oe_form_inline"/>
<field name="product_uom_id" class="oe_form_inline"/>
</div>
</group>
<group string="General Accounting">
<field name="general_account_id"/>
<field name="move_id" readonly="1"/>
</group>
</group>
</form>
</field>
@ -266,18 +277,20 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project line">
<field name="name"/>
<field name="account_id"/>
<field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="journal_id"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field invisible="True" name="general_account_id"/>
<field name="amount"/>
<field name="currency_id" />
<field name="amount_currency" />
<field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<group col="4">
<field name="name"/>
<field name="account_id"/>
<field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="journal_id"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field invisible="True" name="general_account_id"/>
<field name="amount"/>
<field name="currency_id" />
<field name="amount_currency" />
<field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
</group>
</form>
</field>
</record>
@ -331,11 +344,13 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Analytic Journal">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="type" select="2"/>
<field name="active" select="2"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<group col="4">
<field name="name"/>
<field name="code"/>
<field name="type"/>
<field name="active"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</form>
</field>
</record>
@ -387,9 +402,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Analytic Entries Stats">
<field name="name" select="1"/>
<field name="account_id" select="1"/>
<field name="journal_id" select="2"/>
<group col="4">
<field name="name"/>
<field name="account_id"/>
<field name="journal_id"/>
</group>
</form>
</field>
</record>

View File

@ -7,23 +7,22 @@
<field name="model">account.analytic.balance</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<group colspan="4" col="6">
<field name="date1"/>
<field name="date2"/>
<newline/>
<field name="empty_acc"/>
</group>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
<form string="Select Period">
<header>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
</header>
<group col="4">
<field name="date1"/>
<field name="date2"/>
<newline/>
<field name="empty_acc"/>
</group>
</form>
</field>
</record>
<record id="action_account_analytic_balance" model="ir.actions.act_window">
<record id="action_account_analytic_balance" model="ir.actions.act_window">
<field name="name">Analytic Balance</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.balance</field>
@ -31,9 +30,9 @@
<field name="view_mode">form</field>
<field name="view_id" ref="account_analytic_balance_view"/>
<field name="target">new</field>
</record>
</record>
<record model="ir.values" id="account_analytic_balance_values">
<record model="ir.values" id="account_analytic_balance_values">
<field name="model_id" ref="analytic.model_account_analytic_account" />
<field name="name">Account Analytic Balance</field>
<field name="key2">client_print_multi</field>

View File

@ -8,16 +8,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Analytic Account Charts">
<separator string="Select the Period for Analysis" colspan="4"/>
<field name="from_date"/>
<newline/>
<field name="to_date"/>
<newline/>
<label string="(Keep empty to open the current situation)" align="0.0" colspan="3"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<header>
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" icon="gtk-ok"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
</header>
<group string="Select the Period for Analysis" col="4">
<field name="from_date"/>
<field name="to_date"/>
<label string="(Keep empty to open the current situation)" colspan="4"/>
</group>
</form>
</field>

View File

@ -2,44 +2,43 @@
<openerp>
<data>
<record id="account_analytic_cost_ledger_journal_view" model="ir.ui.view">
<field name="name">Account Analytic Cost Ledger Journal</field>
<field name="model">account.analytic.cost.ledger.journal.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<record id="account_analytic_cost_ledger_journal_view" model="ir.ui.view">
<field name="name">Account Analytic Cost Ledger Journal</field>
<field name="model">account.analytic.cost.ledger.journal.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select period">
<separator string="Cost Ledger for Period" colspan="4"/>
<field name="date1"/>
<field name="date2"/>
<separator string="and Journals" colspan="4"/>
<field name="journal" colspan="4" nolabel="1"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
<header>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</header>
<group string="Cost Ledger for Period" col="4">
<field name="date1"/>
<field name="date2"/>
<field name="journal" colspan="4"/>
</group>
</form>
</field>
</record>
</field>
</record>
<record id="action_account_analytic_cost_ledger_journal" model="ir.actions.act_window">
<field name="name">Cost Ledger (Only quantities)</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.cost.ledger.journal.report</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_analytic_cost_ledger_journal_view"/>
<field name="target">new</field>
</record>
<record id="action_account_analytic_cost_ledger_journal" model="ir.actions.act_window">
<field name="name">Cost Ledger (Only quantities)</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.cost.ledger.journal.report</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_analytic_cost_ledger_journal_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="account_analytic_cost_ledger_journal_values">
<field name="model_id" ref="analytic.model_account_analytic_account" />
<field name="name">Account Analytic Cost Ledger Journal</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost_ledger_journal'))" />
<field name="key">action</field>
<field name="model">account.analytic.account</field>
</record>
<record model="ir.values" id="account_analytic_cost_ledger_journal_values">
<field name="model_id" ref="analytic.model_account_analytic_account" />
<field name="name">Account Analytic Cost Ledger Journal</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost_ledger_journal'))" />
<field name="key">action</field>
<field name="model">account.analytic.account</field>
</record>
</data>
</openerp>

View File

@ -7,21 +7,20 @@
<field name="model">account.analytic.cost.ledger</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<group colspan="4" col="6">
<field name="date1"/>
<field name="date2"/>
</group>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
<form string="Select Period">
<header>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
</header>
<group col="4">
<field name="date1"/>
<field name="date2"/>
</group>
</form>
</field>
</record>
<record id="action_account_analytic_cost" model="ir.actions.act_window">
<record id="action_account_analytic_cost" model="ir.actions.act_window">
<field name="name">Cost Ledger</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.cost.ledger</field>
@ -29,9 +28,9 @@
<field name="view_mode">form</field>
<field name="view_id" ref="account_analytic_cost_view"/>
<field name="target">new</field>
</record>
</record>
<record model="ir.values" id="account_analytic_cost_values">
<record model="ir.values" id="account_analytic_cost_values">
<field name="model_id" ref="analytic.model_account_analytic_account" />
<field name="name">Account Analytic Cost</field>
<field name="key2">client_print_multi</field>

View File

@ -8,15 +8,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<group colspan="4" col="6">
<header>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
</header>
<group col="4">
<field name="date1"/>
<field name="date2"/>
</group>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
</field>
</record>

View File

@ -2,43 +2,42 @@
<openerp>
<data>
<record id="account_analytic_journal_view" model="ir.ui.view">
<field name="name">Account Analytic Journal</field>
<field name="model">account.analytic.journal.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<group colspan="4" col="6">
<field name="date1"/>
<field name="date2"/>
</group>
<separator colspan="4"/>
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
</field>
</record>
<record id="account_analytic_journal_view" model="ir.ui.view">
<field name="name">Account Analytic Journal</field>
<field name="model">account.analytic.journal.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<header>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
</header>
<group col="4">
<field name="date1"/>
<field name="date2"/>
</group>
</form>
</field>
</record>
<record id="action_account_analytic_journal" model="ir.actions.act_window">
<field name="name">Analytic Journal</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.journal.report</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_analytic_journal_view"/>
<field name="target">new</field>
</record>
<record id="action_account_analytic_journal" model="ir.actions.act_window">
<field name="name">Analytic Journal</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.journal.report</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_analytic_journal_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="account_analytic_journal_values">
<field name="model_id" ref="account.model_account_analytic_journal" />
<field name="name">Account Analytic Journal</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_journal'))" />
<field name="key">action</field>
<field name="model">account.analytic.journal</field>
</record>
<record model="ir.values" id="account_analytic_journal_values">
<field name="model_id" ref="account.model_account_analytic_journal" />
<field name="name">Account Analytic Journal</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_journal'))" />
<field name="key">action</field>
<field name="model">account.analytic.journal</field>
</record>
</data>
</openerp>

View File

@ -2,23 +2,21 @@
<openerp>
<data>
<record id="view_project_account_analytic_line_form" model="ir.ui.view">
<record id="view_project_account_analytic_line_form" model="ir.ui.view">
<field name="name">project.account.analytic.line.form</field>
<field name="model">project.account.analytic.line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="View Account Analytic Lines">
<group colspan="4" >
<field name="from_date"/>
<newline/>
<field name="to_date" />
<header>
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
</header>
<group col="4">
<field name="from_date"/>
<field name="to_date" />
</group>
<label string ="(Keep empty to open the current situation)" />
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
</group>
<label string ="(Keep empty to open the current situation)" />
</form>
</field>
</record>
@ -33,4 +31,4 @@
</record>
</data>
</openerp>
</openerp>

View File

@ -15,109 +15,105 @@
<field name="model">account.config.settings</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Configure Accounting" layout="manual">
<form string="Configure Accounting">
<header>
<button string="Apply" type="object" name="execute"/>
<button string="Cancel" special="cancel"/>
</header>
<sheet layout="auto">
<group col="4">
<field name="has_default_company" invisible="1" />
<field name="has_chart_of_accounts" invisible="1"/>
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"
attrs="{'invisible': [('has_default_company', '=', True)]}"/>
<field name="expects_chart_of_accounts"/>
</group>
<group string="No Chart of Accounts exists for this Company" colspan="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
<label string="Please select a chart template to install a chart of accounts." colspan="4"/>
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
<button string="Install More Chart Templates" icon="gtk-go-forward"
name="%(open_account_charts_modules)d" type="action"/>
<newline/>
<field name ="code_digits" groups="account.group_account_user"/>
<field name ="seq_journal"/>
<newline/>
<field name ="complete_tax_set" invisible="1"/>
<field name="sale_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<field name="purchase_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
<field name ="sale_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
<field name ="purchase_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}"/>
</group>
<group string="Select a Chart of Accounts to Install" col="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
<button string="Install More Chart Templates" icon="gtk-go-forward"
name="%(open_account_charts_modules)d" type="action"/>
<newline/>
<field name="code_digits" groups="account.group_account_user"/>
<field name="seq_journal"/>
<newline/>
<field name="complete_tax_set" invisible="1"/>
<field name="sale_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<field name="purchase_tax" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',False)]}"
domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
<field name="sale_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}" on_change="onchange_tax_rate(sale_tax_rate)"/>
<field name="purchase_tax_rate" attrs="{'invisible': ['|', ('chart_template_id','=',False), ('complete_tax_set','=',True)]}"/>
</group>
<field name="has_fiscal_year" invisible="1"/>
<group string="No Fiscal Year exists for this Company" colspan="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
<field name="date_start" on_change="onchange_start_date(date_start)"/>
<field name="date_stop"/>
<field name="period" colspan="4"/>
</group>
<field name="has_fiscal_year" invisible="1"/>
<group string="No Fiscal Year Defined for this Company" col="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_fiscal_year','=',True)]}">
<field name="date_start" on_change="onchange_start_date(date_start)"/>
<field name="date_stop"/>
<field name="period" colspan="4"/>
</group>
<group colspan="4">
<separator string="Accounting Configuration" colspan="4"/>
<field name ="complete_tax_set" invisible="1"/>
<newline/>
<group colspan="2" col="2">
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="module_account_accountant"/>
<field name="module_account_asset"/>
</group>
<group colspan="2" col="2">
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="currency_id" widget="selection"/>
<field name="module_account_budget"/>
<field name="decimal_precision"/>
</group>
<field name="complete_tax_set" invisible="1"/>
<group string="Accounting Configuration">
<group>
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="module_account_accountant"/>
<field name="module_account_asset"/>
</group>
<group colspan="2" col="2">
<separator string="Customer Invoices" colspan="2"/>
<field name="sale_journal_id" invisible="1"/>
<group>
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="currency_id"/>
<field name="module_account_budget"/>
<field name="decimal_precision"/>
</group>
</group>
<field name="sale_journal_id" invisible="1"/>
<field name="sale_refund_journal_id" invisible="1"/>
<field name="purchase_journal_id" invisible="1"/>
<field name="purchase_refund_journal_id" invisible="1"/>
<group>
<group string="Customer Invoices">
<label string="Invoice Sequence" for="sale_sequence_prefix"/>
<group colspan="1" col="2">
<field name="sale_sequence_prefix" nolabel="1"/>
<field name="sale_sequence_next" nolabel="1" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
</group>
<field name="sale_refund_journal_id" invisible="1"/>
<div>
<field name="sale_sequence_prefix" class="oe_form_inline"/>
<field name="sale_sequence_next" class="oe_form_inline" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
</div>
<label string="Credit Note Sequence" for="sale_refund_sequence_prefix"/>
<group colspan="1" col="2">
<field name="sale_refund_sequence_prefix" nolabel="1"/>
<field name="sale_refund_sequence_next" nolabel="1" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
</group>
<div>
<field name="sale_refund_sequence_prefix" class="oe_form_inline"/>
<field name="sale_refund_sequence_next" class="oe_form_inline" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
</div>
<field name="module_account_invoice_layout"/>
<field name="module_account_voucher"/>
<field name="module_account_followup"/>
<field name="group_proforma_invoices"/>
</group>
<group colspan="2" col="2">
<separator string="Supplier Invoices" colspan="2"/>
<field name="purchase_journal_id" invisible="1"/>
<group string="Supplier Invoices">
<label string="Supplier Invoice Sequence" for="purchase_sequence_prefix"/>
<group colspan="1" col="2">
<field name="purchase_sequence_prefix" nolabel="1"/>
<field name="purchase_sequence_next" nolabel="1" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
</group>
<field name="purchase_refund_journal_id" invisible="1"/>
<div>
<field name="purchase_sequence_prefix" class="oe_form_inline"/>
<field name="purchase_sequence_next" class="oe_form_inline" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
</div>
<label string="Supplier Credit Note Sequence" for="purchase_refund_sequence_prefix"/>
<group colspan="1" col="2">
<field name="purchase_refund_sequence_prefix" nolabel="1"/>
<field name="purchase_refund_sequence_next" nolabel="1" attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
</group>
<div>
<field name="purchase_refund_sequence_prefix" class="oe_form_inline"/>
<field name="purchase_refund_sequence_next" class="oe_form_inline"
attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
</div>
<field name="module_account_payment"/>
</group>
<group colspan="2" col="2">
<separator string="Electronic Payments" colspan="2"/>
<group string="Electronic Payments">
<field name="paypal_account"/>
</group>
<group colspan="2" col="2">
<separator string="Bank &amp; Cash" colspan="2"/>
<group string="Bank &amp; Cash">
<label string="Configure Bank Accounts :"/>
<button name="%(action_bank_tree)d" string="Configure Bank Accounts" icon="gtk-go-forward" type="action"/>
<field name="company_footer"/>
<field name="module_account_check_writing"/>
</group>
<group name="analytic_accounting" colspan="4" invisible="1">
<separator string="Analytic Accounting" colspan="4"/>
</group>
</sheet>
<group name="analytic_accounting" invisible="1" string="Analytic Accounting"/>
</group>
</form>
</field>
</record>

View File

@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import project_scrum
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,76 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Methodology: SCRUM',
'version': '1.0',
'category': 'Project Management',
'description': """
This module implements all concepts defined by the scrum project management methodology for IT companies.
=========================================================================================================
* Project with sprints, product owner, scrum master
* Sprints with reviews, daily meetings, feedbacks
* Product backlog
* Sprint backlog
It adds some concepts to the project management module:
* Mid-term, long-term road-map
* Customers/functional requests VS technical ones
It also creates a new reporting:
* Burn-down chart
The scrum projects and tasks inherit from the real projects and
tasks, so you can continue working on normal tasks that will also
include tasks from scrum projects.
More information on the methodology:
* http://controlchaos.com
""",
'author': 'OpenERP SA',
'images': ['images/product_backlogs.jpeg', 'images/project_sprints.jpeg', 'images/scrum_dashboard.jpeg', 'images/scrum_meetings.jpeg'],
'depends': ['project', 'process', 'mail'],
'init_xml': [],
'update_xml': [
'security/ir.model.access.csv',
'project_scrum_report.xml',
'wizard/project_scrum_backlog_create_task_view.xml',
'wizard/project_scrum_backlog_merger_view.xml',
'wizard/project_scrum_postpone_view.xml',
# "wizard/project_scrum_email_view.xml",
'project_scrum_view.xml',
'wizard/project_scrum_backlog_sprint_view.xml',
'process/project_scrum_process.xml',
"board_project_scrum_view.xml",
],
'demo_xml': ['project_scrum_demo.xml'],
'test': ['test/backlog_process.yml',
'test/sprint_process.yml',
'test/cancel_backlog.yml',
'test/project_scrum_demo.yml',
],
'installable': True,
'auto_install': False,
'certificate' : '00736750152003010781',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,134 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_scrum_sprint_dashboard_tree" model="ir.ui.view">
<field name="name">project.scrum.sprint.dashboard.tree</field>
<field name="model">project.scrum.sprint</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Sprints">
<field name="name"/>
<field name="project_id"/>
<field name="scrum_master_id"/>
<field name="product_owner_id" invisible="1"/>
<field name="date_start"/>
<field name="progress" widget="progressbar"/>
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
<field name="expected_hours" sum="Expected hours" widget="float_time"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_task_progress_graph" model="ir.ui.view">
<field name="name">project.task.graph</field>
<field name="model">project.task</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Task Progress" type="bar">
<field name="sprint_id"/>
<field name="effective_hours" operator="+"/>
<field name="planned_hours" operator="+"/>
</graph>
</field>
</record>
<record id="action_view_task_progress_graph" model="ir.actions.act_window">
<field name="name">Task Progress</field>
<field name="res_model">project.task</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_task_progress_graph"/>
</record>
<record id="view_backlog_progress_graph" model="ir.ui.view">
<field name="name">project.scrum.sprint.graph</field>
<field name="model">project.scrum.product.backlog</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Backlog Progress" type="bar">
<field name="sprint_id"/>
<field name="effective_hours" operator="+"/>
<field name="expected_hours" operator="+"/>
</graph>
</field>
</record>
<record id="action_view_backlog_progress_graph" model="ir.actions.act_window">
<field name="name">Backlog Progress</field>
<field name="res_model">project.scrum.product.backlog</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
</record>
<record id="action_sprint_all_dashboard_tree" model="ir.actions.act_window">
<field name="name">Sprints</field>
<field name="res_model">project.scrum.sprint</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_scrum_sprint_dashboard_tree"/>
</record>
<record id="board_project_scrum_form" model="ir.ui.view">
<field name="name">board.project.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="My Board" layout="manual">
<board style="2-1">
<column>
<action name="%(action_sprint_all_dashboard_tree)d" string="Sprints"/>
</column>
<column>
<action name="%(action_view_task_progress_graph)d" string="Task Progress"/>
<action name="%(action_view_backlog_progress_graph)d" string="Backlog Progress"/>
</column>
</board>
</form>
</field>
</record>
<record id="open_board_project_scrum" model="ir.actions.act_window">
<field name="name">Scrum Dashboard</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_project_scrum_form"/>
</record>
<menuitem
id="menu_deshboard_scurm"
name="Scrum Dashboard" parent="project.menu_project_dashboard"
icon="terp-graph"
action="open_board_project_scrum"/>
<!-- For Project Dashboard -->
<record id="view_scrum_sprint_project_dashboard_tree" model="ir.ui.view">
<field name="name">project.scrum.sprint.project.dashboard.tree</field>
<field name="model">project.scrum.sprint</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Scrum Sprint">
<field name="name"/>
<field name="date_start"/>
<field name="progress" widget="progressbar"/>
<field name="effective_hours" widget="float_time"/>
<field name="expected_hours" widget="float_time"/>
</tree>
</field>
</record>
<record id="action_view_my_scrum_sprint_tree" model="ir.actions.act_window">
<field name="name">My Sprint</field>
<field name="res_model">project.scrum.sprint</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">['|',('product_owner_id','=',uid),('scrum_master_id','=',uid)]</field>
<field name="view_id" ref="view_scrum_sprint_project_dashboard_tree"/>
</record>
<record id="board_my_scrum_sprint_form" model="ir.ui.view">
<field name="name">board.my.scrum.sprint.form.inherit</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.board_project_form"/>
<field name="arch" type="xml">
<xpath expr="/form/board/column/action[@string='My Delegated Tasks']" position="after">
<action name="%(action_view_my_scrum_sprint_tree)d" string="My Sprint"/>
</xpath>
</field>
</record>
</data>
</openerp>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process Node
-->
<record id="process_node_productbacklog0" model="process.node">
<field name="menu_id" ref="menu_action_product_backlog_form"/>
<field name="model_id" ref="model_project_scrum_product_backlog"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Product backlog&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Create task from backlogs&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="project.process_process_tasksprocess0"/>
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<!--
Process Transition
-->
<record id="process_transition_backlogtask0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Backlog Task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;From backlog create task.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="project.process_node_drafttask0"/>
<field model="process.node" name="source_node_id" ref="process_node_productbacklog0"/>
</record>
</data>
</openerp>

View File

@ -1,322 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import re
import time
import tools
from datetime import datetime
from dateutil.relativedelta import relativedelta
class project_scrum_project(osv.osv):
_inherit = 'project.project'
_columns = {
'product_owner_id': fields.many2one('res.users', 'Product Owner', help="The person who is responsible for the product"),
'sprint_size': fields.integer('Sprint Days', help="Number of days allocated for sprint"),
'scrum': fields.integer('Is a Scrum Project'),
}
_defaults = {
'product_owner_id': lambda self, cr, uid, context={}: uid,
'sprint_size': 15,
'scrum': 1
}
project_scrum_project()
class project_scrum_sprint(osv.osv):
_name = 'project.scrum.sprint'
_description = 'Project Scrum Sprint'
_order = 'date_start desc'
_inherit = ['mail.thread']
def _compute(self, cr, uid, ids, fields, arg, context=None):
res = {}.fromkeys(ids, 0.0)
progress = {}
if not ids:
return res
if context is None:
context = {}
for sprint in self.browse(cr, uid, ids, context=context):
tot = 0.0
prog = 0.0
effective = 0.0
progress = 0.0
for bl in sprint.backlog_ids:
tot += bl.expected_hours
effective += bl.effective_hours
prog += bl.expected_hours * bl.progress / 100.0
if tot>0:
progress = round(prog/tot*100)
res[sprint.id] = {
'progress' : progress,
'expected_hours' : tot,
'effective_hours': effective,
}
return res
def button_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
self.cancel_send_note(cr, uid, ids, context=None)
return True
def button_draft(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'draft'}, context=context)
self.draft_send_note(cr, uid, ids, context=None)
return True
def button_open(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'open'}, context=context)
self.open_send_note(cr, uid, ids, context=None)
return True
def button_close(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'done'}, context=context)
self.close_send_note(cr, uid, ids, context=None)
return True
def button_pending(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'pending'}, context=context)
self.pending_send_note(cr, uid, ids, context=None)
return True
_columns = {
'name' : fields.char('Sprint Name', required=True, size=64),
'date_start': fields.date('Starting Date', required=True),
'date_stop': fields.date('Ending Date', required=True),
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)], help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
'product_owner_id': fields.many2one('res.users', 'Product Owner', required=True,help="The person who is responsible for the product"),
'scrum_master_id': fields.many2one('res.users', 'Scrum Master', required=True,help="The person who is maintains the processes for the product"),
'meeting_ids': fields.one2many('project.scrum.meeting', 'sprint_id', 'Daily Scrum'),
'review': fields.text('Sprint Review'),
'retrospective': fields.text('Sprint Retrospective'),
'backlog_ids': fields.one2many('project.scrum.product.backlog', 'sprint_id', 'Sprint Backlog'),
'progress': fields.function(_compute, group_operator="avg", type='float', multi="progress", string='Progress (0-100)', help="Computed as: Time Spent / Total Time."),
'effective_hours': fields.function(_compute, multi="effective_hours", string='Effective hours', help="Computed using the sum of the task work done."),
'expected_hours': fields.function(_compute, multi="expected_hours", string='Planned Hours', help='Estimated time to do the task.'),
'state': fields.selection([('draft','Draft'),('cancel','Cancelled'),('open','Open'),('pending','Pending'),('done','Done')], 'Status', required=True),
}
_defaults = {
'state': 'draft',
'date_start' : lambda *a: time.strftime('%Y-%m-%d'),
}
def copy(self, cr, uid, id, default=None, context=None):
"""Overrides orm copy method
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of cases IDs
@param context: A standard dictionary for contextual values
"""
if default is None:
default = {}
default.update({'backlog_ids': [], 'meeting_ids': []})
return super(project_scrum_sprint, self).copy(cr, uid, id, default=default, context=context)
def onchange_project_id(self, cr, uid, ids, project_id=False):
v = {}
if project_id:
proj = self.pool.get('project.project').browse(cr, uid, [project_id])[0]
v['product_owner_id']= proj.product_owner_id and proj.product_owner_id.id or False
v['scrum_master_id']= proj.user_id and proj.user_id.id or False
v['date_stop'] = (datetime.now() + relativedelta(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
return {'value':v}
# ----------------------------------------
# OpenChatter methods and notifications
# ----------------------------------------
def create(self, cr, uid, vals, context=None):
obj_id = super(project_scrum_sprint, self).create(cr, uid, vals, context)
self.create_send_note(cr, uid, [obj_id], context=context)
return obj_id
def draft_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Sprint has been set to <b>draft</b>."), context=context)
def create_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Sprint has been <b>created</b>."), context=context)
def open_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Sprint has been <b>opened</b>."), context=context)
def pending_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Sprint has been set to <b>pending</b>."), context=context)
def cancel_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Sprint has been <b>cancelled</b>."), context=context)
def close_send_note(self, cr, uid, ids, context=None):
self.message_append_note(cr, uid, ids, body=_("Sprint has been <b>closed</b>."), context=context)
project_scrum_sprint()
class project_scrum_product_backlog(osv.osv):
_name = 'project.scrum.product.backlog'
_description = 'Product Backlog'
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args=[]
if name:
match = re.match('^S\(([0-9]+)\)$', name)
if match:
ids = self.search(cr, uid, [('sprint_id','=', int(match.group(1)))], limit=limit, context=context)
return self.name_get(cr, uid, ids, context=context)
return super(project_scrum_product_backlog, self).name_search(cr, uid, name, args, operator,context, limit=limit)
def _compute(self, cr, uid, ids, fields, arg, context=None):
res = {}.fromkeys(ids, 0.0)
progress = {}
if not ids:
return res
for backlog in self.browse(cr, uid, ids, context=context):
tot = 0.0
prog = 0.0
effective = 0.0
task_hours = 0.0
progress = 0.0
for task in backlog.tasks_id:
task_hours += task.total_hours
effective += task.effective_hours
tot += task.planned_hours
prog += task.planned_hours * task.progress / 100.0
if tot>0:
progress = round(prog/tot*100)
res[backlog.id] = {
'progress' : progress,
'effective_hours': effective,
'task_hours' : task_hours
}
return res
def button_cancel(self, cr, uid, ids, context=None):
obj_project_task = self.pool.get('project.task')
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
for backlog in self.browse(cr, uid, ids, context=context):
obj_project_task.write(cr, uid, [i.id for i in backlog.tasks_id], {'state': 'cancelled'})
return True
def button_draft(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'draft'}, context=context)
return True
def button_open(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'open'}, context=context)
return True
def button_close(self, cr, uid, ids, context=None):
obj_project_task = self.pool.get('project.task')
self.write(cr, uid, ids, {'state':'done'}, context=context)
for backlog in self.browse(cr, uid, ids, context=context):
obj_project_task.write(cr, uid, [i.id for i in backlog.tasks_id], {'state': 'done'})
return True
def button_pending(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'pending'}, context=context)
return True
def button_postpone(self, cr, uid, ids, context=None):
for product in self.browse(cr, uid, ids, context=context):
tasks_id = []
for task in product.tasks_id:
if task.state != 'done':
tasks_id.append(task.id)
clone_id = self.copy(cr, uid, product.id, {
'name': 'PARTIAL:'+ product.name ,
'sprint_id':False,
'tasks_id':[(6, 0, tasks_id)],
})
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
return True
_columns = {
'name' : fields.char('Feature', size=64, required=True),
'note' : fields.text('Note'),
'active' : fields.boolean('Active', help="If Active field is set to true, it will allow you to hide the product backlog without removing it."),
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)]),
'user_id': fields.many2one('res.users', 'Author'),
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint'),
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
'state': fields.selection([('draft','Draft'),('cancel','Cancelled'),('open','Open'),('pending','Pending'),('done','Done')], 'Status', required=True),
'progress': fields.function(_compute, multi="progress", group_operator="avg", type='float', string='Progress', help="Computed as: Time Spent / Total Time."),
'effective_hours': fields.function(_compute, multi="effective_hours", string='Spent Hours', help="Computed using the sum of the time spent on every related tasks", store=True),
'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),
'create_date': fields.datetime("Creation Date", readonly=True),
'task_hours': fields.function(_compute, multi="task_hours", string='Task Hours', help='Estimated time of the total hours of the tasks')
}
_defaults = {
'state': 'draft',
'active': 1,
'user_id': lambda self, cr, uid, context: uid,
}
_order = "sequence"
project_scrum_product_backlog()
class project_scrum_task(osv.osv):
_name = 'project.task'
_inherit = 'project.task'
def _get_task(self, cr, uid, ids, context=None):
result = {}
for line in self.pool.get('project.scrum.product.backlog').browse(cr, uid, ids, context=context):
for task in line.tasks_id:
result[task.id] = True
return result.keys()
_columns = {
'product_backlog_id': fields.many2one('project.scrum.product.backlog', 'Product Backlog',help="Related product backlog that contains this task. Used in SCRUM methodology"),
'sprint_id': fields.related('product_backlog_id','sprint_id', type='many2one', relation='project.scrum.sprint', string='Sprint',
store={
'project.task': (lambda self, cr, uid, ids, c={}: ids, ['product_backlog_id'], 10),
'project.scrum.product.backlog': (_get_task, ['sprint_id'], 10)
}),
}
project_scrum_task()
class project_scrum_meeting(osv.osv):
_name = 'project.scrum.meeting'
_description = 'Scrum Meeting'
_order = 'date desc'
_columns = {
'name' : fields.char('Meeting Name', size=64),
'date': fields.date('Meeting Date', required=True),
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint', required=True),
'project_id': fields.many2one('project.project', 'Project'),
'question_yesterday': fields.text('Tasks since yesterday'),
'question_today': fields.text('Tasks for today'),
'question_blocks': fields.text('Blocks encountered'),
'question_backlog': fields.text('Backlog Accurate'),
'task_ids': fields.many2many('project.task', 'meeting_task_rel', 'metting_id', 'task_id', 'Tasks'),
'user_id': fields.related('sprint_id', 'scrum_master_id', type='many2one', relation='res.users', string='Scrum Master', readonly=True),
}
#
# TODO: Find the right sprint thanks to users and date
#
_defaults = {
'date' : lambda *a: time.strftime('%Y-%m-%d'),
}
project_scrum_meeting()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,394 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Resource: project_scrum.sprint -->
<record id="scrum_sprint_0" model="project.scrum.sprint">
<field name="name">Sprint 1</field>
<field name="date_start" eval="time.strftime('%Y-06-01')"></field>
<field name="date_stop" eval="time.strftime('%Y-06-15')"></field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','admin')]"/>
</record>
<record id="scrum_sprint_1" model="project.scrum.sprint">
<field name="name">Sprint 2</field>
<field name="date_start" eval="time.strftime('%Y-06-16')"></field>
<field name="date_stop" eval="time.strftime('%Y-06-30')"></field>
<field name="expected_hours">100.0</field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','demo')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_2" model="project.scrum.sprint">
<field name="name">Sprint 3</field>
<field name="date_start" eval="time.strftime('%Y-07-01')"></field>
<field name="date_stop" eval="time.strftime('%Y-07-15')"></field>
<field name="expected_hours">89.0</field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','demo')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_3" model="project.scrum.sprint">
<field name="name">Sprint 4</field>
<field name="date_start" eval="time.strftime('%Y-07-16')"></field>
<field name="date_stop" eval="time.strftime('%Y-07-31')"></field>
<field name="expected_hours">125.0</field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','admin')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_4" model="project.scrum.sprint">
<field name="name">Sprint 5</field>
<field name="date_start" eval="time.strftime('%Y-08-01')"></field>
<field name="date_stop" eval="time.strftime('%Y-08-15')"></field>
<field name="expected_hours">178.0</field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','demo')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_5" model="project.scrum.sprint">
<field name="name">Sprint 6</field>
<field name="date_start" eval="time.strftime('%Y-08-16')"></field>
<field name="date_stop" eval="time.strftime('%Y-08-31')"></field>
<field name="project_id" ref="project.project_project_9"/>
<field name="expected_hours">200.0</field>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','admin')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_6" model="project.scrum.sprint">
<field name="name">Sprint 7</field>
<field name="date_start" eval="time.strftime('%Y-09-01')"></field>
<field name="date_stop" eval="time.strftime('%Y-09-15')"></field>
<field name="expected_hours">175.0</field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','demo')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_7" model="project.scrum.sprint">
<field name="name">Sprint 8</field>
<field name="date_start" eval="time.strftime('%Y-09-16')"></field>
<field name="date_stop" eval="time.strftime('%Y-09-30')"></field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field name="expected_hours">122.0</field>
<field model="res.users" name="scrum_master_id" search="[('login','=','admin')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_8" model="project.scrum.sprint">
<field name="name">Sprint 9</field>
<field name="date_start" eval="time.strftime('%Y-10-01')"></field>
<field name="date_stop" eval="time.strftime('%Y-10-15')"></field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','demo')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_9" model="project.scrum.sprint">
<field name="name">Sprint 10</field>
<field name="date_start" eval="time.strftime('%Y-10-16')"></field>
<field name="date_stop" eval="time.strftime('%Y-10-31')"></field>
<field name="expected_hours">78.0</field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','admin')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_10" model="project.scrum.sprint">
<field name="name">Sprint 11</field>
<field name="date_start" eval="time.strftime('%Y-11-01')"></field>
<field name="date_stop" eval="time.strftime('%Y-11-15')"></field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','demo')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_11" model="project.scrum.sprint">
<field name="name">Sprint 12</field>
<field name="date_start" eval="time.strftime('%Y-11-16')"></field>
<field name="date_stop" eval="time.strftime('%Y-11-30')"></field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','admin')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_12" model="project.scrum.sprint">
<field name="name">Sprint 13</field>
<field name="date_start" eval="time.strftime('%Y-12-1')"></field>
<field name="date_stop" eval="time.strftime('%Y-12-15')"></field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','admin')]"/>
<field name="state">open</field>
</record>
<record id="scrum_sprint_13" model="project.scrum.sprint">
<field name="name">Sprint 14</field>
<field name="date_start" eval="time.strftime('%Y-12-16')"></field>
<field name="date_stop" eval="time.strftime('%Y-12-31')"></field>
<field name="project_id" ref="project.project_project_9"/>
<field name="product_owner_id" ref="base.user_root"/>
<field model="res.users" name="scrum_master_id" search="[('login','=','admin')]"/>
<field name="state">open</field>
</record>
<!-- Resource: project.product.backlog -->
<record id="scrum_product_backlog_0" model="project.scrum.product.backlog">
<field name="name">Automatic migration system</field>
<field name="expected_hours">6.0</field>
<field name="note">This new system will enable you to migrate automatically from an old version of OpenERP to a new one. This system will migrate not only the OpenERP system but also the customers particularities. This happens without any kind of script or programming. It has been possible to carry out such a system thanks to the descriptive approach of OpenERP components. </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_1" model="project.scrum.product.backlog">
<field name="name">New accounting module</field>
<field name="expected_hours">111.0</field>
<field name="note">The accounting module of OpenERP (financial accounting and management accounting) is being reshaped. New functionalities will be added: intangible assets, a new way of presenting ledgers and bookings, new stock valuation calculation, and lots of predefined reports. </field>
<field name="sprint_id" ref="scrum_sprint_1"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_2" model="project.scrum.product.backlog">
<field name="name">Automated Plugin System to install/uninstall modules</field>
<field name="expected_hours">4.0</field>
<field name="note">We have to develop a plug-in system which will enable to install/remove modules. The basic version of OpenERP will include only the required minimum, and you will select the modules thanks to the plug-in manager. This allows you to limit your system to your real needs: quality management, localisations, project and service management, marketing campaigns, and so on... </field>
<field name="sprint_id" ref="scrum_sprint_2"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_3" model="project.scrum.product.backlog">
<field name="name">Review all terms</field>
<field name="expected_hours">8.0</field>
<field name="sprint_id" ref="scrum_sprint_3"/>
<field name="state">done</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_4" model="project.scrum.product.backlog">
<field name="name">Bugfixes</field>
<field name="expected_hours">6.0</field>
<field name="sprint_id" ref="scrum_sprint_4"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_5" model="project.scrum.product.backlog">
<field name="name">Test for 3.2.0 Publishing</field>
<field name="expected_hours">5.0</field>
<field name="note">Test OpenERP to release stable 3.2.0 version. (may be 3.2.0-pre1 eval="time.strftime('%Y-%m-05 12:01:01')"?)</field>
<field name="sprint_id" ref="scrum_sprint_5"/>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_6" model="project.scrum.product.backlog">
<field name="name">Reshape the complete menu</field>
<field name="expected_hours">4.0</field>
<field name="note">Restructure the OpenERP menu to be more like other ERPs.</field>
<field name="sprint_id" ref="scrum_sprint_6"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_7" model="project.scrum.product.backlog">
<field name="name">Editable Trees</field>
<field name="expected_hours">12.0</field>
<field name="note">Editable trees in list and one2many_list widgets.</field>
<field name="sprint_id" ref="scrum_sprint_7"/>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_8" model="project.scrum.product.backlog">
<field name="name">Reshape the complete menu</field>
<field name="expected_hours">3.0</field>
<field name="note">Restructure the OpenERP menu to be more like other ERPs.</field>
<field name="sprint_id" ref="scrum_sprint_8"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_9" model="project.scrum.product.backlog">
<field name="name">Analysis Product phase</field>
<field name="expected_hours">10.0</field>
<field name="note">Restructure the OpenERP menu to be more like other ERPs.</field>
<field name="sprint_id" ref="scrum_sprint_9"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_10" model="project.scrum.product.backlog">
<field name="name">Rearrange the Menu</field>
<field name="expected_hours">9.0</field>
<field name="note">Restructure the OpenERP menu to be more like other ERPs.</field>
<field name="sprint_id" ref="scrum_sprint_10"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_11" model="project.scrum.product.backlog">
<field name="name">Complete change in list view</field>
<field name="expected_hours">8.0</field>
<field name="note">Restructure the OpenERP menu to be more like other ERPs.</field>
<field name="sprint_id" ref="scrum_sprint_11"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<record id="scrum_product_backlog_12" model="project.scrum.product.backlog">
<field name="name">Reshape the complete menu</field>
<field name="expected_hours">2.0</field>
<field name="note">Set rule for Tax according to 2010-2011 Rules</field>
<field name="sprint_id" ref="scrum_sprint_12"/>
<field name="state">open</field>
<field name="project_id" ref="project.project_project_9"/>
</record>
<!-- Resource: project.task -->
<record id="scrum_task_3" model="project.task">
<field name="planned_hours">4.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Review all English Terms</field>
<field eval="time.strftime('%Y-%m-%d')" name="date_end"/>
<field name="product_backlog_id" ref="scrum_product_backlog_3"/>
</record>
<record id="scrum_task_4" model="project.task">
<field name="planned_hours">4.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Review all french terms</field>
<field eval="time.strftime('%Y-%m-%d')" name="date_end"/>
<field name="product_backlog_id" ref="scrum_product_backlog_3"/>
</record>
<record id="scrum_task_5" model="project.task">
<field name="planned_hours">24.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Analytic Accounting features</field>
<field eval="time.strftime('%Y-%m-%d')" name="date_end"/>
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
</record>
<record id="scrum_task_6" model="project.task">
<field name="planned_hours">6.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Test and improve automatic migration system</field>
<field name="product_backlog_id" ref="scrum_product_backlog_0"/>
</record>
<record id="scrum_task_7" model="project.task">
<field name="planned_hours">24.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">General accounting features</field>
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
</record>
<record id="scrum_task_8" model="project.task">
<field name="planned_hours">24.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Accounting Budgets</field>
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
</record>
<record id="scrum_task_9" model="project.task">
<field name="planned_hours">24.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="description">Cash book, general ledger, accounts list, aged trial balance</field>
<field name="name">Accounting Report General</field>
<field eval="[(6,0,[ref('scrum_task_8')])]" name="child_ids"/>
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
</record>
<record id="scrum_task_10" model="project.task">
<field name="planned_hours">7.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Accounting Report Budget</field>
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
</record>
<record id="scrum_task_11" model="project.task">
<field name="planned_hours">8.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Accounting Report Analytic</field>
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
</record>
<record id="scrum_task_12" model="project.task">
<field name="planned_hours">4.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Bugfix - memory leak</field>
<field eval="time.strftime('%Y-%m-%d')" name="date_end"/>
<field name="product_backlog_id" ref="scrum_product_backlog_4"/>
</record>
<record id="scrum_task_13" model="project.task">
<field name="planned_hours">2.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Bugfix - Translations</field>
<field eval="[(6,0,[ref('scrum_task_12')])]" name="child_ids"/>
<field name="product_backlog_id" ref="scrum_product_backlog_4"/>
</record>
<record id="scrum_task_14" model="project.task">
<field name="planned_hours">4.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Finish the automated plugin system</field>
<field name="product_backlog_id" ref="scrum_product_backlog_2"/>
</record>
<record id="scrum_task_15" model="project.task">
<field name="planned_hours">4.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Reshape the complete menu structure</field>
<field name="product_backlog_id" ref="scrum_product_backlog_6"/>
</record>
<record id="scrum_task_16" model="project.task">
<field name="planned_hours">5.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="name">Test 3.2.0 before releasing</field>
<field name="product_backlog_id" ref="scrum_product_backlog_5"/>
</record>
<record id="scrum_task_17" model="project.task">
<field name="planned_hours">12.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project.project_project_9"/>
<field name="description">default values, onchange, required, add on top or bottom and shortcuts (Ctrl S, Ctrl X, ...)</field>
<field name="name">Editable trees</field>
<field name="product_backlog_id" ref="scrum_product_backlog_7"/>
</record>
<!-- Resource: project_scrum.meeting -->
<record id="scrum_meeting_0" model="project.scrum.meeting">
<field name="question_yesterday">
Admin: Worked on the Automatic migration system
Demo: Worked on the Test 3.2.0 before releasing
</field>
<field name="question_today">
Admin:Work on Restructure the OpenERP menu to be more like other ERPs.
Demo: Work on Editable trees</field>
<field name="question_blocks">
Demo :Bugfix - memory leak
</field>
<field name="sprint_id" ref="scrum_sprint_8"/>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
</record>
</data>
</openerp>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<report auto="False" menu="False" id="report_scrum_sprint_burndown_chart" model="project.scrum.sprint" name="scrum.sprint.burndown" string="Burndown Chart"/>
</data>
</openerp>

View File

@ -1,611 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="menu_scrum"
name="Scrum"
parent="base.menu_main_pm" sequence="7"/>
<!-- Scrum Project -->
<record id="view_project_project_form" model="ir.ui.view">
<field name="name">project.project.form</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<group name="misc" position="after">
<group col="2" colspan="2">
<separator string="Scrum Data" colspan="4"/>
<field name="product_owner_id" required="1" select="1"/>
<field name="sprint_size"/>
</group>
</group>
</field>
</record>
<!--
Product backlog
-->
<record id="view_scrum_product_backlog_tree" model="ir.ui.view">
<field name="name">project.scrum.product.backlog.tree</field>
<field name="model">project.scrum.product.backlog</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancel','done');blue:state == 'pending'" string="Product Backlog">
<field name="sequence"/>
<field name="name"/>
<field name="project_id"/>
<field name="sprint_id"/>
<field name="user_id"/>
<field name="progress" widget="progressbar"/>
<field name="expected_hours" sum="Planned hours" widget="float_time" string="Total Planned Hours"/>
<field name="effective_hours" sum="Spent hours" widget="float_time" string="Total Spent Hours"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_scrum_product_backlog_form" model="ir.ui.view">
<field name="name">project.scrum.product.backlog.form</field>
<field name="model">project.scrum.product.backlog</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form layout="manual">
<header>
<button type="object" string="Open" name="button_open" states="draft,pending"/>
<button type="object" string="Close" name="button_close" states="open,pending"/>
<button type="object" string="Pending" name="button_pending" states="open"/>
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done"/>
<button type="object" string="Cancel" name="button_cancel" states="draft,open,pending"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open"/>
</header>
<sheet string="Product backlog" layout="auto">
<group colspan="4" col="8" class="oe_form_header">
<field name="name" select="1"/>
<field name="project_id" select="1"/>
<field domain="[('project_id','=',project_id), ('state','in', ['draft','open'])]" name="sprint_id" select="1"/>
<button name="%(action_postpone_wizard)d" string="Postpone" type="action"
help="Postpone backlog" colspan="2"
icon="gtk-convert" attrs="{'invisible':[('state','in',['done', 'cancel'])]}"/>
<field name="user_id" select="1"/>
<field name="sequence"/>
<field name="create_date"/>
<field name="progress" widget="progressbar"/>
</group>
<notebook colspan="4">
<page string="Information">
<group colspan="6" col="8">
<field name="expected_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="task_hours" widget="float_time"/>
</group>
<separator string="Feature Description" colspan="4"/>
<field colspan="4" name="note" nolabel="1"/>
</page>
<page string="Tasks">
<field colspan="4" name="tasks_id" nolabel="1" widget="one2many_list" context="{'default_project_id':project_id, 'default_sprint_id':sprint_id, 'default_product_backlog_id':active_id}">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0;red:bool(date_deadline) and (date_deadline&lt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<field name="sequence" invisible="0"/>
<field name="name"/>
<field name="user_id"/>
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
<field name="planned_hours" widget="float_time" sum="Planned Hours"/>
<field name="total_hours" widget="float_time"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" invisible="context.get('set_visible',False)"/>
<field name="date_deadline" invisible="context.get('set_visible',False)"/>
<field name="type_id" invisible="context.get('set_visible',False)"/>
<field name="date_start" invisible="1"/>
<field name="date_end" invisible="1"/>
<button name="stage_next" invisible="context.get('set_visible',False)"
states="draft,open,pending"
string="Change Stage"
type="object"
icon="gtk-go-forward"
help="Change Type"/>
<field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
<field name="state" invisible="context.get('set_visible',False)"/>
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-stop" help="For cancelling the task"/>
<button name="do_open" states="pending,draft,done,cancel" string="Start Task" type="object" icon="terp-camera_test" help="For changing to open state" invisible="context.get('set_visible',False)"/>
<button name="%(project.action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-sort-descending" help="For changing to delegate state"/>
<button name="do_close" states="draft,pending,open" string="Done" type="object" icon="terp-dialog-close" help="For changing to done state"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_scrum_product_backlog_search">
<field name="name">project.scrum.product.backlog.search</field>
<field name="model">project.scrum.product.backlog</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Product Backlogs">
<group>
<filter
icon="terp-check"
string="Draft"
name="current"
domain="['|','&amp;',('sprint_id.date_start','&lt;=',time.strftime('%%Y-%%m-%%d')), ('sprint_id.date_stop','&gt;=',time.strftime('%%Y-%%m-%%d')), ('state','=','draft')]"
help="Draft Backlogs"/>
<filter icon="terp-camera_test" string="In Progress" domain="[('state','=','open')]" help="In Progress Backlogs"/>
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Backlogs"/>
<separator orientation="vertical"/>
<filter string="Edit" icon="gtk-execute" domain="[]" context="{'set_editable':'1'}"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="project_id"/>
<field name="sprint_id" domain="[('state','in',('draft','open'))]">
<filter icon="terp-check"
string="Sprints"
domain="[('sprint_id.state','=','open')]"
help="Backlogs Assigned To Current Sprints"/>
<filter icon="terp-personal-"
string="Sprints"
domain="[('sprint_id','=',False)]"
help="Backlogs Not Assigned To Sprints."/>
</field>
<field name="user_id">
<filter icon="terp-personal"
string="My Backlogs"
name="my_user_id"
domain="[('user_id','=',uid)]"
help="My Backlogs"/>
</field>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Author" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Project" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}"/>
<filter string="Sprint" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'sprint_id'}"/>
<separator orientation="vertical"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record id="action_product_backlog_form" model="ir.actions.act_window">
<field name="name">Product Backlogs</field>
<field name="res_model">project.scrum.product.backlog</field>
<field name="view_type">form</field>
<field name="context">{'search_default_user_id':uid,'search_default_project_id':project_id}</field>
<field name="search_view_id" ref="view_scrum_product_backlog_search"/>
<field name="help">The scrum agile methodology is used in software development projects. The Product Backlog is the list of features to be implemented. A product backlog can be planified in a development sprint and may be split into several tasks. The product backlog is managed by the product owner of the project.</field>
</record>
<menuitem
action="action_product_backlog_form"
id="menu_action_product_backlog_form"
sequence="10"
parent="menu_scrum"/>
<!--
Scrum Sprint
-->
<record id="view_scrum_sprint_calendar" model="ir.ui.view">
<field name="name">project.scrum.sprint.calendar</field>
<field name="model">project.scrum.sprint</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar string="Scrum Sprint" date_start="date_start">
<field name="name"/>
<field name="project_id"/>
</calendar>
</field>
</record>
<record id="view_scrum_sprint_tree" model="ir.ui.view">
<field name="name">project.scrum.sprint.tree</field>
<field name="model">project.scrum.sprint</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft','pending');grey:state in ('cancel','done')" string="Scrum Sprint">
<field name="name"/>
<field name="project_id"/>
<field name="scrum_master_id"/>
<field name="product_owner_id" invisible="1"/>
<field name="date_start"/>
<field name="progress" widget="progressbar"/>
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
<field name="expected_hours" sum="Planned hours" widget="float_time"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="view_scrum_sprint_form" model="ir.ui.view">
<field name="name">project.scrum.sprint.form</field>
<field name="model">project.scrum.sprint</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form layout="manual">
<header>
<button type="object" string="Open" name="button_open" states="draft,pending"/>
<button type="object" string="Close" name="button_close" states="open,pending"/>
<button type="object" string="Pending" name="button_pending" states="open"/>
<button name="%(project_scrum.report_scrum_sprint_burndown_chart)d"
string="Burndown Chart" type="action"/>
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done"/>
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,open"/>
</header>
<sheet string="Scrum Sprint" layout="auto">
<group colspan="4" col="6" class="oe_form_header">
<field name="name" select="1"/>
<field name="project_id" on_change="onchange_project_id(project_id)"/>
</group>
<notebook colspan="4">
<page string="Sprint Info">
<group colspan="2" col="2">
<separator string="Responsible" colspan="2"/>
<field name="product_owner_id"/>
<field name="scrum_master_id"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2"/>
<field name="date_start" select="1"/>
<field name="date_stop"/>
</group>
<group colspan="2" col="2">
<separator string="Planning" colspan="2"/>
<field name="expected_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="progress" widget="progressbar"/>
</group>
</page>
<page string="Daily Meetings">
<field colspan="4" name="meeting_ids" nolabel="1" widget="one2many_list">
<form string="Scrum Sprint">
<group colspan="4" col="6">
<field name="date"/>
<field name="user_id"/>
<button name="%(mail.action_email_compose_message_wizard)d"
string="Send Email" type="action" icon="terp-mail-message-new"/>
</group>
<notebook colspan="4">
<page string="Scrum Meeting">
<separator colspan="4" string="What did you do since the last meeting?"/>
<field colspan="4" name="question_yesterday" nolabel="1"/>
<separator colspan="4" string="What do you plan to do till the next meeting?"/>
<field colspan="4" name="question_today" nolabel="1"/>
<separator colspan="4" string="Are there anything blocking you?"/>
<field colspan="4" name="question_blocks" nolabel="1"/>
<separator colspan="4" string=""/>
</page>
<page string="Optional Info">
<separator colspan="4" string="Are your sprint backlog estimate accurate ?"/>
<field colspan="4" name="question_backlog" nolabel="1"/>
</page>
<page string="Links">
<separator colspan="4" string="Tasks"/>
<field colspan="4" name="task_ids" nolabel="1" domain="[('sprint_id','=',sprint_id)]"/>
</page>
</notebook>
</form>
<tree string="Scrum Meeting">
<field name="date"/>
<field name="user_id"/>
</tree>
</field>
</page>
<page string="Review">
<field colspan="4" name="review" nolabel="1"/>
</page>
<page string="Retrospective">
<field colspan="4" name="retrospective" nolabel="1"/>
</page>
</notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_scrum_sprint_search">
<field name="name">project.scrum.sprint.search</field>
<field name="model">project.scrum.sprint</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Sprints">
<group>
<filter icon="terp-check" string="New" name="current" domain="[('state','=','draft')]" help="New Sprints"/>
<filter icon="terp-camera_test" string="In Progress" domain="[('state','=','open')]" help="In Progress Sprints"/>
<filter icon="gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Sprints"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="project_id"/>
<field name="scrum_master_id"/>
<field name="date_start"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Product owner" icon="terp-personal" domain="[]" context="{'group_by':'product_owner_id'}"/>
<filter string="Scrum Master" icon="terp-personal" domain="[]" context="{'group_by':'scrum_master_id'}"/>
<separator orientation="vertical"/>
<filter string="Project" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}"/>
<separator orientation="vertical"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Sprint Month"/>
</group>
</search>
</field>
</record>
<record id="action_sprint_all_tree" model="ir.actions.act_window">
<field name="name">Sprints</field>
<field name="res_model">project.scrum.sprint</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_id" ref="view_scrum_sprint_tree"/>
<field name="context">{}</field>
<field name="search_view_id" ref="view_scrum_sprint_search"/>
<field name="help">The scrum agile methodology is used in software development projects. In this methodology, a sprint is a short period of time (e.g. one month) during which the team implements a list of product backlogs. The sprint review is organized when the team presents its work to the customer and product owner.</field>
</record>
<menuitem
sequence="20"
action="action_sprint_all_tree" id="menu_action_sprint_all_tree" parent="menu_scrum"/>
<!--
Daily Meeting
-->
<record id="view_scrum_meeting_calendar" model="ir.ui.view">
<field name="name">project.scrum.meeting.calendar</field>
<field name="model">project.scrum.meeting</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar string="Scrum Meeting" date_start="date" color="user_id">
<field name="sprint_id"/>
</calendar>
</field>
</record>
<record id="view_scrum_meeting_tree" model="ir.ui.view">
<field name="name">project.scrum.meeting.tree</field>
<field name="model">project.scrum.meeting</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Scrum Meeting">
<field name="date"/>
<field name="sprint_id"/>
<field name="user_id"/>
</tree>
</field>
</record>
<record id="view_scrum_meeting_form" model="ir.ui.view">
<field name="name">Scrum Meeting</field>
<field name="model">project.scrum.meeting</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Scrum Meeting">
<group colspan="4" col="8">
<field name="date"/>
<field name="sprint_id" domain="[('state', '=', 'open')]"/>
<field name="user_id"/>
<button name="%(mail.action_email_compose_message_wizard)d"
string="Send Email" type="action" icon="terp-mail-message-new"
/>
</group>
<notebook colspan="4">
<page string="Scrum Meeting">
<separator colspan="4" string="What did you do since the last meeting?"/>
<field colspan="4" name="question_yesterday" nolabel="1"/>
<separator colspan="4" string="What do you plan to do till the next meeting?"/>
<field colspan="4" name="question_today" nolabel="1"/>
<separator colspan="4" string="Are there anything blocking you?"/>
<field colspan="4" name="question_blocks" nolabel="1"/>
<separator colspan="4" string=""/>
</page>
<page string="Optional Info">
<separator colspan="4" string="Are your sprint backlog estimate accurate?"/>
<field colspan="4" name="question_backlog" nolabel="1"/>
</page>
<page string="Links">
<separator colspan="4" string="Tasks"/>
<field colspan="4" name="task_ids" nolabel="1" domain="[('sprint_id','=',sprint_id)]"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_scrum_meeting_search" model="ir.ui.view">
<field name="name">project_scrum.meeting.search</field>
<field name="model">project.scrum.meeting</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Scrum Sprint">
<group>
<filter name="scrum_daily" icon="terp-go-today" string="Daily" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]" help="Daily Meetings"/>
<separator orientation="vertical"/>
<field name="sprint_id">
<filter icon="terp-check" domain="[('sprint_id.state','in',('draft','open'))]" help="Current Sprints"/>
</field>
<field name="date"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Sprint" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'sprint_id'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Meeting Date"/>
</group>
</search>
</field>
</record>
<record id="action_meeting_form" model="ir.actions.act_window">
<field name="name">Scrum Meetings</field>
<field name="res_model">project.scrum.meeting</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="context">{'search_default_project_id':project_id}</field>
<field name="search_view_id" ref="view_scrum_meeting_search"/>
<field name="help">The scrum agile methodology is used in software development projects. In this methodology, a daily meeting is organized by the scrum master with his team in order to detect the difficulties the team faced/will face.</field>
</record>
<menuitem sequence="30"
action="action_meeting_form" id="menu_action_meeting_form" parent="menu_scrum"/>
<!--
Clicks on a sprint:
-->
<record id="action_sprint_task_open" model="ir.actions.act_window">
<field name="res_model">project.task</field>
<field name="name">View sprint Tasks</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('product_backlog_id', '=', active_id)]</field>
<field name="context">{'default_product_backlog_id': active_id}</field>
</record>
<record id="ir_scrum_sprint_open_task" model="ir.values">
<field eval=" 'tree_but_open'" name="key2"/>
<field eval="'project.scrum.sprint'" name="model"/>
<field name="name">View sprint tasks</field>
<field eval="'ir.actions.act_window,'+str(action_sprint_task_open)" name="value"/>
</record>
<record id="action_sprint_backlog_open" model="ir.actions.act_window">
<field name="res_model">project.scrum.product.backlog</field>
<field name="name">View sprint backlog</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('sprint_id', '=', active_id)]</field>
<field name="context">{'default_sprint_id': active_id}</field>
</record>
<record id="ir_scrum_sprint_open_sprint" model="ir.values">
<field eval=" 'tree_but_open'" name="key2"/>
<field eval="'project.scrum.sprint'" name="model"/>
<field name="name">View sprint backlog</field>
<field eval="'ir.actions.act_window,'+str(action_sprint_backlog_open)" name="value"/>
</record>
<!--
Clicks on a project
-->
<record id="dblc_proj" model="ir.actions.act_window">
<field name="res_model">project.scrum.product.backlog</field>
<field name="name">View project's backlog</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('project_id', 'child_of', [active_id])]</field>
</record>
<record id="ir_scrum_project_backlog" model="ir.values">
<field eval=" 'tree_but_open'" name="key2"/>
<field eval="'project.scrum.project'" name="model"/>
<field name="name">View project's backlog</field>
<field eval="'ir.actions.act_window,'+str(dblc_proj)" name="value"/>
</record>
<record id="dblc_proj2" model="ir.actions.act_window">
<field name="res_model">project.task</field>
<field name="name">View project's tasks</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('project_id', 'child_of', [active_id])]</field>
</record>
<record id="ir_scrum_project_task" model="ir.values">
<field eval=" 'tree_but_open'" name="key2"/>
<field eval="'project.scrum.project'" name="model"/>
<field name="name">View project's tasks</field>
<field eval="'ir.actions.act_window,'+str(dblc_proj2)" name="value"/>
</record>
<!--
Tasks
-->
<record id="view_task_tree2" model="ir.ui.view">
<field name="name">project.task.tree.scrum</field>
<field name="model">project.task</field>
<field name="type">tree</field>
<field name="inherit_id" ref="project.view_task_tree2"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="sprint_id" domain="[('state', 'in', ['draft', 'open'])]" invisible="context.get('sprint_invisible',True)"/>
<field name="product_backlog_id" invisible="1"/>
</field>
</field>
</record>
<record id="view_task_form2" model="ir.ui.view">
<field name="name">project.task.scrum.form</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="progress" position="after">
<field domain="[('project_id','=',project_id),]" name="product_backlog_id" select="1"/>
</field>
</field>
</record>
<record id="view_task_form3" model="ir.ui.view">
<field name="name">project.task.scrum.form2</field>
<field name="model">project.task</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="arch" type="xml">
<field name="sequence" position="after">
<field name="sprint_id" domain="[('state', 'in', ['draft', 'open'])]" readonly="1"/>
</field>
</field>
</record>
<record id="view_task_search_form2" model="ir.ui.view">
<field name="name">project.task.scrum.search</field>
<field name="model">project.task</field>
<field name="type">search</field>
<field name="inherit_id" ref="project.view_task_search_form"/>
<field name="arch" type="xml">
<field name="user_id" position="before">
<field name="sprint_id" context="{'sprint_invisible':False}">
<filter icon="terp-check" context="{'sprint_invisible':False}" domain="[('sprint_id.state','in',('draft','open'))]" help="Current Sprints"/>
<filter icon="gtk-find" context="{'sprint_invisible':False}" domain="[]" help="View Sprints"/>
</field>
</field>
</field>
</record>
<record id="view_task_search_form3" model="ir.ui.view">
<field name="name">project.task.scrum.search</field>
<field name="model">project.task</field>
<field name="type">search</field>
<field name="inherit_id" ref="project.view_task_search_form"/>
<field name="arch" type="xml">
<xpath expr="/search/group[@string='Group By...']/filter[@string='Project']" position="after">
<separator orientation="vertical"/>
<filter string="Sprint" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'sprint_id'}"/>
<filter string="Backlog" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'product_backlog_id'}"/>
</xpath>
</field>
</record>
<act_window
context="{'search_default_sprint_id': [active_id], 'default_sprint_id': active_id}"
id="act_scrum_sprint_2_product_backlog"
name="Backlogs"
res_model="project.scrum.product.backlog"
src_model="project.scrum.sprint"
view_mode="tree,form"
view_type="form"/>
<act_window
context="{'search_default_sprint_id': active_id, 'search_default_user_id': uid, 'search_default_current':1, 'default_sprint_id': active_id}"
id="act_scrum_sprint_2_project_task"
name="Tasks"
res_model="project.task"
src_model="project.scrum.sprint"
view_mode="tree,form"
view_type="form"/>
</data>
</openerp>

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import sprint_burndown
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,83 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from datetime import datetime
from dateutil.relativedelta import relativedelta
import time
import pooler
from report.render import render
class external_pdf(render):
def __init__(self, pdf):
render.__init__(self)
self.pdf = pdf
self.output_type='pdf'
def _render(self):
return self.pdf
def compute_burndown(cr, uid, tasks_ids, date_start, date_stop):
latest = False
pool = pooler.get_pool(cr.dbname)
project_task_pool = pool.get('project.task')
task_work_pool = pool.get('project.task.work')
if len(tasks_ids):
tasks_ids = project_task_pool.search(cr, uid, [('id','in',tasks_ids)], order='create_date')
tasks = project_task_pool.read(cr, uid, tasks_ids, ['create_date','planned_hours','state'])
tasks_ids = project_task_pool.search(cr, uid, [('id','in',tasks_ids),('state', 'in', ['open','progress'])], order='create_date')
work_ids = task_work_pool.search(cr, uid, [('task_id','in',tasks_ids)], order='date')
close_tasks = task_work_pool.read(cr, uid, work_ids, ['date','hours','state'])
tasks_ids = project_task_pool.search(cr, uid, [('id','in',tasks_ids),('state', 'in', ['cancelled','done'])], order='date_end')
close_tasks += project_task_pool.read(cr, uid, tasks_ids, ['date_end','planned_hours'])
else:
tasks = []
close_tasks = []
current_date = date_start
total = 0
done = 0
result = []
while datetime.strptime(current_date, '%Y-%m-%d') <= datetime.strptime(date_stop, '%Y-%m-%d'):
while len(tasks) and tasks[0]['create_date'] and datetime.strptime(tasks[0]['create_date'][:10], '%Y-%m-%d')<=datetime.strptime(current_date, '%Y-%m-%d'):
latest = tasks.pop(0)
total += float(latest.get('planned_hours',0.0))
i = 0
while i < len(close_tasks):
if close_tasks[i]:
date_end = close_tasks[i].get('date',False)
hours = float(close_tasks[i].get('hours',0.0))
if not date_end:
date_end = close_tasks[i].get('date_end',False)
hours = float(close_tasks[i].get('planned_hours',0.0))
if datetime.strptime(date_end[:10], '%Y-%m-%d')<=datetime.strptime(current_date, '%Y-%m-%d'):
t = close_tasks.pop(i)
done += hours
i+=1
result.append( (int(time.mktime(time.strptime(current_date,'%Y-%m-%d'))), total-done) )
current_date = (datetime.strptime(current_date, '%Y-%m-%d') + relativedelta(days=1)).strftime('%Y-%m-%d')
if not len(tasks) and not len(close_tasks):
break
result.append( (int(time.mktime(time.strptime(date_stop,'%Y-%m-%d'))), 0) )
return result
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,91 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import StringIO
import pooler
from report.render import render
from report.interface import report_int
from datetime import datetime
import time
from pychart import *
import pychart.legend
import _burndown
class report_tasks(report_int):
def create(self, cr, uid, ids, datas, context=None):
if context is None:
context = {}
io = StringIO.StringIO()
canv = canvas.init(fname=io, format='pdf')
canv.set_author("OpenERP")
canv.set_title("Burndown Chart")
pool = pooler.get_pool(cr.dbname)
sprint_pool = pool.get('project.scrum.sprint')
task_pool = pool.get('project.task')
# For add the report header on the top of the report.
tb = text_box.T(loc=(320, 500), text="/hL/15/bBurndown Chart", line_style=None)
tb.draw()
int_to_date = lambda x: '/a60{}' + datetime(time.localtime(x).tm_year, time.localtime(x).tm_mon, time.localtime(x).tm_mday).strftime('%d %m %Y')
for sprint in sprint_pool.browse(cr, uid, ids, context=context):
task_ids = task_pool.search(cr, uid, [('sprint_id','=',sprint.id)], context=context)
datas = _burndown.compute_burndown(cr, uid, task_ids, sprint.date_start, sprint.date_stop)
max_hour = reduce(lambda x,y: max(y[1],x), datas, 0) or None
def _interval_get(*args):
result = []
for i in range(20):
d = time.localtime(datas[0][0] + (((datas[-1][0]-datas[0][0])/20)*(i+1)))
res = time.mktime(d)
if (not result) or result[-1]<>res:
result.append(res)
return result
guideline__data=[(datas[0][0],max_hour), (datas[-1][0],0)]
ar = area.T(x_grid_style=line_style.gray50_dash1,
x_axis=axis.X(label="Date", format=int_to_date),
y_axis=axis.Y(label="Burndown Chart - Planned Hours"),
x_grid_interval=_interval_get,
x_range = (datas[0][0],datas[-1][0]),
y_range = (0,max_hour),
legend = None,
size = (680,450))
ar.add_plot(line_plot.T(data=guideline__data, line_style=line_style.red))
ar.add_plot(line_plot.T(data=datas, line_style=line_style.green))
entr1 = pychart.legend.Entry(label="guideline", line_style=line_style.red)
entr2 = pychart.legend.Entry(label="burndownchart",line_style=line_style.green)
legend = pychart.legend.T(nr_rows=2, inter_row_sep=5)
legend.draw(ar,[entr1,entr2],canv)
ar.draw(canv)
canv.close()
self.obj = _burndown.external_pdf(io.getvalue())
self.obj.render()
return (self.obj.pdf, 'pdf')
report_tasks('report.scrum.sprint.burndown')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,91 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import StringIO
from report.render import render
from report.interface import report_int
from datetime import datetime
import time
from pychart import *
import pychart.legend
import _burndown
class report_tasks(report_int):
def create(self, cr, uid, ids, datas, context=None):
if context is None:
context = {}
io = StringIO.StringIO()
if 'date_start' not in datas:
cr.execute('select min(date_start) from project_task where id IN %s',(tuple(ids),))
dt = cr.fetchone()[0]
if dt:
datas['date_start'] = dt[:10]
else:
datas['date_start'] = time.strftime('%Y-%m-%d')
if 'date_stop' not in datas:
cr.execute('select max(date_start),max(date_end) from project_task where id IN %s',(tuple(ids),))
res = cr.fetchone()
datas['date_stop'] = (res[0] and res[0][:10]) or time.strftime('%Y-%m-%d')
if res[1] and datas['date_stop']<res[1]:
datas['date_stop'] = res[1][:10]
datas = _burndown.compute_burndown(cr, uid, ids, datas['date_start'], datas['date_stop'])
canv = canvas.init(fname=io, format='pdf')
canv.set_author("OpenERP")
max_hour = reduce(lambda x,y: max(y[1],x), datas, 0)
int_to_date = lambda x: '/a60{}' + datetime(time.localtime(x).tm_year, time.localtime(x).tm_mon, time.localtime(x).tm_mday).strftime('%d %m %Y')
def _interval_get(*args):
result = set()
for i in range(20):
d = time.localtime(datas[0][0] + (((datas[-1][0]-datas[0][0])/20)*(i+1)))
res = time.mktime(d)
result.add(res)
return list(result)
if datas[-1][0] == datas[0][0]:
x_range = (datas[0][0],datas[-1][0]+1)
else:
x_range = (datas[0][0],datas[-1][0])
ar = area.T(x_grid_style=line_style.gray50_dash1,
x_axis=axis.X(label="Date", format=int_to_date),
y_axis=axis.Y(label="Burndown Chart - Planned Hours"),
x_grid_interval=_interval_get,
x_range = x_range,
y_range = (0,max_hour),
legend = None,
size = (680,450))
ar.add_plot(line_plot.T(data=datas))
ar.draw(canv)
canv.close()
self.obj = _burndown.external_pdf(io.getvalue())
self.obj.render()
return (self.obj.pdf,'pdf')
report_tasks('report.project.tasks.burndown')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,9 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_scrum_sprint,project_scrum.sprint,model_project_scrum_sprint,project.group_project_user,1,1,1,0
access_scrum_product_backlog,project_scrum.product.backlog,model_project_scrum_product_backlog,project.group_project_user,1,1,1,0
access_scrum_meeting,project_scrum.meeting,model_project_scrum_meeting,project.group_project_user,1,1,1,0
access_scrum_meeting_manager,project_scrum.meeting.manager,model_project_scrum_meeting,project.group_project_manager,1,1,1,1
access_scrum_sprint_manager,project_scrum.sprint.manager,model_project_scrum_sprint,project.group_project_manager,1,1,1,1
access_scrum_product_backlog_manager,project_scrum.product.backlog manager,model_project_scrum_product_backlog,project.group_project_manager,1,1,1,1
access_product_uom_project_manager,product.uom project manager,product.model_product_uom,project.group_project_manager,1,1,1,1
access_product_uom_project_user,product.uom project user,product.model_product_uom,project.group_project_user,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_scrum_sprint project_scrum.sprint model_project_scrum_sprint project.group_project_user 1 1 1 0
3 access_scrum_product_backlog project_scrum.product.backlog model_project_scrum_product_backlog project.group_project_user 1 1 1 0
4 access_scrum_meeting project_scrum.meeting model_project_scrum_meeting project.group_project_user 1 1 1 0
5 access_scrum_meeting_manager project_scrum.meeting.manager model_project_scrum_meeting project.group_project_manager 1 1 1 1
6 access_scrum_sprint_manager project_scrum.sprint.manager model_project_scrum_sprint project.group_project_manager 1 1 1 1
7 access_scrum_product_backlog_manager project_scrum.product.backlog manager model_project_scrum_product_backlog project.group_project_manager 1 1 1 1
8 access_product_uom_project_manager product.uom project manager product.model_product_uom project.group_project_manager 1 1 1 1
9 access_product_uom_project_user product.uom project user product.model_product_uom project.group_project_user 1 0 0 0

View File

@ -1,39 +0,0 @@
-
In Order to Test process of Project Agile Methology,
-
I put Backlog in pending state because of specification is not ready.
-
!python {model: project.scrum.product.backlog}: |
self.button_pending(cr, uid, [ref("scrum_product_backlog_0")])
-
I check state of Backlog after put in pending.
-
!assert {model: project.scrum.product.backlog, id: scrum_product_backlog_0, severity: error, string: Backlog should be in pending state}:
- state == "pending"
-
Now Specification is ready so I Open backlog "Automatic migration system".
-
!python {model: project.scrum.product.backlog}: |
self.button_open(cr, uid, [ref("scrum_product_backlog_0")])
-
I check state of Backlog after opened.
-
!assert {model: project.scrum.product.backlog, id: scrum_product_backlog_0, severity: error, string: Backlog should be in open state}:
- state == "open"
-
I close Backlog after review.
-
!python {model: project.scrum.product.backlog}: |
self.button_close(cr, uid, [ref("scrum_product_backlog_0")])
-
I check state of Backlog after closed.
-
!assert {model: project.scrum.product.backlog, id: scrum_product_backlog_0, severity: error, string: Backlog should be in close state}:
- state == "done"
-
I merge two Backlogs in to one Backlog.
-
!python {model: project.scrum.backlog.merge}: |
self.check_backlogs(cr, uid, [ref("scrum_product_backlog_1"),ref("scrum_product_backlog_2")], {"active_ids": [ref("scrum_product_backlog_1"),ref("scrum_product_backlog_2")],
"active_id": ref("scrum_product_backlog_1")
})

View File

@ -1,50 +0,0 @@
-
I cancel Backlog "Automatic migration system" from draft state.
-
!python {model: project.scrum.product.backlog}: |
self.button_cancel(cr, uid, [ref("scrum_product_backlog_0")])
-
I check state of Backlog after canceled.
-
!assert {model: project.scrum.product.backlog, id: scrum_product_backlog_0, severity: error, string: backlog should be in cancel state}:
- state == "cancel"
-
I cancel opened Backlog "Editable Trees".
-
!python {model: project.scrum.product.backlog}: |
self.button_cancel(cr, uid, [ref("scrum_product_backlog_7")])
-
I check state of Backlog after canceled.
-
!assert {model: project.scrum.product.backlog, id: scrum_product_backlog_7, severity: error, string: backlog should be in cancel state}:
- state == "cancel"
-
I put Backlog in pending due to resource unavailability.
-
!python {model: project.scrum.product.backlog}: |
self.button_pending(cr, uid, [ref("scrum_product_backlog_0")])
-
I check state of Backlog after put in pending.
-
!assert {model: project.scrum.product.backlog, id: scrum_product_backlog_0, severity: error, string: Backlog should be in pending state}:
- state == "pending"
-
I cancel pending Backlog "Automatic migration system".
-
!python {model: project.scrum.product.backlog}: |
self.button_cancel(cr, uid, [ref("scrum_product_backlog_0")])
-
I check state of Backlog after canceled.
-
!assert {model: project.scrum.product.backlog, id: scrum_product_backlog_0, severity: error, string: backlog should be in cancel state}:
- state == "cancel"
-
I Postpone opened Backlog "Reshape the complete menu".
-
!python {model: project.scrum.product.backlog}: |
self.button_postpone(cr, uid, [ref("scrum_product_backlog_6")])
-
I check state of Backlog after Postpone.
-
!assert {model: project.scrum.product.backlog, id: scrum_product_backlog_6, severity: error, string: backlog should be in cancel state}:
- state == "cancel"

View File

@ -1,3 +0,0 @@
-
!record {model: project.scrum.sprint, id: scrum_sprint_0, view: False}:
project_id: project.project_integrate_openerp

View File

@ -1,78 +0,0 @@
-
I put sprint in pending state to allocate task to resources.
-
!python {model: project.scrum.sprint}: |
self.button_pending(cr, uid, [ref("scrum_sprint_0")])
-
I check state of sprint after put in pending.
-
!assert {model: project.scrum.sprint, id: scrum_sprint_0, severity: error, string: Sprint should be in pending state}:
- state == "pending"
-
I assign Backlog into this Sprint
-
!python {model: project.scrum.backlog.assign.sprint}: |
new_id = self.create(cr, uid, {'sprint_id': ref("scrum_sprint_0")})
self.assign_sprint(cr, uid, [new_id], {"active_ids": [ref("scrum_product_backlog_0")]
})
backlog_obj = self.pool.get('project.scrum.product.backlog')
task_obj = self.pool.get('project.task')
backlog_data = backlog_obj.browse(cr, uid, ref("scrum_product_backlog_0"), context)
assert backlog_data.sprint_id.id == ref("scrum_sprint_0"), 'Sprint is not assigned'
-
I Open sprint of "Week 31"
-
!python {model: project.scrum.sprint}: |
self.button_open(cr, uid, [ref("scrum_sprint_0")])
-
I check state of sprint after opened.
-
!assert {model: project.scrum.sprint, id: scrum_sprint_0, severity: error, string: Sprint should be in Open state}:
- state == "open"
-
I create tasks from backlog "Automatic migration system" for sprint
-
!python {model: project.scrum.backlog.create.task}: |
new_id = self.create(cr, uid, {'user_id': ref("base.user_al")})
task_obj = self.pool.get('project.task')
backlog_obj = self.pool.get('project.scrum.product.backlog')
new_task = self.do_create(cr, uid, [new_id], {"active_ids": [ref("scrum_product_backlog_0")]})
backlog_data = backlog_obj.browse(cr, uid, ref("scrum_product_backlog_0"), context)
task_ids = task_obj.search(cr, uid, [('product_backlog_id','=', backlog_data.id)])
assert len(task_ids), "Task not created"
task = task_obj.browse(cr, uid, task_ids[0], context)
assert task.name == backlog_data.name and task.total_hours == backlog_data.expected_hours and task.user_id and task.user_id.id == ref("base.user_al"), 'Task not has been created'
-
I send email to scrum master with scrum meeting details.
-
!python {model: mail.compose.message }: |
ctx = context.copy()
ctx.update({'active_model': 'project.scrum.meeting', 'active_id': ref("scrum_meeting_0"), 'active_ids': [ref("scrum_meeting_0")]})
vals = self.default_get(cr, uid , [], context=ctx)
try:
new_id = self.create(cr, uid, {'email_from': 'test@openerp.com', 'email_to': 'xyz@mycompany.com', 'subject': 'test'})
self.send_mail(cr, uid, [new_id], context=ctx)
except Exception, e:
pass
-
I close sprint after review
-
!python {model: project.scrum.sprint}: |
self.button_close(cr, uid, [ref("scrum_sprint_0")])
-
I check state after closed sprint.
-
!assert {model: project.scrum.sprint, id: scrum_sprint_0, severity: error, string: Sprint shoud be in close state}:
- state == "done"
-
I print Burndown chart of Sprint.
-
!python {model: project.scrum.sprint}: |
import netsvc, tools, os
data_dict = {'model': 'project.scrum.sprint', 'id':ref('scrum_sprint_0')}
(data, format) = netsvc.LocalService('report.scrum.sprint.burndown').create(cr, uid, [ref('scrum_sprint_0')], data_dict, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'project_scrum-project_scrum_sprint_burndown.'+format), 'wb+').write(data)

View File

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import project_scrum_backlog_create_task
import project_scrum_backlog_sprint
import project_scrum_backlog_merger
import project_scrum_postpone
import mail_compose_message
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,65 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
#
##############################################################################
from osv import osv
from osv import fields
from tools.translate import _
class mail_compose_message(osv.osv_memory):
_inherit = 'mail.compose.message'
def get_value(self, cr, uid, model, resource_id, context=None):
'''
To get values of the resource_id for the model
@param model: Object
@param resource_id: id of a record for which values to be read
@return: Returns a dictionary
'''
if context is None:
context = {}
result = super(mail_compose_message, self).get_value(cr, uid, model, resource_id, context=context)
if model == 'project.scrum.meeting' and resource_id:
meeting_pool = self.pool.get('project.scrum.meeting')
user_pool = self.pool.get('res.users')
meeting = meeting_pool.browse(cr, uid, resource_id, context=context)
sprint = meeting.sprint_id
user_data = user_pool.browse(cr, uid, uid, context=context)
result.update({'email_from': user_data.user_email or False})
if sprint.scrum_master_id and sprint.scrum_master_id.user_email:
result.update({'email_to': sprint.scrum_master_id.user_email})
if sprint.product_owner_id and sprint.product_owner_id.user_email:
result.update({'email_to': result.get('email_to',False) and result.get('email_to') + ',' + sprint.product_owner_id.user_email or sprint.product_owner_id.user_email})
subject = _("Scrum Meeting : %s") %(meeting.date)
message = _("Hello , \nI am sending you Scrum Meeting : %s for the Sprint '%s' of Project '%s'") %(meeting.date, sprint.name, sprint.project_id.name)
result.update({
'subject': subject,
'body_text': message,
'model': model,
'res_id': resource_id
})
return result
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,73 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
class backlog_create_task(osv.osv_memory):
_name = 'project.scrum.backlog.create.task'
_description = 'Create Tasks from Product Backlogs'
_columns = {
'user_id': fields.many2one('res.users', 'Assign To', help="Responsible user who can work on task")
}
def do_create(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
task = self.pool.get('project.task')
backlog_id = self.pool.get('project.scrum.product.backlog')
document_pool = self.pool.get('ir.attachment')
ids_task = []
data = self.read(cr, uid, ids, [], context=context)[0]
data['user_id'] = data['user_id'][0]
backlogs = backlog_id.browse(cr, uid, context['active_ids'], context=context)
result = mod_obj._get_id(cr, uid, 'project', 'view_task_search_form')
id = mod_obj.read(cr, uid, result, ['res_id'])
for backlog in backlogs:
task_id = task.create(cr, uid, {
'product_backlog_id': backlog.id,
'name': backlog.name,
'description': backlog.note,
'project_id': backlog.project_id.id,
'user_id': data['user_id'] or False,
'planned_hours': backlog.expected_hours,
'remaining_hours':backlog.expected_hours,
'sequence':backlog.sequence,
})
document_ids = document_pool.search(cr, uid, [('res_id', '=', backlog.id), ('res_model', '=', backlog_id._name)])
for document_id in document_ids:
document_pool.copy(cr, uid, document_id, default={'res_id':task_id, 'res_model':task._name})
ids_task.append(task_id)
return {
'domain': "[('product_backlog_id','in',["+','.join(map(str, context['active_ids']))+"])]",
'name': 'Tasks',
'res_id': ids_task,
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'project.task',
'view_id': False,
'type': 'ir.actions.act_window',
'search_view_id': id['res_id'],
}
backlog_create_task()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_scrum_backlog_to_task" model="ir.ui.view">
<field name="name">project.scrum.backlog.create.task.form</field>
<field name="model">project.scrum.backlog.create.task</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Convert to Task">
<separator string="Convert to Task" colspan="4"/>
<field name="user_id"/>
<separator colspan="4"/>
<group col="2" colspan="2">
</group>
<group col="2" colspan="2">
<button special="cancel" string="_Cancel" icon='gtk-cancel'/>
<button name="do_create" string="C_onvert" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
</field>
</record>
<record id="action_scrum_backlog_to_task" model="ir.actions.act_window">
<field name="name">Convert to Task</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">project.scrum.backlog.create.task</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record model="ir.values" id="scrum_backlog_to_task_values">
<field name="model_id" ref="model_project_scrum_product_backlog" />
<field name="name">Convert into Tasks</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_scrum_backlog_to_task'))" />
<field name="key">action</field>
<field name="model">project.scrum.product.backlog</field>
</record>
</data>
</openerp>

View File

@ -1,101 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
from tools.translate import _
class project_scrum_backlog_merge(osv.osv_memory):
_name = 'project.scrum.backlog.merge'
_description = 'Merge Product Backlogs'
_columns = {
'project_id': fields.many2one('project.project', 'Project', help="Select project for the new product backlog"),
}
def check_backlogs(self, cr, uid, ids, context=None):
backlog_obj = self.pool.get('project.scrum.product.backlog')
mod_obj = self.pool.get('ir.model.data')
p_list = []
if context is None:
context = {}
#If only one product backlog selected for merging then show an exception
if len(context['active_ids']) < 2:
raise osv.except_osv(_('Warning'),_('Please select at least two product Backlogs'))
#If any of the backlog state is done then it will show an exception
for backlogs in backlog_obj.browse(cr, uid, context['active_ids'], context=context):
p_list.append(backlogs.project_id.id)
#For checking whether project id's are different or same.
if len(set(p_list)) != 1:
context.update({'scrum_projects': True})
model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','scrum_merge_project_id_view')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
return {
'context': context,
'view_type': 'form',
'view_mode': 'form',
'res_model': 'project.scrum.backlog.merge',
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
}
return self.do_merge(cr, uid, ids, context=context)
def do_merge(self, cr, uid, ids, context=None):
backlog_obj = self.pool.get('project.scrum.product.backlog')
task_obj = self.pool.get('project.task')
task_lines = []
new_exp_hour = []
if context is None:
context = {}
#This will check product backlog's project id if different then will accept a new id provided by the user.
if 'scrum_projects' in context:
data = self.browse(cr, uid, ids, [])[0]
if data.project_id.id == False:
raise osv.except_osv(_('Warning'),_('Please select any Project.'))
new_project_id = data.project_id.id
else:
p_id = backlog_obj.read(cr, uid, context['active_id'], ['project_id'])
new_project_id = p_id['project_id'][0]
#To merge note and description of backlogs
new_note = ''
new_description = ''
for backlogs in backlog_obj.browse(cr, uid, context['active_ids'], context=context):
if new_note:
new_note += ' + '
new_description += '\n\n'+('-'*50)+'\n'
new_note += backlogs.name
new_description += (backlogs.name or '') + '\n' + (backlogs.note or '')
new_exp_hour.append(backlogs.expected_hours)
for line in backlogs.tasks_id:
task_lines.append(line.id)
id_b = backlog_obj.create(cr, uid, {
'name': new_note,
'note': new_description,
'project_id': new_project_id,
'expected_hours': round(max(new_exp_hour))
}, context=context)
#To assing a new product backlog to merged tasks
task_obj.write(cr, uid, task_lines, {'product_backlog_id': id_b})
backlog_obj.unlink(cr, uid, context['active_ids'], context=context)
return {'type': 'ir.actions.act_window_close'}
project_scrum_backlog_merge()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="scrum_backlog_merge_view" model="ir.ui.view">
<field name="name">Merge Backlogs</field>
<field name="model">project.scrum.backlog.merge</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Merge Backlogs">
<separator string="Are you sure you want to merge these backlogs?" colspan="4"/>
<label colspan="4" string="This wizard merge backlogs and create one new backlog with draft state (Old backlogs Will be deleted). And it also merge old tasks from backlogs" />
<separator colspan="4"/>
<button colspan="2" special="cancel" string="Cancel" icon="gtk-cancel"/>
<button colspan="2" default_focus="1" name="check_backlogs" string="Merge" type="object" icon="gtk-execute"/>
</form>
</field>
</record>
<record id="action_scrum_backlog_merge" model="ir.actions.act_window">
<field name="name">Merge Backlogs</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">project.scrum.backlog.merge</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="view_id" ref="scrum_backlog_merge_view"/>
</record>
<record model="ir.values" id="scrum_backlog_merge_values">
<field name="model_id" ref="model_project_scrum_product_backlog" />
<field name="name">Merge Backlogs</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_scrum_backlog_merge'))" />
<field name="key">action</field>
<field name="model">project.scrum.product.backlog</field>
</record>
<record id="scrum_merge_project_id_view" model="ir.ui.view">
<field name="name">Merge Backlogs</field>
<field name="model">project.scrum.backlog.merge</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Merge Backlogs">
<separator string="Select the project for merged backlogs" colspan="4"/>
<field name="project_id"/>
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="do_merge" string="Merge Backlogs" type="object" icon="gtk-execute"/>
</form>
</field>
</record>
</data>
</openerp>

View File

@ -1,70 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
from tools.translate import _
class backlog_sprint_assign(osv.osv_memory):
_name = 'project.scrum.backlog.assign.sprint'
_description = 'Assign sprint to backlogs'
_inherit = ['mail.thread']
_columns = {
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint', required=True, help="Select Sprint to assign backlog."),
'state_open': fields.boolean('Open Backlog', help="Change the state of product backlogs to open if its in draft state"),
'convert_to_task': fields.boolean('Convert To Task', help="Create Task for Product Backlog")
}
_defaults = {
'state_open': True,
'convert_to_task': True,
}
def assign_sprint(self, cr, uid, ids, context=None):
backlog_obj = self.pool.get('project.scrum.product.backlog')
sprint_obj = self.pool.get('project.scrum.sprint')
task = self.pool.get('project.task')
backlog_ids = []
if context is None:
context = {}
data = self.browse(cr, uid, ids,context=context)[0]
for backlog in backlog_obj.browse(cr, uid, context['active_ids'], context=context):
backlog_ids.append(backlog.id)
if data.convert_to_task:
task_id = task.create(cr, uid, {
'product_backlog_id': backlog.id,
'name': backlog.name,
'description': backlog.note,
'project_id': backlog.project_id.id,
'user_id': False,
'planned_hours':backlog.expected_hours,
'remaining_hours':backlog.expected_hours,
})
message = _("Product Backlog '%s' is converted into Task %d.") %(backlog.name, task_id)
self.message_append_note(cr, uid, [backlog.id], body=message, context=context)
if data.state_open and backlog.state == "draft":
backlog_obj.write(cr, uid, backlog.id, {'state':'open'})
sprint = sprint_obj.browse(cr, uid, data.sprint_id.id, context=context)
message = _("Product Backlog '%s' is assigned to sprint %s") %(backlog.name, sprint.name)
self.message_append_note(cr, uid, [backlog.id], body=message, context=context)
backlog_obj.write(cr, uid, backlog_ids, {'sprint_id': data.sprint_id.id}, context=context)
return {'type': 'ir.actions.act_window_close'}
backlog_sprint_assign()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_scrum_backlog_to_sprint" model="ir.ui.view">
<field name="name">project.scrum.backlog.assign.sprint.form</field>
<field name="model">project.scrum.backlog.assign.sprint</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Assign Sprint">
<separator string="Assign Sprint" colspan="4"/>
<field name="sprint_id" colspan="4"/>
<field name="state_open" />
<field name="convert_to_task"/>
<separator colspan="4"/>
<group col="2" colspan="2">
</group>
<group col="2" colspan="2">
<button special="cancel" string="_Cancel" icon='gtk-cancel'/>
<button name="assign_sprint" string="_Assign" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
</field>
</record>
<record id="action_scrum_backlog_to_sprint" model="ir.actions.act_window">
<field name="name">Assign Sprint</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">project.scrum.backlog.assign.sprint</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record model="ir.values" id="scrum_backlog_to_sprint_values">
<field name="model_id" ref="model_project_scrum_product_backlog" />
<field name="name">Assign Sprint</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_scrum_backlog_to_sprint'))" />
<field name="key">action</field>
<field name="model">project.scrum.product.backlog</field>
</record>
</data>
</openerp>

View File

@ -1,109 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
from datetime import datetime
import tools
class project_scrum_email(osv.osv_memory):
_name = 'project.scrum.email'
def default_get(self, cr, uid, fields, context=None):
"""
This function gets default values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param fields: List of fields for default value
@param context: A standard dictionary for contextual values
@return : default values of fields.
"""
if context is None:
context = {}
meeting_pool = self.pool.get('project.scrum.meeting')
record_ids = context and context.get('active_ids', []) or []
res = super(project_scrum_email, self).default_get(cr, uid, fields, context=context)
for meeting in meeting_pool.browse(cr, uid, record_ids, context=context):
sprint = meeting.sprint_id
if 'scrum_master_email' in fields:
res.update({'scrum_master_email': sprint.scrum_master_id and sprint.scrum_master_id.user_email or False})
if 'product_owner_email' in fields:
res.update({'product_owner_email': sprint.product_owner_id and sprint.product_owner_id.user_email or False})
if 'subject' in fields:
subject = _("Scrum Meeting : %s") %(meeting.date)
res.update({'subject': subject})
if 'message' in fields:
message = _("Hello , \nI am sending you Scrum Meeting : %s for the Sprint '%s' of Project '%s'") %(meeting.date, sprint.name, sprint.project_id.name)
res.update({'message': message})
return res
_columns = {
'scrum_master_email': fields.char('Scrum Master Email', size=64, help="Email Id of Scrum Master"),
'product_owner_email': fields.char('Product Owner Email', size=64, help="Email Id of Product Owner"),
'subject':fields.char('Subject', size=64),
'message':fields.text('Message'),
}
def button_send_scrum_email(self, cr, uid, ids, context=None):
if context is None:
context = {}
mail_message = self.pool.get('mail.message')
active_id = context.get('active_id', False)
scrum_meeting_pool = self.pool.get('project.scrum.meeting')
user_pool = self.pool.get('res.users')
meeting = scrum_meeting_pool.browse(cr, uid, active_id, context=context)
# wizard data
data_id = ids and ids[0] or False
if not data_id or not active_id:
return False
data = self.browse(cr, uid, data_id, context=context)
email_from = tools.config.get('email_from', False)
user = user_pool.browse(cr, uid, uid, context=context)
user_email = email_from or user.user_email
body = "%s\n" %(data.message)
body += "\n%s\n" %_('Tasks since yesterday')
body += "_______________________\n"
body += "\n%s\n" %(meeting.question_yesterday or _('None'))
body += "\n%s\n" %_("Task for Today")
body += "_______________________ \n"
body += "\n%s\n" %(meeting.question_today or _('None'))
body += "\n%s\n" % _('Blocking points encountered:')
body += "_______________________ \n"
body += "\n%s\n" %(meeting.question_blocks or _('None'))
body += "\n%s\n%s" %(_('Thank you,'), user.name)
if user.signature:
body += "\n%s" %(user.signature)
if data.scrum_master_email == data.product_owner_email:
data.product_owner_email = False
if data.scrum_master_email:
mail_message.schedule_with_attach(cr, uid, user_email, [data.scrum_master_email], data.subject, body, reply_to=user_email, context=context)
if data.product_owner_email:
mail_message.schedule_with_attach(cr, uid, user_email, [data.product_owner_email], data.subject, body, reply_to=user_email, context=context)
return {'type': 'ir.actions.act_window_close'}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_project_scrum_email" model="ir.ui.view">
<field name="name">Scrum Meeting</field>
<field name="model">project.scrum.email</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Scrum Meeting">
<separator colspan="4" string="Send Email for Scrum Meeting Details"/>
<field name="scrum_master_email" width="64"/>
<field name="product_owner_email" width="64"/>
<field name="subject" colspan="4"/>
<separator string="Message" colspan="4"/>
<field name="message" nolabel="1" colspan="4"/>
<separator string="" colspan="4"/>
<group colspan="2" col="2">
</group>
<group colspan="2" col="2">
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
<button icon="gtk-go-forward" name="button_send_scrum_email" string="_Send" type="object" default_focus="1" />
</group>
</form>
</field>
</record>
<record id="action_project_scrum_email" model="ir.actions.act_window">
<field name="name">Scrum Meeting</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">project.scrum.email</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv
from osv import fields
class postpone_wizard(osv.osv_memory):
_name = "postpone.wizard"
def button_postpone(self, cr, uid, ids, context=None):
if context is None:
context = {}
self.pool.get('project.scrum.product.backlog').button_postpone(cr, uid, context.get('active_ids',[]), context=context)
return {}
postpone_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="postpone_wizard_form">
<field name="name">postpone_wizard</field>
<field name="model">postpone.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Postpone Backlog">
<separator string="Postpone" colspan="4"/>
<label align="0.0" colspan="2" string="Are you sure to postpone Backlog ?"/>
<separator string="" colspan="4"/>
<group colspan="4">
<button special="cancel" type="object" string="Close" icon="gtk-cancel"/>
<button name="button_postpone" type="object" string="Ok" icon="gtk-apply"/>
</group>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_postpone_wizard">
<field name="name">Postpone</field>
<field name="res_model">postpone.wizard</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -214,15 +214,9 @@
<group colspan="2" col="4" name="bellow_the_lines_hook">
</group>
<div class="oe_form_subtotal_footer" colspan="2">
<div>
<field name="amount_untaxed" sum="Untaxed amount"/>
</div>
<div>
<field name="amount_tax"/>
</div>
<div class="oe_form_subtotal_footer_separator">
<field name="amount_total"/>
</div>
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
<field name="amount_total" class="oe_form_subtotal_footer_separator"/>
</div>
<div class="oe_clear"/>