Add new field to invoice_line "product_price_list_type".
Fill this field in the done functions from the agronomics.weighing model. Add missing locales. Task #060189
This commit is contained in:
parent
720ba43f13
commit
839b27c316
|
@ -3,6 +3,7 @@
|
||||||
# the full copyright notices and license terms.
|
# the full copyright notices and license terms.
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from . import contract
|
from . import contract
|
||||||
|
from . import invoice
|
||||||
from . import party
|
from . import party
|
||||||
from . import plot
|
from . import plot
|
||||||
from . import product
|
from . import product
|
||||||
|
@ -18,6 +19,7 @@ def register():
|
||||||
contract.AgronomicsContractProductPriceListTypePriceList,
|
contract.AgronomicsContractProductPriceListTypePriceList,
|
||||||
contract.AgronomicsContract,
|
contract.AgronomicsContract,
|
||||||
contract.AgronomicsContractLine,
|
contract.AgronomicsContractLine,
|
||||||
|
invoice.InvoiceLine,
|
||||||
party.Party,
|
party.Party,
|
||||||
plot.Enclosure,
|
plot.Enclosure,
|
||||||
plot.Crop,
|
plot.Crop,
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
from trytond.report import Report
|
||||||
|
from trytond.pool import PoolMeta, Pool
|
||||||
|
from trytond.transaction import Transaction
|
||||||
|
from trytond.model import fields
|
||||||
|
from trytond.pyson import Eval, Bool
|
||||||
|
from decimal import Decimal
|
||||||
|
|
||||||
|
|
||||||
|
class InvoiceLine(metaclass=PoolMeta):
|
||||||
|
__name__ = 'account.invoice.line'
|
||||||
|
|
||||||
|
product_price_list_type = fields.Many2One('product.price_list.type',
|
||||||
|
"Product Price List Type")
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
<tryton>
|
||||||
|
<data>
|
||||||
|
<!-- invoice.line -->
|
||||||
|
<record model="ir.ui.view" id="invoice_line_view_form">
|
||||||
|
<field name="model">account.invoice.line</field>
|
||||||
|
<field name="inherit" ref="account_invoice.invoice_line_view_form"/>
|
||||||
|
<field name="name">invoice_line_form</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</tryton>
|
412
locale/ca.po
412
locale/ca.po
File diff suppressed because it is too large
Load Diff
416
locale/es.po
416
locale/es.po
File diff suppressed because it is too large
Load Diff
|
@ -11,6 +11,7 @@ depends:
|
||||||
quality_control
|
quality_control
|
||||||
production
|
production
|
||||||
stock
|
stock
|
||||||
|
account_invoice
|
||||||
account_invoice_line_standalone
|
account_invoice_line_standalone
|
||||||
xml:
|
xml:
|
||||||
plot.xml
|
plot.xml
|
||||||
|
@ -23,3 +24,4 @@ xml:
|
||||||
location.xml
|
location.xml
|
||||||
quality.xml
|
quality.xml
|
||||||
contract.xml
|
contract.xml
|
||||||
|
invoice.xml
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
<data>
|
||||||
|
<xpath expr="/form/notebook/page[@id='general']/field[@name='taxes']" position="before">
|
||||||
|
<label name="product_price_list_type"/>
|
||||||
|
<field name="product_price_list_type"/>
|
||||||
|
</xpath>
|
||||||
|
</data>
|
|
@ -484,6 +484,8 @@ class Weighing(Workflow, ModelSQL, ModelView):
|
||||||
invoice_line.product = weighing.product_created
|
invoice_line.product = weighing.product_created
|
||||||
invoice_line.on_change_product()
|
invoice_line.on_change_product()
|
||||||
invoice_line.quantity = weighing.netweight or 0
|
invoice_line.quantity = weighing.netweight or 0
|
||||||
|
invoice_line.product_price_list_type = (
|
||||||
|
beneficiary.product_price_list_type)
|
||||||
|
|
||||||
unit_price = Product.get_purchase_price(
|
unit_price = Product.get_purchase_price(
|
||||||
[weighing.product_created],
|
[weighing.product_created],
|
||||||
|
|
Loading…
Reference in New Issue