Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0] Add currency and Partner [Multi-Currency use] #1126

Open
wants to merge 8 commits into
base: 8.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions purchase_order_last_prices/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
Expand Down
3 changes: 1 addition & 2 deletions purchase_order_last_prices/__openerp__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
Expand Down
3 changes: 1 addition & 2 deletions purchase_order_last_prices/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
Expand Down
10 changes: 7 additions & 3 deletions purchase_order_last_prices/models/purchase_order.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
Expand All @@ -17,12 +16,17 @@
#
##############################################################################

from openerp import models, api
from openerp import fields, models, api


class PurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line'

currency = fields.Char(
related='order_id.currency_id.name',
string='Currency'
)

@api.multi
def action_purchase_product_prices(self):
id2 = self.env.ref(
Expand Down
2 changes: 2 additions & 0 deletions purchase_order_last_prices/views/purchase_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
<field name="product_id"/>
<field name="product_qty"/>
<field name="price_unit"/>
<field name="currency"/>
<field name="price_subtotal"/>
<field name="partner_id"/>
</tree>
</field>
</record>
Expand Down