Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
cc24fe2d
Commit
cc24fe2d
authored
14 years ago
by
Pankti Parikh
Committed by
Mustufa Rangwala
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] Sale: yaml improved for shipping
bzr revid: mra@mra-laptop-20100806132959-w24skraypvgxc0pq
parent
9ca0f71d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/sale/test/invoice_on_shipped_qty.yml
+19
-5
19 additions, 5 deletions
addons/sale/test/invoice_on_shipped_qty.yml
with
19 additions
and
5 deletions
addons/sale/test/invoice_on_shipped_qty.yml
+
19
−
5
View file @
cc24fe2d
-
In order to test the Sale module in OpenERP,
I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy '
Shipping & Manual Invoice
' and Invoice on 'Shipped quantities'
I create a Sale Order for Slider Mobile for 500 quantity having Shipping Policy '
Invoice from Picking
' and Invoice on 'Shipped quantities'
in order to create an invoice based on the shipping quantity
-
!record
{
model
:
sale.order
,
id
:
sale_order_so6
}
:
...
...
@@ -17,7 +17,7 @@
product_id
:
sale.product_product_slidermobile0
product_uos_qty
:
200.0
type
:
make_to_order
order_policy
:
manual
order_policy
:
picking
invoice_quantity
:
procurement
partner_id
:
sale.res_partner_cleartrail0
partner_invoice_id
:
sale.res_partner_address_2
...
...
@@ -65,9 +65,23 @@
}
self.do_partial(cr, uid, [pick.id],partial_datas)
-
I click on C
reate
I
nvoice
button to create the invoice.
Then I c
reate
i
nvoice
from picking
-
!workflow
{
model
:
sale.order
,
action
:
manual_invoice
,
ref
:
sale_order_so6
}
!record
{
model
:
stock.invoice.onshipping
,
id
:
stock_invoice_onshipping_6
}
:
invoice_date
:
'
2010-07-17'
journal_id
:
account.sales_journal
type
:
out_invoice
-
Then I click on 'Create Invoices' button
-
!python
{
model
:
stock.invoice.onshipping
}
:
|
sale_obj = self.pool.get('sale.order')
sale_id = sale_obj.browse(cr, uid, ref("sale_order_so6"))
picking_obj = self.pool.get('stock.picking')
ids = picking_obj.search(cr, uid, [('origin', '=', sale_id.name)])
self.create_invoice(cr, uid, [ref("stock_invoice_onshipping_6")], {"lang": "en_US",
"search_default_available": 1, "tz": False, "active_model": "stock.picking",
"contact_display": "partner", "active_ids": ids, "active_id": ids[0]})
-
I verify whether the invoice has been generated for SO
-
...
...
@@ -75,7 +89,7 @@
so = self.browse(cr, uid, ref("sale_order_so6"))
assert so.invoice_ids, "Invoices has not been generated for sale_order_so6"
-
I verify that an invoice is created on the basis of shipped quantity
I verify that an invoice is created on the basis of shipped quantity
-
!python
{
model
:
account.invoice
}
:
|
sale_order_obj = self.pool.get('sale.order')
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment