[MERGE] : Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: sbh@tinyerp.com-20100622121022-uds2mz7y14pg2g9i
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Financial Management" sequence="1"/>
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
|
||||
<menuitem id="menu_finance_receivables" name="Receivables" parent="menu_finance" sequence="2"/>
|
||||
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="3"/>
|
||||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="4"/>
|
||||
@@ -11,7 +11,7 @@
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Journal Entries Validation" parent="menu_finance_periodical_processing"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>-->
|
||||
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
|
||||
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="10"/>
|
||||
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
|
||||
@@ -26,7 +26,6 @@
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
<menuitem icon="terp-account" id="menu_finance" name="Financial Management" sequence="5"/>
|
||||
<!-- <menuitem id="menu_finance_configuration1" name="Configuration" parent="menu_finance" sequence="80"/>-->
|
||||
<!-- <menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>-->
|
||||
<!-- <menuitem id="menu_finance_accounting1" name="Financial Accounting" parent="menu_finance_configuration" sequence="80"/>-->
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
</form>
|
||||
</field>
|
||||
<separator colspan="4" string="States"/>
|
||||
<field name="state" select="1" readonly="1"/>
|
||||
<group col="2" colspan="2">
|
||||
<group>
|
||||
<field name="state" select="1" readonly="1"/>
|
||||
<button name="create_period" states="draft" string="Create Monthly Periods" type="object" icon="gtk-dnd"/>
|
||||
<button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" icon="gtk-dnd"/>
|
||||
</group>
|
||||
@@ -94,15 +94,15 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Period">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_stop"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="fiscalyear_id"/>
|
||||
<field name="special"/>
|
||||
<separator colspan="4" string="States"/>
|
||||
<field name="state"/>
|
||||
<field name="state" select="1"/>
|
||||
<button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
|
||||
</form>
|
||||
</field>
|
||||
@@ -122,32 +122,11 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_account_period_search" model="ir.ui.view">
|
||||
<field name="name">account.period.search</field>
|
||||
<field name="model">account.period</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Periods">
|
||||
<group>
|
||||
<filter string="Done" domain="[('state','=','done')]" icon="terp-dolar_ok!"/>
|
||||
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="state"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_account_period_form" model="ir.actions.act_window">
|
||||
<field name="name">Periods</field>
|
||||
<field name="res_model">account.period</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem action="action_account_period_form" id="menu_action_account_period_form" parent="account.next_id_23"/>
|
||||
|
||||
@@ -202,14 +181,15 @@
|
||||
<filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
|
||||
<filter icon="terp-purchase" string="Purchase Accounts" domain="[('type','=','purchase')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="user_type" select="1"/>
|
||||
<field name="type" select="1"/>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="user_type"/>
|
||||
<field name="type"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="User Type" icon="terp-folder-blue" domain="" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Internal Type" icon="terp-folder-yellow" domain="" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
@@ -236,6 +216,8 @@
|
||||
<tree string="Chart of accounts" toolbar="1" colors="blue:type in ('view');black:type not in ('view')">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<field name="user_type" invisible="1"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="balance"/>
|
||||
@@ -313,6 +295,8 @@
|
||||
<tree string="Account Journal">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -696,7 +680,8 @@
|
||||
<field name="sum"/>
|
||||
<field name="sum_period"/>
|
||||
<newline/>
|
||||
<field colspan="4" name="info"/>
|
||||
<separator string="Description" colspan="4"/>
|
||||
<field colspan="4" name="info" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -724,6 +709,7 @@
|
||||
<field name="name"/>
|
||||
<field name="price_include" groups="base.group_extended"/>
|
||||
<field name="description"/>
|
||||
<field name="tax_group" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -742,7 +728,7 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Tax Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Tax Group" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'tax_group'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -1796,6 +1782,8 @@
|
||||
<tree string="Account Template">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="user_type" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -1896,6 +1884,10 @@
|
||||
<field name="account_root_id"/>
|
||||
<field name="tax_code_root_id"/>
|
||||
<field name="bank_account_view_id"/>
|
||||
<field name="property_account_receivable" invisible="1"/>
|
||||
<field name="property_account_payable" invisible="1"/>
|
||||
<field name="property_account_expense_categ" invisible="1"/>
|
||||
<field name="property_account_income_categ" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -2015,6 +2007,7 @@
|
||||
<tree string="Account Tax Code Template" toolbar="1">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -2026,9 +2019,9 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search tax template">
|
||||
<group>
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="parent_id" select="1"/>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="parent_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
<separator string="Purchase Properties" colspan="2"/>
|
||||
<field name="property_account_income" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="supplier_taxes_id"/>
|
||||
<field name="taxes_id"/>
|
||||
<field name="supplier_taxes_id"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
|
||||
@@ -61,6 +61,10 @@
|
||||
<field name="balance"/>
|
||||
<field name="quantity"/>
|
||||
<field name="quantity_max"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -293,7 +297,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_analytic_journal_search" model="ir.ui.view">
|
||||
<field name="name">account.analytic.journal.search</field>
|
||||
<field name="model">account.analytic.journal</field>
|
||||
@@ -306,7 +310,7 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_account_analytic_journal_form" model="ir.ui.view">
|
||||
<field name="name">account.analytic.journal.form</field>
|
||||
<field name="model">account.analytic.journal</field>
|
||||
@@ -350,7 +354,7 @@
|
||||
</record> -->
|
||||
<!-- <menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_bank_and_cash"/>-->
|
||||
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Checks Register</field>
|
||||
<field name="name">Check Registers</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period">
|
||||
<group width="650" height="200">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<newline/>
|
||||
@@ -30,10 +31,12 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print Central Journal">
|
||||
<group col="4" colspan="6">
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<group height="370" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-print"/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print General Journal">
|
||||
<group col="4" colspan="6">
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<group height="380" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Date-Period">
|
||||
<group width="650" height="230">
|
||||
<field name="company_id" colspan="4" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="fiscalyear"/>
|
||||
@@ -39,9 +40,11 @@
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Date-Period">
|
||||
<group width="620" height="210">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="result_selection" required = "True"/>
|
||||
<newline/>
|
||||
@@ -30,10 +31,12 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="terp-gtk-stop"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,6 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!---->
|
||||
<!-- <record id="view_account_print_journal" model="ir.ui.view">-->
|
||||
<!-- <field name="name">Account Print Journal</field>-->
|
||||
<!-- <field name="model">account.print.journal</field>-->
|
||||
<!-- <field name="type">form</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <form string="Print Journal">-->
|
||||
<!-- <group col="4" colspan="6">-->
|
||||
<!-- <field name="journal_id"/>-->
|
||||
<!-- <field name="period_id"/>-->
|
||||
<!-- <newline/>-->
|
||||
<!-- <field name="sort_selection"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <separator colspan="4"/>-->
|
||||
<!-- <group col="2" colspan="4">-->
|
||||
<!-- <button special="cancel" string="Cancel" icon='gtk-cancel'/>-->
|
||||
<!-- <button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- </form>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
<record id="view_account_print_journal" model="ir.ui.view">
|
||||
<field name="name">Account Print Journal</field>
|
||||
@@ -8,21 +30,26 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print Journal">
|
||||
<group col="4" colspan="6">
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<newline/>
|
||||
<field name="sort_selection"/>
|
||||
<group height="400" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<field name="sort_selection"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_account_print_journal" model="ir.actions.act_window">
|
||||
<field name="name">Account Print Journal</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Date-Period">
|
||||
<group width="650" height="230">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="result_selection"/>
|
||||
<newline/>
|
||||
@@ -33,10 +34,12 @@
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<separator colspan="2"/>
|
||||
<newline/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Period">
|
||||
<group width="650" height="230">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="based_on"/>
|
||||
<newline/>
|
||||
<field name="periods"/>
|
||||
<group col="2" colspan="4">
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<field name="periods" nolabel="1"/>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<newline/>
|
||||
<button icon='gtk-cancel' special="cancel" string="Cancel" />
|
||||
<button name="create_vat" string="Print VAT Decl." colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -310,14 +310,6 @@
|
||||
auto="False"
|
||||
menu="False"/>-->
|
||||
|
||||
<!--Menu for project management-->
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
|
||||
<menuitem id="base.menu_pm_invoicing" name="Billing" parent="base.menu_main_pm" sequence="7"/>
|
||||
<menuitem id="menu_pm_budget" name="Budgets" parent="base.menu_pm_invoicing"/>
|
||||
<menuitem action="open_budget_post_form" id="menu_pm_budget_post_form" parent="menu_pm_budget"/>
|
||||
<menuitem parent="menu_pm_budget"
|
||||
id="menu_act_pm_crossovered_budget_view"
|
||||
action="act_crossovered_budget_view" />
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -111,10 +111,8 @@
|
||||
|
||||
<!--======================================== MENUS ========================================-->
|
||||
<menuitem name="MailBox" id="menu_email_template_mailbox_all_main2" parent="menu_email_template" />
|
||||
<menuitem name="Personal" id="menu_email_template_personal" parent="menu_email_template_mailbox_all_main2" />
|
||||
<menuitem name="Mails" id="menu_email_template_personal_mails" parent="menu_email_template_personal" action="action_email_template_mailbox"/>
|
||||
<menuitem name="Company" id="menu_email_template_company" parent="menu_email_template_mailbox_all_main2" />
|
||||
<menuitem name="Mails" id="menu_email_template_company_mails" parent="menu_email_template_company" action="action_email_template_mailbox"/>
|
||||
<menuitem name="Personal Mails" id="menu_email_template_personal_mails" parent="menu_email_template_mailbox_all_main2" action="action_email_template_mailbox"/>
|
||||
<menuitem name="Company Mails" id="menu_email_template_company_mails" parent="menu_email_template_mailbox_all_main2" action="action_email_template_mailbox"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -514,7 +514,7 @@
|
||||
</record>
|
||||
<menuitem id="menu_tasks_config" name="Tasks" parent="project.menu_definitions" sequence="1"/>
|
||||
<menuitem action="open_task_type_form" id="menu_task_types_view" parent="menu_tasks_config" sequence="1"/>
|
||||
|
||||
|
||||
<act_window domain="[('user_id', '=', active_id)]" id="act_res_users_2_project_project" name="User's projects" res_model="project.project" src_model="res.users" view_mode="tree,form" view_type="form"/>
|
||||
|
||||
<act_window
|
||||
|
||||
@@ -33,5 +33,4 @@ class company(osv.osv):
|
||||
}
|
||||
company()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+40
-35
@@ -20,10 +20,11 @@
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
from datetime import datetime
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
from tools import config
|
||||
from tools.translate import _
|
||||
|
||||
@@ -41,8 +42,8 @@ class sale_shop(osv.osv):
|
||||
'project_id': fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
sale_shop()
|
||||
|
||||
sale_shop()
|
||||
|
||||
def _incoterm_get(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
@@ -77,11 +78,11 @@ class sale_order(osv.osv):
|
||||
return val
|
||||
|
||||
def _amount_all(self, cr, uid, ids, field_name, arg, context=None):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
if context is None:
|
||||
context = {}
|
||||
res = {}
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
for order in self.browse(cr, uid, ids, context):
|
||||
for order in self.browse(cr, uid, ids, context=context):
|
||||
res[order.id] = {
|
||||
'amount_untaxed': 0.0,
|
||||
'amount_tax': 0.0,
|
||||
@@ -281,13 +282,13 @@ class sale_order(osv.osv):
|
||||
}
|
||||
_defaults = {
|
||||
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'sale.order', context=c),
|
||||
'picking_policy': lambda *a: 'direct',
|
||||
'date_order': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'order_policy': lambda *a: 'manual',
|
||||
'state': lambda *a: 'draft',
|
||||
'picking_policy': 'direct',
|
||||
'date_order': time.strftime('%Y-%m-%d'),
|
||||
'order_policy': 'manual',
|
||||
'state': 'draft',
|
||||
'user_id': lambda obj, cr, uid, context: uid,
|
||||
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'sale.order'),
|
||||
'invoice_quantity': lambda *a: 'order',
|
||||
'invoice_quantity': 'order',
|
||||
'partner_invoice_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['invoice'])['invoice'],
|
||||
'partner_order_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['contact'])['contact'],
|
||||
'partner_shipping_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').address_get(cr, uid, [context['partner_id']], ['delivery'])['delivery'],
|
||||
@@ -333,7 +334,7 @@ class sale_order(osv.osv):
|
||||
wf_service.trg_create(uid, 'sale.order', inv_id, cr)
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale order ') + " '" + name + "' "+ _("is in draft state")
|
||||
self.log(cr, uid, id, message)
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part):
|
||||
@@ -408,8 +409,16 @@ class sale_order(osv.osv):
|
||||
return {}
|
||||
|
||||
def _make_invoice(self, cr, uid, order, lines, context=None):
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=', order.company_id.id)], limit=1)
|
||||
if not journal_ids:
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('There is no sale journal defined for this company: "%s" (id:%d)') % (order.company_id.name, order.company_id.id))
|
||||
a = order.partner_id.property_account_receivable.id
|
||||
if order.payment_term:
|
||||
pay_term = order.payment_term.id
|
||||
@@ -420,11 +429,6 @@ class sale_order(osv.osv):
|
||||
for preline in preinv.invoice_line:
|
||||
inv_line_id = self.pool.get('account.invoice.line').copy(cr, uid, preline.id, {'invoice_id': False, 'price_unit': -preline.price_unit})
|
||||
lines.append(inv_line_id)
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=', order.company_id.id)], limit=1)
|
||||
if not journal_ids:
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('There is no sale journal defined for this company: "%s" (id:%d)') % (order.company_id.name, order.company_id.id))
|
||||
|
||||
inv = {
|
||||
'name': order.client_order_ref or order.name,
|
||||
@@ -445,7 +449,6 @@ class sale_order(osv.osv):
|
||||
'company_id' : order.company_id.id,
|
||||
'user_id':order.user_id and order.user_id.id or False
|
||||
}
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
inv.update(self._inv_get(cr, uid, order))
|
||||
inv_id = inv_obj.create(cr, uid, inv, context=context)
|
||||
data = inv_obj.onchange_payment_term_date_invoice(cr, uid, [inv_id], pay_term, time.strftime('%Y-%m-%d'))
|
||||
@@ -454,12 +457,14 @@ class sale_order(osv.osv):
|
||||
inv_obj.button_compute(cr, uid, [inv_id])
|
||||
return inv_id
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, grouped=False, states=['confirmed', 'done', 'exception'], date_inv = False):
|
||||
def action_invoice_create(self, cr, uid, ids, grouped=False, states=['confirmed', 'done', 'exception'], date_inv = False, context=None):
|
||||
res = False
|
||||
invoices = {}
|
||||
invoice_ids = []
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
|
||||
context = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
# If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the
|
||||
# last day of the last month as invoice date
|
||||
if date_inv:
|
||||
@@ -478,7 +483,6 @@ class sale_order(osv.osv):
|
||||
for i in o.invoice_ids:
|
||||
if i.state == 'draft':
|
||||
return i.id
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
for val in invoices.values():
|
||||
if grouped:
|
||||
res = self._make_invoice(cr, uid, val[0][0], reduce(lambda x,y: x + y, [l for o,l in val], []), context=context)
|
||||
@@ -559,19 +563,19 @@ class sale_order(osv.osv):
|
||||
|
||||
def action_wait(self, cr, uid, ids, *args):
|
||||
product=[]
|
||||
product_obj=self.pool.get('product.product')
|
||||
product_obj = self.pool.get('product.product')
|
||||
for o in self.browse(cr, uid, ids):
|
||||
if (o.order_policy == 'manual'):
|
||||
self.write(cr, uid, [o.id], {'state': 'manual', 'date_confirm': time.strftime('%Y-%m-%d')})
|
||||
else:
|
||||
self.write(cr, uid, [o.id], {'state': 'progress', 'date_confirm': time.strftime('%Y-%m-%d')})
|
||||
self.pool.get('sale.order.line').button_confirm(cr, uid, [x.id for x in o.order_line])
|
||||
for line in o.order_line:
|
||||
for line in o.order_line:
|
||||
product.append(line.product_id.default_code)
|
||||
params = ', '.join(map(lambda x : str(x),product))
|
||||
message = _('Sale order ') + " '" + o.name + "' "+ _("created on")+" '" +o.create_date + "' "+_("for")+" '" +params + "' "+_("is confirmed")
|
||||
self.log(cr, uid, id, message)
|
||||
|
||||
return True
|
||||
|
||||
def procurement_lines_get(self, cr, uid, ids, *args):
|
||||
res = []
|
||||
@@ -773,10 +777,10 @@ sale_order()
|
||||
# - use it in report if there is a uos
|
||||
class sale_order_line(osv.osv):
|
||||
def _amount_line(self, cr, uid, ids, field_name, arg, context=None):
|
||||
res = {}
|
||||
context = context or {}
|
||||
tax_obj = self.pool.get('account.tax')
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
res = {}
|
||||
context = context or {}
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
price = line.price_unit * line.product_uom_qty * (1 - (line.discount or 0.0) / 100.0)
|
||||
taxes = tax_obj.compute_all(cr, uid, line.tax_id, price, line.product_uom_qty)
|
||||
@@ -834,15 +838,15 @@ class sale_order_line(osv.osv):
|
||||
}
|
||||
_order = 'sequence, id'
|
||||
_defaults = {
|
||||
'discount': lambda *a: 0.0,
|
||||
'delay': lambda *a: 0.0,
|
||||
'product_uom_qty': lambda *a: 1,
|
||||
'product_uos_qty': lambda *a: 1,
|
||||
'sequence': lambda *a: 10,
|
||||
'invoiced': lambda *a: 0,
|
||||
'state': lambda *a: 'draft',
|
||||
'type': lambda *a: 'make_to_stock',
|
||||
'product_packaging': lambda *a: False
|
||||
'discount': 0.0,
|
||||
'delay': 0.0,
|
||||
'product_uom_qty': 1,
|
||||
'product_uos_qty': 1,
|
||||
'sequence': 10,
|
||||
'invoiced': 0,
|
||||
'state': 'draft',
|
||||
'type': 'make_to_stock',
|
||||
'product_packaging': False
|
||||
}
|
||||
|
||||
def invoice_line_create(self, cr, uid, ids, context=None):
|
||||
@@ -934,7 +938,7 @@ class sale_order_line(osv.osv):
|
||||
context = {}
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale order line') + " '" + name + "' "+ _("is confirmed")
|
||||
self.log(cr, uid, id, message)
|
||||
self.log(cr, uid, id, message)
|
||||
return self.write(cr, uid, ids, {'state': 'confirmed'})
|
||||
|
||||
def button_done(self, cr, uid, ids, context=None):
|
||||
@@ -1177,3 +1181,4 @@ class sale_config_picking_policy(osv.osv_memory):
|
||||
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'})
|
||||
sale_config_picking_policy()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
+11
-15
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# 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/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -27,7 +27,7 @@ class stock_move(osv.osv):
|
||||
'sale_line_id': fields.many2one('sale.order.line', 'Sale Order Line', ondelete='set null', select=True, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'sale_line_id': lambda *a:False
|
||||
'sale_line_id': False
|
||||
}
|
||||
stock_move()
|
||||
|
||||
@@ -37,7 +37,7 @@ class stock_picking(osv.osv):
|
||||
'sale_id': fields.many2one('sale.order', 'Sale Order', ondelete='set null', select=True, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'sale_id': lambda *a: False
|
||||
'sale_id': False
|
||||
}
|
||||
|
||||
def get_currency_id(self, cursor, user, picking):
|
||||
@@ -127,7 +127,7 @@ class stock_picking(osv.osv):
|
||||
for invoice in invoice_obj.browse(cursor, user, invoice_ids,
|
||||
context=context):
|
||||
invoices[invoice.id] = invoice
|
||||
|
||||
|
||||
for picking in picking_obj.browse(cursor, user, picking_ids,
|
||||
context=context):
|
||||
|
||||
@@ -135,15 +135,15 @@ class stock_picking(osv.osv):
|
||||
continue
|
||||
sale_lines = picking.sale_id.order_line
|
||||
invoice_created = invoices[result[picking.id]]
|
||||
|
||||
|
||||
for inv in invoice_obj.browse(cursor, user, [invoice_created.id], context=context):
|
||||
if not inv.fiscal_position:
|
||||
invoice_obj.write(cursor, user, [inv.id], {'fiscal_position': picking.sale_id.fiscal_position.id}, context=context)
|
||||
|
||||
|
||||
if picking.sale_id.client_order_ref:
|
||||
inv_name = picking.sale_id.client_order_ref + " : " + invoice_created.name
|
||||
invoice_obj.write(cursor, user, [invoice_created.id], {'name': inv_name}, context=context)
|
||||
|
||||
|
||||
for sale_line in sale_lines:
|
||||
if sale_line.product_id.type == 'service' and sale_line.invoiced == False:
|
||||
if group:
|
||||
@@ -189,7 +189,7 @@ class stock_picking(osv.osv):
|
||||
})
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context={}):
|
||||
res = super(stock_picking, self).action_cancel(cr, uid, ids, context=context)
|
||||
for pick in self.browse(cr, uid, ids, context):
|
||||
@@ -200,13 +200,9 @@ class stock_picking(osv.osv):
|
||||
call_ship_end = False
|
||||
break
|
||||
if call_ship_end:
|
||||
self.pool.get('sale.order').action_ship_end(cr, uid, [pick.sale_id.id], context)
|
||||
self.pool.get('sale.order').action_ship_end(cr, uid, [pick.sale_id.id], context)
|
||||
return res
|
||||
|
||||
|
||||
stock_picking()
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -2,41 +2,41 @@
|
||||
In order to test the sale module in the Open-ERP, I need to configure details regarding product & customer.
|
||||
-
|
||||
I am going to sell my Mobile products to the customer with name Cleartrail
|
||||
-
|
||||
-
|
||||
I create View Account Type.
|
||||
-
|
||||
-
|
||||
!record {model: account.account.type, id: account_account_type_view0}:
|
||||
close_method: none
|
||||
code: View
|
||||
name: View
|
||||
sign: 1
|
||||
-
|
||||
-
|
||||
I create Income Account Type.
|
||||
-
|
||||
-
|
||||
!record {model: account.account.type, id: account_account_type_income0}:
|
||||
close_method: unreconciled
|
||||
code: Income
|
||||
name: Income
|
||||
sign: 1
|
||||
-
|
||||
-
|
||||
I create Expense Account Type.
|
||||
-
|
||||
-
|
||||
!record {model: account.account.type, id: account_account_type_expense0}:
|
||||
close_method: unreconciled
|
||||
code: Expense
|
||||
name: Expense
|
||||
sign: 1
|
||||
-
|
||||
-
|
||||
I create Cash Account Type.
|
||||
-
|
||||
-
|
||||
!record {model: account.account.type, id: account_account_type_cash0}:
|
||||
close_method: balance
|
||||
code: Cash
|
||||
name: Cash
|
||||
sign: 1
|
||||
-
|
||||
-
|
||||
I create Minimal Chart Account.
|
||||
-
|
||||
-
|
||||
!record {model: account.account, id: account_account_minimalchart0}:
|
||||
code: '0'
|
||||
company_id: base.main_company
|
||||
@@ -46,9 +46,9 @@
|
||||
parent_right: 12
|
||||
type: view
|
||||
user_type: account_account_type_view0
|
||||
-
|
||||
-
|
||||
I create Payable Account.
|
||||
-
|
||||
-
|
||||
!record {model: account.account, id: account_account_payable1}:
|
||||
code: AP
|
||||
company_id: base.main_company
|
||||
@@ -60,12 +60,11 @@
|
||||
reconcile: true
|
||||
type: payable
|
||||
user_type: account_account_type_expense0
|
||||
-
|
||||
-
|
||||
I create Receivable Account.
|
||||
-
|
||||
-
|
||||
!record {model: account.account, id: account_account_receivable0}:
|
||||
code: AR
|
||||
company_id: base.main_company
|
||||
currency_mode: current
|
||||
name: Receivable
|
||||
parent_id: account_account_minimalchart0
|
||||
@@ -74,9 +73,9 @@
|
||||
reconcile: true
|
||||
type: receivable
|
||||
user_type: account_account_type_income0
|
||||
-
|
||||
-
|
||||
I create Cash Account.
|
||||
-
|
||||
-
|
||||
!record {model: account.account, id: account_account_cash0}:
|
||||
code: C
|
||||
company_id: base.main_company
|
||||
@@ -87,9 +86,9 @@
|
||||
parent_right: 7
|
||||
type: other
|
||||
user_type: account_account_type_cash0
|
||||
-
|
||||
-
|
||||
I create Purchases Account.
|
||||
-
|
||||
-
|
||||
!record {model: account.account, id: account_account_purchases0}:
|
||||
code: P
|
||||
company_id: base.main_company
|
||||
@@ -100,9 +99,9 @@
|
||||
parent_right: 9
|
||||
type: other
|
||||
user_type: account_account_type_expense0
|
||||
-
|
||||
-
|
||||
I create Sales Account.
|
||||
-
|
||||
-
|
||||
!record {model: account.account, id: account_account_sales0}:
|
||||
code: S
|
||||
company_id: base.main_company
|
||||
@@ -113,9 +112,9 @@
|
||||
parent_right: 11
|
||||
type: other
|
||||
user_type: account_account_type_income0
|
||||
-
|
||||
-
|
||||
I create Purchase Journal.
|
||||
-
|
||||
-
|
||||
!record {model: account.journal, id: account_journal_purchasejournal0}:
|
||||
code: PUJ
|
||||
company_id: base.main_company
|
||||
@@ -125,9 +124,9 @@
|
||||
sequence_id: account.sequence_purchase_journal
|
||||
type: purchase
|
||||
view_id: account.account_journal_view
|
||||
-
|
||||
-
|
||||
I create Sale Journal.
|
||||
-
|
||||
-
|
||||
!record {model: account.journal, id: account_journal_salejournal0}:
|
||||
code: SAJ
|
||||
company_id: base.main_company
|
||||
@@ -137,84 +136,83 @@
|
||||
sequence_id: account.sequence_sale_journal
|
||||
type: sale
|
||||
view_id: account.account_journal_view
|
||||
-
|
||||
-
|
||||
I create Bank Journal.
|
||||
-
|
||||
-
|
||||
!record {model: account.journal, id: account_journal_bankjournal0}:
|
||||
code: BNK
|
||||
company_id: base.main_company
|
||||
default_credit_account_id: account_account_cash0
|
||||
default_debit_account_id: account_account_cash0
|
||||
name: Bank Journal
|
||||
sequence_id: account.sequence_journal
|
||||
type: cash
|
||||
view_id: account.account_journal_bank_view
|
||||
-
|
||||
-
|
||||
I create ir.property for account payable.
|
||||
-
|
||||
-
|
||||
!record {model: ir.property, id: ir_property_propertyaccountexpensecateg0}:
|
||||
company_id: base.main_company
|
||||
fields_id: account.field_res_partner_property_account_payable
|
||||
name: property_account_expense_categ
|
||||
value_reference: account.account,5
|
||||
-
|
||||
-
|
||||
I create ir.property for account receivable.
|
||||
-
|
||||
-
|
||||
!record {model: ir.property, id: ir_property_propertyaccountincomecateg0}:
|
||||
company_id: base.main_company
|
||||
fields_id: account.field_res_partner_property_account_receivable
|
||||
name: property_account_income_categ
|
||||
value_reference: account.account,6
|
||||
-
|
||||
-
|
||||
I create Partner category Customers.
|
||||
-
|
||||
-
|
||||
!record {model: res.partner.category, id: res_partner_category_customers0}:
|
||||
name: Customers
|
||||
-
|
||||
I create Cleartrail Customer.
|
||||
-
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_cleartrail0}:
|
||||
category_id:
|
||||
- res_partner_category_customers0
|
||||
name: Cleartrail
|
||||
-
|
||||
-
|
||||
I create contact address for Cleartrail.
|
||||
-
|
||||
-
|
||||
!record {model: res.partner.address, id: res_partner_address_1}:
|
||||
partner_id: res_partner_cleartrail0
|
||||
street: onam plaza, 14 B palasia A B Road
|
||||
type: contact
|
||||
-
|
||||
-
|
||||
I create invoice address for Cleartrail.
|
||||
-
|
||||
-
|
||||
!record {model: res.partner.address, id: res_partner_address_2}:
|
||||
partner_id: res_partner_cleartrail0
|
||||
street: sarda house 24 B palasia, A B Road
|
||||
type: invoice
|
||||
-
|
||||
-
|
||||
I create delivery address for Cleartrail.
|
||||
-
|
||||
-
|
||||
!record {model: res.partner.address, id: res_partner_address_3}:
|
||||
partner_id: res_partner_cleartrail0
|
||||
street: sangam house 15 B palasia, A B Road
|
||||
type: delivery
|
||||
-
|
||||
Customer Cleartrail has specific instrument requirement regarding the stockable products.
|
||||
-
|
||||
-
|
||||
I define product category Mobile Products Sellable.
|
||||
-
|
||||
-
|
||||
!record {model: product.category, id: product_category_allproductssellable0}:
|
||||
name: Mobile Products Sellable
|
||||
|
||||
|
||||
-
|
||||
I define product category Mobile Services.
|
||||
-
|
||||
|
||||
|
||||
-
|
||||
I define product category Mobile Services.
|
||||
-
|
||||
!record {model: product.category, id: product_category_services0}:
|
||||
name: Mobile Services
|
||||
-
|
||||
-
|
||||
I define LG Viewty Smart product template.
|
||||
-
|
||||
-
|
||||
!record {model: product.template, id: product_template_lgviewtysmart0}:
|
||||
categ_id: product_category_allproductssellable0
|
||||
cost_method: standard
|
||||
@@ -227,9 +225,9 @@
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
-
|
||||
-
|
||||
I define LG Viewty Smart product.
|
||||
-
|
||||
-
|
||||
!record {model: product.product, id: product_product_lgviewtysmart0}:
|
||||
categ_id: product_category_allproductssellable0
|
||||
cost_method: standard
|
||||
@@ -249,7 +247,7 @@
|
||||
uom_po_id: product.product_uom_unit
|
||||
-
|
||||
I create a Sale Order for LG Viewty Smart for qty 500 having order_policy prepaid.
|
||||
-
|
||||
-
|
||||
!record {model: sale.order, id: sale_order_so1}:
|
||||
date_order: '2010-05-03'
|
||||
invoice_quantity: order
|
||||
@@ -273,11 +271,11 @@
|
||||
picking_policy: direct
|
||||
pricelist_id: product.list0
|
||||
shop_id: sale.shop
|
||||
|
||||
|
||||
-
|
||||
|
||||
|
||||
-
|
||||
I confirm the sale order.
|
||||
-
|
||||
-
|
||||
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so1}
|
||||
-
|
||||
I will verify whether the invoice has been generated for SO since Shipping policy is 'Payment Before Delivery'
|
||||
@@ -285,67 +283,67 @@
|
||||
!python {model: sale.order}: |
|
||||
so = self.browse(cr, uid, ref("sale_order_so1"))
|
||||
assert so.invoice_ids, "Invoices has not been generated for sale_order_so1"
|
||||
-
|
||||
-
|
||||
I open the Invoice for the SO.
|
||||
-
|
||||
-
|
||||
!python {model: account.invoice}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
import netsvc
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
invoice_ids = so.invoice_ids
|
||||
for invoice in invoice_ids:
|
||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
-
|
||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
|
||||
amount: 85000.0
|
||||
date: '2010-05-10'
|
||||
journal_id: sale.account_journal_bankjournal0
|
||||
name: tst
|
||||
period_id: account.period_5
|
||||
-
|
||||
-
|
||||
I pay the invoice.
|
||||
-
|
||||
-
|
||||
!python {model: account.invoice.pay}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
|
||||
False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
|
||||
"out_invoice", "active_id": so.invoice_ids[0].id, })
|
||||
|
||||
|
||||
-
|
||||
|
||||
|
||||
-
|
||||
Creating an account invoice pay writeoff entry.
|
||||
-
|
||||
-
|
||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
||||
analytic_id: account.analytic_customers
|
||||
comment: Write-Off
|
||||
writeoff_acc_id: account.a_sale
|
||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
||||
|
||||
|
||||
-
|
||||
|
||||
|
||||
-
|
||||
Pay and Reconcile the Invoice.
|
||||
-
|
||||
-
|
||||
!python {model: account.invoice.pay.writeoff}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
||||
[so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id })
|
||||
|
||||
|
||||
|
||||
|
||||
-
|
||||
I will verify the picking associated with the sale order sale_order_so1
|
||||
-
|
||||
-
|
||||
!python {model: sale.order}: |
|
||||
so = self.browse(cr, uid, ref("sale_order_so1"))
|
||||
assert so.picking_ids,"Picking has not been generated for sale_order_so1"
|
||||
-
|
||||
-
|
||||
Products are delivered to the Cleartrail Customer.
|
||||
-
|
||||
-
|
||||
!python {model: stock.picking }: |
|
||||
import time
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
@@ -371,9 +369,9 @@
|
||||
-
|
||||
!python {model: stock.picking }: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
|
||||
|
||||
|
||||
if picking_id:
|
||||
pick = self.browse(cr,uid,picking_id[0])
|
||||
assert (pick.state) =='done', "Picking for SO is not in done state."
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Managing sales and deliveries by journal',
|
||||
'version': '1.0',
|
||||
@@ -49,7 +48,7 @@
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': ['stock', 'sale'],
|
||||
'depends': ['sale'],
|
||||
'init_xml': ['sale_journal_data.xml'],
|
||||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
|
||||
from osv import osv, fields
|
||||
import netsvc
|
||||
import time
|
||||
from tools.translate import _
|
||||
|
||||
class sale_journal_invoice_type(osv.osv):
|
||||
@@ -34,8 +34,8 @@ class sale_journal_invoice_type(osv.osv):
|
||||
'invoicing_method': fields.selection([('simple','Non grouped'),('grouped','Grouped')], 'Invoicing method', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'active': lambda *a: True,
|
||||
'invoicing_method': lambda *a:'simple'
|
||||
'active': True,
|
||||
'invoicing_method': 'simple'
|
||||
}
|
||||
sale_journal_invoice_type()
|
||||
|
||||
@@ -60,12 +60,12 @@ class sale_journal(osv.osv):
|
||||
'note': fields.text('Note'),
|
||||
}
|
||||
_defaults = {
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'date_created': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'date': time.strftime('%Y-%m-%d'),
|
||||
'date_created': time.strftime('%Y-%m-%d'),
|
||||
'user_id': lambda self,cr,uid,context: uid,
|
||||
'state': lambda self,cr,uid,context: 'draft',
|
||||
}
|
||||
|
||||
|
||||
def button_sale_cancel(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'cancel'})
|
||||
for id in ids:
|
||||
@@ -75,9 +75,9 @@ class sale_journal(osv.osv):
|
||||
wf_service.trg_validate(uid, 'sale.order', saleid, 'cancel', cr)
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale order of Journal') + " '" + name + "' "+ _("is cancelled")
|
||||
self.log(cr, uid, id, message)
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
|
||||
def button_sale_confirm(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'confirm'})
|
||||
for id in ids:
|
||||
@@ -87,30 +87,30 @@ class sale_journal(osv.osv):
|
||||
wf_service.trg_validate(uid, 'sale.order', saleid, 'order_confirm', cr)
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale orders of Journal') + " '" + name + "' "+ _("is confirmed")
|
||||
self.log(cr, uid, id, message)
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
def button_open(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'open'})
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale orders of Journal') + " '" + name + "' "+ _("is opened")
|
||||
self.log(cr, uid, id, message)
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
|
||||
def button_draft(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'draft'})
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale orders of Journal') + " '" + name + "' "+ _("is in draft state")
|
||||
self.log(cr, uid, id, message)
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
|
||||
def button_close(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state':'done', 'date_validation':time.strftime('%Y-%m-%d')})
|
||||
for (id,name) in self.name_get(cr, uid, ids):
|
||||
message = _('Sale orders of Journal') + " '" + name + "' "+ _("is closed")
|
||||
self.log(cr, uid, id, message)
|
||||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
|
||||
sale_journal()
|
||||
|
||||
class picking_journal(osv.osv):
|
||||
|
||||
@@ -25,7 +25,8 @@ from tools import config
|
||||
class sale_order_line(osv.osv):
|
||||
_name = "sale.order.line"
|
||||
_inherit = "sale.order.line"
|
||||
def _product_margin(self, cr, uid, ids, field_name, arg, context):
|
||||
|
||||
def _product_margin(self, cr, uid, ids, field_name, arg, context=None):
|
||||
res = {}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
res[line.id] = 0
|
||||
@@ -46,7 +47,7 @@ sale_order_line()
|
||||
class sale_order(osv.osv):
|
||||
_inherit = "sale.order"
|
||||
|
||||
def _product_margin(self, cr, uid, ids, field_name, arg, context):
|
||||
def _product_margin(self, cr, uid, ids, field_name, arg, context=None):
|
||||
result = {}
|
||||
for sale in self.browse(cr, uid, ids, context=context):
|
||||
result[sale.id] = 0.0
|
||||
@@ -69,14 +70,13 @@ class stock_picking(osv.osv):
|
||||
|
||||
def create_invoice(self, cr, uid, ids, *args):
|
||||
# need to carify with new requirement
|
||||
res = False
|
||||
invoice_ids = []
|
||||
margin_deduce = 0.0
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
picking_obj.write(cr, uid, ids, {'invoice_state' : '2binvoiced'})
|
||||
res = picking_obj.action_invoice_create(cr, uid, ids, type='out_invoice', context={})
|
||||
invoice_ids = res.values()
|
||||
picking_obj.write(cr, uid, ids,{'invoice_ids':[[6,0,invoice_ids]]})
|
||||
picking_obj.write(cr, uid, ids,{'invoice_ids': [[6,0,invoice_ids]]})
|
||||
return True
|
||||
|
||||
stock_picking()
|
||||
|
||||
@@ -25,9 +25,10 @@
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/Sales & MRP',
|
||||
'description': """
|
||||
This module provides facility to the user to install mrp and sale modules
|
||||
at a time. It is basically used when we want to keep track of production
|
||||
This module provides facility to the user to install mrp and sale modules
|
||||
at a time. It is basically used when we want to keep track of production
|
||||
orders generated from sale orders.
|
||||
It adds sale name and sale Reference on production order
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
|
||||
+19
-6
@@ -305,23 +305,31 @@ class scrum_meeting(osv.osv):
|
||||
}
|
||||
|
||||
def button_send_to_master(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
meeting_id = self.browse(cr, uid, ids)[0]
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
if meeting_id and meeting_id.sprint_id.scrum_master_id.user_email:
|
||||
self.email_send(cr, uid, ids, email)
|
||||
email = meeting_id.sprint_id.scrum_master_id.user_email
|
||||
if email:
|
||||
self.email_send(cr, uid, ids, email, context=context)
|
||||
else:
|
||||
raise osv.except_osv(_('Error !'), _('Please provide email address for scrum master defined on sprint.'))
|
||||
return True
|
||||
|
||||
def button_send_product_owner(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
context.update({'button_send_product_owner': True})
|
||||
meeting_id = self.browse(cr, uid, ids)[0]
|
||||
if meeting_id.sprint_id.product_owner_id.user_email:
|
||||
self.email_send(cr,uid,ids,email)
|
||||
email = meeting_id.sprint_id.product_owner_id.user_email
|
||||
if email:
|
||||
self.email_send(cr, uid, ids, email, context=context)
|
||||
else:
|
||||
raise osv.except_osv(_('Error !'), _('Please provide email address for product owner defined on sprint.'))
|
||||
return True
|
||||
|
||||
def email_send(self, cr, uid, ids, email, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
email_from = tools.config.get('email_from', False)
|
||||
meeting_id = self.browse(cr,uid,ids)[0]
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
@@ -332,7 +340,12 @@ class scrum_meeting(osv.osv):
|
||||
sub_name = meeting_id.name or 'Scrum Meeting of %s '%meeting_id.date
|
||||
flag = tools.email_send(user_email , [email], sub_name, body, reply_to=None, openobject_id=str(meeting_id.id))
|
||||
if not flag:
|
||||
raise osv.except_osv(_('Error !'), _(' Email Not send to %s!' % meeting_id.sprint_id.product_owner_id.name))
|
||||
if context.get('button_send_product_owner', False):
|
||||
raise osv.except_osv(_('Error !'), _(' Email Not send to the product owner %s!' % meeting_id.sprint_id.product_owner_id.name))
|
||||
raise osv.except_osv(_('Error !'), _(' Email Not send to the scrum master %s!' % meeting_id.sprint_id.scrum_master_id.name))
|
||||
if context.get('button_send_product_owner', False):
|
||||
raise osv.except_osv(_('Information !'), _(' Email send successfully to product owner %s!' % meeting_id.sprint_id.product_owner_id.name))
|
||||
raise osv.except_osv(_('Information!'), _(' Email send successfully to scrum master %s!'% meeting_id.sprint_id.scrum_master_id.name))
|
||||
return True
|
||||
|
||||
scrum_meeting()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<field name="expected_hours" sum="Planned hours" widget="float_time"/>
|
||||
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-execute"/>
|
||||
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
|
||||
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending" icon="gtk-execute"/>
|
||||
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
|
||||
@@ -61,7 +61,7 @@
|
||||
<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="button_postpone" string="Post Pone" type="object"
|
||||
<button name="button_postpone" string="Post Pone" type="object"
|
||||
help="Post Pone backlog" colspan="2"
|
||||
icon="gtk-convert" attrs="{'invisible':[('state','=','done')]}"/>
|
||||
<field name="user_id" select="1"/>
|
||||
@@ -198,7 +198,7 @@
|
||||
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
|
||||
<field name="expected_hours" sum="Planned hours" widget="float_time"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-execute"/>
|
||||
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
|
||||
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
|
||||
|
||||
@@ -2,8 +2,14 @@
|
||||
"access_scrum_sprint","scrum.sprint","model_scrum_sprint","project.group_project_user",1,0,0,0
|
||||
"access_scrum_product_backlog","scrum.product.backlog","model_scrum_product_backlog","project.group_project_user",1,1,1,1
|
||||
"access_scrum_meeting","scrum.meeting","model_scrum_meeting","project.group_project_user",1,0,0,0
|
||||
"access_product_uom_project_user","product.uom project user","product.model_product_uom","project.group_project_user",1,0,0,0
|
||||
"access_backlog_create_task_user","backlog.create.task user","model_backlog_create_task","project.group_project_user",1,1,1,1
|
||||
"access_scrum_backlog_merge_user","scrum.backlog.merge user","model_scrum_backlog_merge","project.group_project_user",1,1,1,1
|
||||
"access_backlog_assign_sprint_user ","backlog.assign.sprint user","model_backlog_assign_sprint","project.group_project_user",1,0,0,0
|
||||
"access_scrum_meeting_manager","scrum.meeting.manager","model_scrum_meeting","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_sprint_manager","scrum.sprint.manager","model_scrum_sprint","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_product_backlog_manager","scrum.product.backlog manager","model_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
|
||||
"access_backlog_create_task_manager","backlog.create.task manager","model_backlog_create_task","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_backlog_merge_manager","scrum.backlog.merge manager","model_scrum_backlog_merge","project.group_project_manager",1,1,1,1
|
||||
"access_backlog_assign_sprint_manager","backlog.assign.sprint manager","model_backlog_assign_sprint","project.group_project_manager",1,1,1,1
|
||||
|
||||
|
@@ -12,16 +12,16 @@
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Request link
|
||||
-->
|
||||
Request link
|
||||
-->
|
||||
<record id="req_link_tracking" model="res.request.link">
|
||||
<field name="name">Production Lot</field>
|
||||
<field name="object">stock.production.lot</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: stock.location
|
||||
-->
|
||||
Resource: stock.location
|
||||
-->
|
||||
<record id="stock_location_locations" model="stock.location">
|
||||
<field name="name">Physical Locations</field>
|
||||
<field name="usage">view</field>
|
||||
@@ -41,6 +41,7 @@
|
||||
<field name="name">Scraped</field>
|
||||
<field name="location_id" ref="stock_location_locations_virtual"/>
|
||||
<field name="scrap_location">True</field>
|
||||
<field name="usage">inventory</field>
|
||||
</record>
|
||||
|
||||
<record id="location_inventory" model="stock.location">
|
||||
@@ -85,8 +86,8 @@
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Properties
|
||||
-->
|
||||
Properties
|
||||
-->
|
||||
<record forcecreate="True" id="property_stock_supplier" model="ir.property">
|
||||
<field name="name">property_stock_supplier</field>
|
||||
<field name="fields_id" search="[('model','=','res.partner'),('name','=','property_stock_supplier')]"/>
|
||||
@@ -115,8 +116,8 @@
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: stock.warehouse
|
||||
-->
|
||||
Resource: stock.warehouse
|
||||
-->
|
||||
<record id="warehouse0" model="stock.warehouse">
|
||||
<field model="res.company" name="name" search="[]" use="name"/>
|
||||
<field name="lot_input_id" ref="stock_location_stock"/>
|
||||
|
||||
Reference in New Issue
Block a user