Merge branch 'assert'
Conflicts: server/bin/addons/account/__terp__.py bzr revid: ced-6067f0de9949ffe16356931f8c49b778848a7c93
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
"account_demo.xml",
|
||||
"project/project_demo.xml",
|
||||
"project/analytic_account_demo.xml",
|
||||
"account_unit_test.xml",
|
||||
],
|
||||
"update_xml" : [
|
||||
"account_wizard.xml",
|
||||
@@ -36,6 +37,8 @@
|
||||
"project/project_report.xml",
|
||||
"product_data.xml",
|
||||
"product_view.xml",
|
||||
|
||||
"account_assert_test.xml",
|
||||
],
|
||||
# "translations" : {
|
||||
# "fr": "i18n/french_fr.csv"
|
||||
|
||||
@@ -175,7 +175,9 @@ class account_account(osv.osv):
|
||||
|
||||
def _balance(self, cr, uid, ids, field_name, arg, context={}):
|
||||
if not 'fiscalyear' in context:
|
||||
context['fiscalyear'] = self.pool.get('account.fiscalyear').find(cr, uid)
|
||||
context['fiscalyear'] = self.pool.get('account.fiscalyear').find(cr, uid, exception=False)
|
||||
if not context['fiscalyear']:
|
||||
return dict(map(lambda x: (x, 0.0), ids))
|
||||
|
||||
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])
|
||||
acc_set = ",".join(map(str, ids2))
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<data>
|
||||
<assert model="account.move" search="[]" string="For all account moves, the state is valid implies that the sum of credits equals the sum of debits">
|
||||
<test expr="not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) == 0)" />
|
||||
</assert>
|
||||
|
||||
<!--assert model="account.invoice" search="[]" string="If the invoice is paid, third party accounting lines must be reconciled">
|
||||
<test expr="not state == 'paid' or ..." />
|
||||
</assert-->
|
||||
|
||||
<assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
|
||||
<test expr="not len(child_id) or balance == sum([c.balance for c in child_id])" />
|
||||
</assert>
|
||||
|
||||
<assert model="account.move.line" search="[('account_id.type', '=', 'view')]" string="Accounts of view type do not contain any move line">
|
||||
<test expr="False" />
|
||||
</assert>
|
||||
|
||||
<assert model="account.invoice" search="[('state', 'in', ['paid', 'open'])]" string="The total amount of all paid or open invoices si correctly computed">
|
||||
<test expr="sum([l.price_subtotal for l in invoice_line]) == amount_untaxed" />
|
||||
</assert>
|
||||
|
||||
<assert model="account.move.reconcile" search="[]" string="For each reconciliation, the sum of credits equals the sum of debits">
|
||||
<test expr="sum([l.debit - l.credit for l in line_id]) == 0" />
|
||||
</assert>
|
||||
|
||||
<assert model="account.account" search="[]" string="Every account must have at least one parent account of type '0'">
|
||||
<test expr="not parent_id or '0' in [p.code for p in parent_id]" />
|
||||
</assert>
|
||||
</data>
|
||||
</terp>
|
||||
@@ -298,8 +298,7 @@ class account_move_line(osv.osv):
|
||||
raise osv.except_osv('Error', 'The account is not defined to be reconcile !')
|
||||
if r[0][1] != None:
|
||||
raise Exception('Some entries are already reconciled !')
|
||||
if not self.pool.get('res.currency').is_zero(cr, uid,
|
||||
account.company_id.currency_id, writeoff):
|
||||
if not self.pool.get('res.currency').is_zero(cr, uid, account.company_id.currency_id, writeoff):
|
||||
if not writeoff_acc_id:
|
||||
raise osv.except_osv('Warning', 'You have to provide an account for the write off entry !')
|
||||
if writeoff > 0:
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<data>
|
||||
<!-- This file must be loaded _after_ account_demo.xml ! -->
|
||||
<record model="account.invoice" id="test_invoice_1">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="address_invoice_id" ref="base.res_partner_address_tang"/>
|
||||
<field name="partner_id" ref="base.res_partner_asus"/>
|
||||
<field name="journal_id" ref="account.sales_journal"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="type">out_invoice</field>
|
||||
<field name="account_id" ref="account.a_recv"/>
|
||||
<field name="name">Test invoice 1</field>
|
||||
<field name="address_contact_id" ref="base.res_partner_address_tang"/>
|
||||
</record>
|
||||
<record model="account.invoice.line" id="test_invoice_1_line_1">
|
||||
<field name="name">Basic computer with Dvorak keyboard and left-handed mouse</field>
|
||||
<field name="invoice_id" ref="test_invoice_1"/>
|
||||
<field name="price_unit">250</field>
|
||||
<field name="quantity">1</field>
|
||||
<field name="account_id" ref="account.a_sale"/>
|
||||
</record>
|
||||
<record model="account.invoice.line" id="test_invoice_1_line_2">
|
||||
<field name="name">Little server with raid 1 and 512ECC ram</field>
|
||||
<field name="invoice_id" ref="test_invoice_1"/>
|
||||
<field name="price_unit">800</field>
|
||||
<field name="quantity">2</field>
|
||||
<field name="account_id" ref="account.a_sale"/>
|
||||
</record>
|
||||
|
||||
<assert model="account.invoice" id="test_invoice_1" string="The currency unit of Test invoice 1 is EUR">
|
||||
<test expr="currency_id.code">EUR</test>
|
||||
</assert>
|
||||
|
||||
<assert model="account.invoice" id="test_invoice_1" string="The amount of Test invoice 1 is correct" severity="error">
|
||||
<test expr="sum([l.price_subtotal for l in invoice_line]) == 1850" />
|
||||
<test expr="sum([l.price_subtotal for l in invoice_line]) == amount_untaxed" />
|
||||
</assert>
|
||||
|
||||
<workflow model="account.invoice" ref="test_invoice_1" action="invoice_open" />
|
||||
|
||||
<assert model="account.invoice" id="test_invoice_1" string="Test invoice 1 is now open">
|
||||
<test expr="state">open</test>
|
||||
</assert>
|
||||
|
||||
<!--
|
||||
journal_id: bank_journal
|
||||
period_id: period_7 (or 'period_' +time.strftime('m'))
|
||||
pay_amount: 1850 (or amount_total)
|
||||
acc_id = pool.get('account.journal').browse(cr, uid, journal_id, context).default_credit_account_id.id
|
||||
pay_and_reconcile(self, cr, uid,
|
||||
ids,
|
||||
pay_amount,
|
||||
pay_account_id,
|
||||
period_id,
|
||||
pay_journal_id,
|
||||
writeoff_acc_id,
|
||||
writeoff_period_id,
|
||||
writeoff_journal_id,
|
||||
context={}):
|
||||
-->
|
||||
<function model="account.invoice" name="pay_and_reconcile">
|
||||
<value eval="[ref('test_invoice_1')]" />
|
||||
<value eval="1850" />
|
||||
<value eval="ref('cash')" />
|
||||
<value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
|
||||
<value eval="ref('bank_journal')" />
|
||||
<value eval="False" />
|
||||
<value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
|
||||
<value eval="False" />
|
||||
</function>
|
||||
|
||||
<assert model="account.invoice" id="test_invoice_1" string="Test invoice 1 is now paid">
|
||||
<test expr="state">paid</test>
|
||||
</assert>
|
||||
</data>
|
||||
</terp>
|
||||
@@ -13,14 +13,14 @@
|
||||
<field name="name">Sample invoice</field>
|
||||
<field name="address_contact_id" ref="base.res_partner_address_tang"/>
|
||||
</record>
|
||||
<record model="account.invoice.line">
|
||||
<record model="account.invoice.line" id="ceci_est_une_facture_line_1">
|
||||
<field name="name">Basic computer with Dvorak keyboard and left-handed mouse</field>
|
||||
<field name="invoice_id" ref="ceci_est_une_facture"/>
|
||||
<field name="price_unit">250</field>
|
||||
<field name="quantity">1</field>
|
||||
<field name="account_id" ref="account.a_sale"/>
|
||||
</record>
|
||||
<record model="account.invoice.line">
|
||||
<record model="account.invoice.line" id="ceci_est_une_facture_line_2">
|
||||
<field name="name">Little server with raid 1 and 512ECC ram</field>
|
||||
<field name="invoice_id" ref="ceci_est_une_facture"/>
|
||||
<field name="price_unit">800</field>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"depends" : ["base", "account", "stock"],
|
||||
"category" : "Generic Modules/Sales & Purchases",
|
||||
"init_xml" : [],
|
||||
"demo_xml" : ["purchase_demo.xml"],
|
||||
"demo_xml" : ["purchase_demo.xml", "purchase_unit_test.xml"],
|
||||
"update_xml" : [
|
||||
"purchase_workflow.xml",
|
||||
"purchase_sequence.xml",
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<data>
|
||||
<!-- Resource: purchase.order -->
|
||||
<!--
|
||||
Optional fields:
|
||||
'name': fields.char('Order Description', size=64, required=True, select=True),
|
||||
'origin': fields.char('Origin', size=64),
|
||||
'ref': fields.char('Order Reference', size=64),
|
||||
'partner_ref': fields.char('Partner Reference', size=64),
|
||||
'dest_address_id':fields.many2one('res.partner.address', 'Destination Address', states={'posted':[('readonly',True)]}),
|
||||
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'posted':[('readonly',True)]}),
|
||||
'invoice_method': fields.selection([('manual','Manual'),('order','From order'),('picking','From picking')], 'Invoicing method', required=True),
|
||||
|
||||
Mandatory fields:
|
||||
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}),
|
||||
'partner_id':fields.many2one('res.partner', 'Partner', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}, change_default=True),
|
||||
'partner_address_id':fields.many2one('res.partner.address', 'Address', required=True, states={'posted':[('readonly',True)]}),
|
||||
'location_id': fields.many2one('stock.location', 'Delivery destination', required=True),
|
||||
|
||||
*2many relationships:
|
||||
'order_line': fields.one2many('purchase.order.line', 'order_id', 'Order State', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)]}),
|
||||
'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True),
|
||||
-->
|
||||
<record model="purchase.order" id="test_purchase_1">
|
||||
<field name="name">Test purchase</field>
|
||||
<field name="dest_address_id" search="[]" model="res.partner.address"/>
|
||||
<field name="pricelist_id" ref="list0"/>
|
||||
<field name="partner_id" search="[]" model="res.partner"/>
|
||||
<field name="partner_address_id" search="[]" model="res.partner.address"/>
|
||||
<field name="location_id" search="[]" model="stock.location"/>
|
||||
</record>
|
||||
<!-- Resource: purchase.order.line -->
|
||||
<!--
|
||||
Optinal fields:
|
||||
'name': fields.char('Description', size=64, required=True),
|
||||
'product_qty': fields.float('Quantity', required=True, digits=(16,2)),
|
||||
'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),
|
||||
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
|
||||
'notes': fields.text('Notes'),
|
||||
'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),
|
||||
|
||||
Mandatory fields:
|
||||
'date_planned': fields.date('Date Promised', required=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),
|
||||
'price_unit': fields.float('Unit Price', required=True, digits=(16, int(config['price_accuracy']))),
|
||||
'order_id': fields.many2one('purchase.order', 'Order Ref', select=True, required=True, ondelete='cascade'),
|
||||
-->
|
||||
<record model="purchase.order.line" id="test_purchase_1_line_1">
|
||||
<field name="order_id" ref="test_purchase_1"/>
|
||||
<field name="name">[PC1] Basic PC</field>
|
||||
<field name="date_planned" eval="time.strftime('%Y-%m-%d', time.localtime(time.time() + 2 * 86400))" />
|
||||
<field name="product_id" ref="product.product_product_pc1"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="price_unit">450</field>
|
||||
<field name="product_qty">2</field>
|
||||
</record>
|
||||
<record model="purchase.order.line" id="test_purchase_1_line_3">
|
||||
<field name="order_id" ref="test_purchase_1"/>
|
||||
<field name="name">[MB1] Mainboard ASUStek A7N8X</field>
|
||||
<field name="date_planned" eval="time.strftime('%Y-%m-%d', time.localtime(time.time() + 2 * 86400))" />
|
||||
<field name="product_id" ref="product.product_product_mb1"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="price_unit">88</field>
|
||||
<field name="product_qty">3</field>
|
||||
</record>
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="The amount of Test purchase is correctly computed" severity="error">
|
||||
<test expr="sum([l.price_subtotal for l in order_line]) == amount_untaxed" />
|
||||
</assert>
|
||||
|
||||
<workflow model="purchase.order" ref="test_purchase_1" action="purchase_confirm" />
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase is now confirmed">
|
||||
<test expr="state">confirmed</test>
|
||||
</assert>
|
||||
|
||||
<workflow model="purchase.order" ref="test_purchase_1" action="purchase_approve" uid="base.user_admin" />
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase is now in progress">
|
||||
<test expr="state">approved</test>
|
||||
</assert>
|
||||
|
||||
<!-- Treat generated invoice -->
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase has now a corresponding invoice" severity="fatal">
|
||||
<test expr="bool(invoice_id)" />
|
||||
</assert>
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase's invoice has the same amount and is currently a draft" severity="error">
|
||||
<test expr="invoice_id.amount_untaxed == amount_untaxed" />
|
||||
<test expr="invoice_id.amount_total == amount_total" />
|
||||
<test expr="invoice_id.state">draft</test>
|
||||
</assert>
|
||||
|
||||
<workflow model="account.invoice" action="invoice_open">
|
||||
<value model="purchase.order" eval="obj(ref('test_purchase_1')).invoice_id.id" />
|
||||
</workflow>
|
||||
|
||||
<function model="account.invoice" name="pay_and_reconcile">
|
||||
<value model="purchase.order" eval="[obj(ref('test_purchase_1')).invoice_id.id]" />
|
||||
<value eval="1164" />
|
||||
<value eval="ref('account.cash')" />
|
||||
<value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
|
||||
<value eval="ref('account.bank_journal')" />
|
||||
<value eval="False" />
|
||||
<value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
|
||||
<value eval="False" />
|
||||
</function>
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase's invoice is now paid" severity="error">
|
||||
<test expr="invoice_id.state">paid</test>
|
||||
</assert>
|
||||
|
||||
<!-- Treat generated picking -->
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase has now a corresponding packing" severity="fatal">
|
||||
<test expr="len(picking_ids) == 1" />
|
||||
</assert>
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase's packing will be sent to the good address" severity="error">
|
||||
<test expr="picking_ids[0].address_id == partner_address_id" />
|
||||
</assert>
|
||||
|
||||
<!-- Do the same as in wizard_partial_picking lines 143-144 -->
|
||||
<function model="stock.picking" name="action_move">
|
||||
<value model="purchase.order" eval="[obj(ref('test_purchase_1')).picking_ids[0].id]" />
|
||||
</function>
|
||||
|
||||
<workflow model="stock.picking" action="button_done">
|
||||
<value model="purchase.order" eval="obj(ref('test_purchase_1')).picking_ids[0].id" />
|
||||
</workflow>
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase's packing is now done" severity="error">
|
||||
<test expr="picking_ids[0].state">done</test>
|
||||
</assert>
|
||||
|
||||
<assert model="purchase.order" id="test_purchase_1" string="Test purchase is now completed" severity="fatal">
|
||||
<test expr="state">done</test>
|
||||
</assert>
|
||||
</data>
|
||||
</terp>
|
||||
@@ -6,7 +6,7 @@
|
||||
"depends" : ["product", "stock", "mrp"],
|
||||
"category" : "Generic Modules/Sales & Purchases",
|
||||
"init_xml" : [],
|
||||
"demo_xml" : ["sale_demo.xml"],
|
||||
"demo_xml" : ["sale_demo.xml", "sale_unit_test.xml"],
|
||||
"description": """
|
||||
The base module to manage quotations and sales orders.
|
||||
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<data>
|
||||
<!-- Resource: sale.order -->
|
||||
<record model="sale.order" id="test_order_1">
|
||||
<field name="name">Test order 1</field>
|
||||
<field name="shop_id" ref="shop"/>
|
||||
<field name="pricelist_id" search="[]" model="product.pricelist"/>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="partner_id" search="[]" model="res.partner"/>
|
||||
<field name="partner_invoice_id" search="[]" model="res.partner.address"/>
|
||||
<field name="partner_shipping_id" search="[]" model="res.partner.address"/>
|
||||
<field name="partner_order_id" search="[]" model="res.partner.address"/>
|
||||
</record>
|
||||
<!-- Resource: sale.order.line -->
|
||||
<record model="sale.order.line" id="test_order_1_line_1">
|
||||
<field name="order_id" ref="test_order_1"/>
|
||||
<field name="name">[PC1] Basic PC</field>
|
||||
<field name="product_id" ref="product.product_product_pc1"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="price_unit">450</field>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uos_qty">2</field>
|
||||
<field name="type">make_to_stock</field>
|
||||
</record>
|
||||
<record model="sale.order.line" id="test_order_1_line_3">
|
||||
<field name="order_id" ref="test_order_1"/>
|
||||
<field name="name">[RAM512] DDR 512MB PC400</field>
|
||||
<field name="product_id" ref="product.product_product_ram512"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="price_unit">90</field>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uos_qty">3</field>
|
||||
<field name="type">make_to_stock</field>
|
||||
</record>
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="The amount of Test order 1 is correctly computed" severity="error">
|
||||
<test expr="sum([l.price_subtotal for l in order_line]) == amount_untaxed" />
|
||||
</assert>
|
||||
|
||||
<workflow model="sale.order" ref="test_order_1" action="order_confirm" />
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1 is now in 'Manual in progress' state">
|
||||
<test expr="state">manual</test>
|
||||
</assert>
|
||||
|
||||
<workflow model="sale.order" ref="test_order_1" action="manual_invoice" uid="base.user_admin" />
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1 is now in progress">
|
||||
<test expr="state">progress</test>
|
||||
</assert>
|
||||
|
||||
<!-- Treat generated invoice -->
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1 has now a corresponding invoice" severity="fatal">
|
||||
<test expr="len(invoice_ids) == 1" />
|
||||
</assert>
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1's has the same amount and is currently a draft" severity="fatal">
|
||||
<test expr="invoice_ids[0].amount_untaxed == amount_untaxed" />
|
||||
<test expr="invoice_ids[0].amount_total == amount_total" />
|
||||
<test expr="invoice_ids[0].state">draft</test>
|
||||
</assert>
|
||||
|
||||
<workflow model="account.invoice" action="invoice_open">
|
||||
<value model="sale.order" eval="obj(ref('test_order_1')).invoice_ids[0].id" />
|
||||
</workflow>
|
||||
|
||||
<function model="account.invoice" name="pay_and_reconcile">
|
||||
<value model="sale.order" eval="[obj(ref('test_order_1')).invoice_ids[0].id]" />
|
||||
<value model="sale.order" eval="obj(ref('test_order_1')).amount_total" />
|
||||
<value eval="ref('account.cash')" />
|
||||
<value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
|
||||
<value eval="ref('account.bank_journal')" />
|
||||
<value eval="False" />
|
||||
<value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
|
||||
<value eval="False" />
|
||||
</function>
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1's invoice is now paid" severity="fatal">
|
||||
<test expr="invoice_ids[0].state">paid</test>
|
||||
</assert>
|
||||
|
||||
<!-- Treat generated picking -->
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1 has now a correspending packing" severity="fatal">
|
||||
<test expr="len(picking_ids) == 1" />
|
||||
</assert>
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1's picking will be sent to the good address and is already confirmed" severity="error">
|
||||
<test expr="picking_ids[0].address_id == partner_shipping_id" />
|
||||
<test expr="picking_ids[0].state">confirmed</test>
|
||||
</assert>
|
||||
|
||||
<!-- Here we need to use the function tag because action_assign is a method of stock_picking and not part of the workflow -->
|
||||
<function model="stock.picking" name="action_assign">
|
||||
<value model="sale.order" eval="[obj(ref('test_order_1')).picking_ids[0].id]" />
|
||||
</function>
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1's picking is now assigned" severity="fatal">
|
||||
<test expr="picking_ids[0].state">assigned</test>
|
||||
</assert>
|
||||
|
||||
<!-- Do the same as in wizard_partial_picking lines 143-144 -->
|
||||
<function model="stock.picking" name="action_move">
|
||||
<value model="sale.order" eval="[obj(ref('test_order_1')).picking_ids[0].id]" />
|
||||
</function>
|
||||
|
||||
<workflow model="stock.picking" action="button_done">
|
||||
<value model="sale.order" eval="obj(ref('test_order_1')).picking_ids[0].id" />
|
||||
</workflow>
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1's picking is now done">
|
||||
<test expr="picking_ids[0].state">done</test>
|
||||
</assert>
|
||||
|
||||
<!-- Run all schedulers -->
|
||||
<function model="mrp.procurement" name="run_scheduler" />
|
||||
|
||||
<assert model="sale.order" id="test_order_1" string="Test order 1 is now done">
|
||||
<test expr="state">done</test>
|
||||
</assert>
|
||||
</data>
|
||||
</terp>
|
||||
Reference in New Issue
Block a user