[MERGE] Merge with dev-addons3 branch
bzr revid: psi@tinyerp.co.in-20100622120630-ic3strkwtoxzihei
This commit is contained in:
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -106,7 +106,7 @@ class scrum_sprint(osv.osv):
|
||||
'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, help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
|
||||
'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 Manager', required=True,help="The person who is maintains the processes for the product"),
|
||||
'meeting_ids': fields.one2many('scrum.meeting', 'sprint_id', 'Daily Scrum'),
|
||||
@@ -236,7 +236,7 @@ class scrum_product_backlog(osv.osv):
|
||||
'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, help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
|
||||
'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."),
|
||||
'user_id': fields.many2one('res.users', 'Responsible'),
|
||||
'sprint_id': fields.many2one('scrum.sprint', 'Sprint'),
|
||||
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user