first commit
This commit is contained in:
2
modules/account_invoice_stock/__init__.py
Normal file
2
modules/account_invoice_stock/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
Binary file not shown.
Binary file not shown.
BIN
modules/account_invoice_stock/__pycache__/stock.cpython-311.pyc
Normal file
BIN
modules/account_invoice_stock/__pycache__/stock.cpython-311.pyc
Normal file
Binary file not shown.
145
modules/account_invoice_stock/account.py
Normal file
145
modules/account_invoice_stock/account.py
Normal file
@@ -0,0 +1,145 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import ModelSQL, fields
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Eval, If
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
class Invoice(metaclass=PoolMeta):
|
||||
__name__ = 'account.invoice'
|
||||
|
||||
shipments = fields.Function(fields.Char("Shipments"), 'get_shipments')
|
||||
|
||||
def get_shipments(self, name):
|
||||
shipments = {
|
||||
m.shipment.rec_name for l in self.lines
|
||||
for m in l.stock_moves if m.shipment}
|
||||
return ', '.join(sorted(shipments))
|
||||
|
||||
@classmethod
|
||||
def _post(cls, invoices):
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
transaction = Transaction()
|
||||
context = transaction.context
|
||||
super()._post(invoices)
|
||||
moves = sum((l.stock_moves for i in invoices for l in i.lines), ())
|
||||
if moves:
|
||||
with transaction.set_context(
|
||||
queue_batch=context.get('queue_batch', True)):
|
||||
Move.__queue__.update_unit_price(moves)
|
||||
|
||||
|
||||
class InvoiceLineStockMove(ModelSQL):
|
||||
__name__ = 'account.invoice.line-stock.move'
|
||||
|
||||
invoice_line = fields.Many2One(
|
||||
'account.invoice.line', "Invoice Line",
|
||||
required=True, ondelete='CASCADE')
|
||||
stock_move = fields.Many2One(
|
||||
'stock.move', "Stock Move", required=True, ondelete='CASCADE')
|
||||
|
||||
|
||||
class InvoiceLine(metaclass=PoolMeta):
|
||||
__name__ = 'account.invoice.line'
|
||||
|
||||
warehouse = fields.Function(fields.Many2One(
|
||||
'stock.location', "Warehouse"), 'get_warehouse')
|
||||
stock_moves = fields.Many2Many(
|
||||
'account.invoice.line-stock.move', 'invoice_line', 'stock_move',
|
||||
"Stock Moves",
|
||||
domain=[
|
||||
('product.default_uom_category',
|
||||
'=', Eval('product_uom_category', -1)),
|
||||
If((Eval('_parent_invoice', {}).get('type') == 'out')
|
||||
| (Eval('invoice_type') == 'out'),
|
||||
['OR',
|
||||
('to_location.type', '=', 'customer'),
|
||||
('from_location.type', '=', 'customer'),
|
||||
],
|
||||
['OR',
|
||||
('from_location.type', '=', 'supplier'),
|
||||
('to_location.type', '=', 'supplier'),
|
||||
]),
|
||||
],
|
||||
states={
|
||||
'invisible': (
|
||||
(Eval('type') != 'line')
|
||||
| ~Eval('product')),
|
||||
})
|
||||
shipments = fields.Function(fields.Char("Shipments"), 'get_shipments')
|
||||
correction = fields.Boolean(
|
||||
"Correction",
|
||||
states={
|
||||
'invisible': ((Eval('_parent_invoice', {}).get('type') == 'out')
|
||||
| (Eval('invoice_type') == 'out')),
|
||||
},
|
||||
help="Check to correct price of already posted invoice.")
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._check_modify_exclude.update(['stock_moves', 'correction'])
|
||||
|
||||
@classmethod
|
||||
def default_correction(cls):
|
||||
return False
|
||||
|
||||
def get_warehouse(self, name):
|
||||
if (self.invoice_type == 'out'
|
||||
or (self.invoice and self.invoice.type) == 'out'):
|
||||
warehouses = set(filter(None, [
|
||||
m.from_location.warehouse for m in self.stock_moves]))
|
||||
else:
|
||||
warehouses = set(filter(None, [
|
||||
m.to_location.warehouse for m in self.stock_moves]))
|
||||
if warehouses:
|
||||
return list(warehouses)[0].id
|
||||
|
||||
@property
|
||||
def moved_quantity(self):
|
||||
'The quantity from linked stock moves in line unit'
|
||||
pool = Pool()
|
||||
Uom = pool.get('product.uom')
|
||||
quantity = 0
|
||||
for stock_move in self.stock_moves:
|
||||
if stock_move.state != 'cancelled':
|
||||
quantity += Uom.compute_qty(
|
||||
stock_move.unit, stock_move.quantity, self.unit)
|
||||
return quantity
|
||||
|
||||
def get_shipments(self, name):
|
||||
shipments = {
|
||||
m.shipment.rec_name for m in self.stock_moves if m.shipment}
|
||||
return ', '.join(sorted(shipments))
|
||||
|
||||
@classmethod
|
||||
def on_modification(cls, mode, lines, field_names=None):
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
transaction = Transaction()
|
||||
context = transaction.context
|
||||
super().on_modification(mode, lines, field_names=field_names)
|
||||
if mode == 'write':
|
||||
moves = sum((l.stock_moves for l in lines), ())
|
||||
if moves:
|
||||
with transaction.set_context(
|
||||
queue_batch=context.get('queue_batch', True)):
|
||||
Move.__queue__.update_unit_price(moves)
|
||||
|
||||
@classmethod
|
||||
def copy(cls, lines, default=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
else:
|
||||
default = default.copy()
|
||||
default.setdefault('correction', False)
|
||||
if not Transaction().context.get('_account_invoice_correction'):
|
||||
default.setdefault('stock_moves', None)
|
||||
return super().copy(lines, default=default)
|
||||
|
||||
def _credit(self):
|
||||
line = super()._credit()
|
||||
line.stock_moves = self.stock_moves
|
||||
return line
|
||||
21
modules/account_invoice_stock/account.xml
Normal file
21
modules/account_invoice_stock/account.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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>
|
||||
<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>
|
||||
|
||||
<record model="ir.model.access" id="access_stock_move_group_account">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="group" ref="account.group_account"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
57
modules/account_invoice_stock/locale/bg.po
Normal file
57
modules/account_invoice_stock/locale/bg.po
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Движение на наличност"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Ред от фактура"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Движение на наличност"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Редове от фактура"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Редове от фактура"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Наличност"
|
||||
52
modules/account_invoice_stock/locale/ca.po
Normal file
52
modules/account_invoice_stock/locale/ca.po
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Albarans"
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Correcció"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Albarans"
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Moviments d'existències"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Magatzem"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Línia de factura"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Moviment d'existències"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Línies de factura"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Tipus de factura"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
"Marqueu per corregir el preu d'una factura que ja està comptabilitzada."
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Línia de factura - Moviment d'existències"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Logística"
|
||||
51
modules/account_invoice_stock/locale/cs.po
Normal file
51
modules/account_invoice_stock/locale/cs.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr ""
|
||||
53
modules/account_invoice_stock/locale/de.po
Normal file
53
modules/account_invoice_stock/locale/de.po
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Lieferungen"
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Korrektur"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Lieferungen"
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Warenbewegungen"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Logistikstandort"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Rechnungsposition"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Warenbewegung"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Rechnungspositionen"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Rechnungstypen"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
"Aktivieren um den Preis von bereits festgeschriebenen Rechnungen zu "
|
||||
"korrigieren."
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Rechnungsposition - Warenbewegung"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Lager"
|
||||
51
modules/account_invoice_stock/locale/es.po
Normal file
51
modules/account_invoice_stock/locale/es.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Albaranes"
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Corrección"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Albaranes"
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Movimientos de existencias"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Almacén"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Línea de factura"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Movimiento de existencias"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Líneas de factura"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Tipos de factura"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr "Marcar para corregir el precio de una factura ya contabilizada."
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Línea de factura - Movimiento de existencias"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Logística"
|
||||
51
modules/account_invoice_stock/locale/es_419.po
Normal file
51
modules/account_invoice_stock/locale/es_419.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Existencias"
|
||||
53
modules/account_invoice_stock/locale/et.po
Normal file
53
modules/account_invoice_stock/locale/et.po
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Laoliikumised"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Arve reas"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Lao liikumised"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Arve read"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Arve read"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Arve rida - lao liikumine"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Ladu"
|
||||
53
modules/account_invoice_stock/locale/fa.po
Normal file
53
modules/account_invoice_stock/locale/fa.po
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "جابجایی موجودی"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "خط صورتحساب"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "جابجایی موجودی"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "خطوط صورتحساب"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "خطوط صورتحساب"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "خط صورتحساب - جابجایی موجودی"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "موجودی"
|
||||
51
modules/account_invoice_stock/locale/fi.po
Normal file
51
modules/account_invoice_stock/locale/fi.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr ""
|
||||
51
modules/account_invoice_stock/locale/fr.po
Normal file
51
modules/account_invoice_stock/locale/fr.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Expéditions"
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Correction"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Expéditions"
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Mouvements de stock"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Entrepôt"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Ligne de facture"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Mouvement de stock"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Lignes de facture"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Types de factures"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr "Cochez pour corriger le prix de la facture déjà comptabilisées."
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Ligne de facture comptable - Mouvement de stock"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Stock"
|
||||
53
modules/account_invoice_stock/locale/hu.po
Normal file
53
modules/account_invoice_stock/locale/hu.po
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Árjavítás"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Készletmozgások"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Számlasor"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Készletmozgás"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Számlasorok"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
"Jelölje be, hogy egy már lekönyvelt számla alapján kiszámított egységárat "
|
||||
"módosítson."
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Készlet"
|
||||
52
modules/account_invoice_stock/locale/id.po
Normal file
52
modules/account_invoice_stock/locale/id.po
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Baris Faktur"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Perpindahan Persediaan"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Baris Faktur"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Jenis Faktur"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Baris Faktur - Perpindahan Stok"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Persediaan"
|
||||
52
modules/account_invoice_stock/locale/it.po
Normal file
52
modules/account_invoice_stock/locale/it.po
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Spedizioni"
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Correzione"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Spedizioni"
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Movimenti di magazzino"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Magazzino"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Riga fattura"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Movimento di magazzino"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Righe fattura"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Tipi di fattura"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr "Spunta per correggere il prezzo della fattura già registrata."
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Riga fattura - movimento di magazzino"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Magazzino"
|
||||
53
modules/account_invoice_stock/locale/lo.po
Normal file
53
modules/account_invoice_stock/locale/lo.po
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "ເຄື່ອນຍ້າຍສາງ"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "ລາຍການ"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "ເຄື່ອນຍ້າຍສາງ"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "ລາຍການ"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "ລາຍການ"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "ລາຍການ - ເຄື່ອນຍ້າຍສາງ"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "ສາງ"
|
||||
53
modules/account_invoice_stock/locale/lt.po
Normal file
53
modules/account_invoice_stock/locale/lt.po
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Sandėlio operacijos"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Sąskaitos faktūros eilutė"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Sandėlio operacija"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Sąskaitos faktūros eilutės"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Sąskaitos faktūros eilutės"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Sąskaitos faktūros eilutė - sandėlio operacija"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Sandėlys"
|
||||
51
modules/account_invoice_stock/locale/nl.po
Normal file
51
modules/account_invoice_stock/locale/nl.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Zendingen"
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Correctie"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Zendingen"
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Voorraadbewegingen"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Magazijn"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Factuur regel"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Voorraadbeweging"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Factuur regels"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Factuur soorten"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr "Vink aan om de prijs van de reeds geboekte factuur te corrigeren."
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Factuur regel - Voorraadbeweging"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Voorraad"
|
||||
51
modules/account_invoice_stock/locale/pl.po
Normal file
51
modules/account_invoice_stock/locale/pl.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Korekta"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Pozycje faktury"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr "Zanacz, aby skorygować cenę już wystawionej faktury."
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr ""
|
||||
53
modules/account_invoice_stock/locale/pt.po
Normal file
53
modules/account_invoice_stock/locale/pt.po
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Movimentações de estoque"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Linha da fatura"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Movimentação de estoque"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Linhas de fatura"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Linhas de fatura"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Linha da fatura - Movimentação de estoque"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Estoque"
|
||||
51
modules/account_invoice_stock/locale/ro.po
Normal file
51
modules/account_invoice_stock/locale/ro.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Expedieri"
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "Corecţie"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "Expedieri"
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Mişcări Stoc"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "Depozit"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Rând Factura"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Mişcări Stoc"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Rânduri Factura"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Tipuri Factura"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr "Bifaţi pentru a corecta preţul al unei facturi postate."
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Rând Factura - Mişcare Stoc"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Stoc"
|
||||
57
modules/account_invoice_stock/locale/ru.po
Normal file
57
modules/account_invoice_stock/locale/ru.po
Normal file
@@ -0,0 +1,57 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Хранилище перемещение товара"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Строка инвойса"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Хранилище перемещение товара"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Строки инвойса"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Строки инвойса"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Хранилище"
|
||||
53
modules/account_invoice_stock/locale/sl.po
Normal file
53
modules/account_invoice_stock/locale/sl.po
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "Promet zaloge"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "Postavka računa"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "Promet zaloge"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "Postavke računov"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "Postavke računov"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "Postavka računa - Promet zaloge"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "Zaloga"
|
||||
51
modules/account_invoice_stock/locale/tr.po
Normal file
51
modules/account_invoice_stock/locale/tr.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr ""
|
||||
51
modules/account_invoice_stock/locale/uk.po
Normal file
51
modules/account_invoice_stock/locale/uk.po
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr ""
|
||||
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr ""
|
||||
52
modules/account_invoice_stock/locale/zh_CN.po
Normal file
52
modules/account_invoice_stock/locale/zh_CN.po
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:account.invoice,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "收发货"
|
||||
|
||||
msgctxt "field:account.invoice.line,correction:"
|
||||
msgid "Correction"
|
||||
msgstr "校正"
|
||||
|
||||
msgctxt "field:account.invoice.line,shipments:"
|
||||
msgid "Shipments"
|
||||
msgstr "收发货"
|
||||
|
||||
msgctxt "field:account.invoice.line,stock_moves:"
|
||||
msgid "Stock Moves"
|
||||
msgstr "库存移动"
|
||||
|
||||
msgctxt "field:account.invoice.line,warehouse:"
|
||||
msgid "Warehouse"
|
||||
msgstr "仓库"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,invoice_line:"
|
||||
msgid "Invoice Line"
|
||||
msgstr "原始凭证明细"
|
||||
|
||||
msgctxt "field:account.invoice.line-stock.move,stock_move:"
|
||||
msgid "Stock Move"
|
||||
msgstr "库存移动"
|
||||
|
||||
msgctxt "field:stock.move,invoice_lines:"
|
||||
msgid "Invoice Lines"
|
||||
msgstr "原始凭证明细"
|
||||
|
||||
msgctxt "field:stock.move,invoice_types:"
|
||||
msgid "Invoice Types"
|
||||
msgstr "原始凭证类型"
|
||||
|
||||
msgctxt "help:account.invoice.line,correction:"
|
||||
msgid "Check to correct price of already posted invoice."
|
||||
msgstr "检查已过帐发票的正确价格。"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "model:account.invoice.line-stock.move,string:"
|
||||
msgid "Account Invoice Line - Stock Move"
|
||||
msgstr "原始凭证明细 - 库存移动"
|
||||
|
||||
msgctxt "view:account.invoice.line:"
|
||||
msgid "Stock"
|
||||
msgstr "库存"
|
||||
127
modules/account_invoice_stock/stock.py
Normal file
127
modules/account_invoice_stock/stock.py
Normal file
@@ -0,0 +1,127 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from decimal import Decimal
|
||||
|
||||
from trytond.model import ModelView, Workflow, fields
|
||||
from trytond.modules.product import round_price
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Eval
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
class Move(metaclass=PoolMeta):
|
||||
__name__ = 'stock.move'
|
||||
invoice_lines = fields.Many2Many(
|
||||
'account.invoice.line-stock.move', 'stock_move', 'invoice_line',
|
||||
"Invoice Lines",
|
||||
domain=[
|
||||
('product.default_uom_category',
|
||||
'=', Eval('product_uom_category', -1)),
|
||||
('type', '=', 'line'),
|
||||
['OR',
|
||||
('invoice.type', 'in', Eval('invoice_types', [])),
|
||||
('invoice_type', 'in', Eval('invoice_types', [])),
|
||||
],
|
||||
],
|
||||
states={
|
||||
'invisible': ~Eval('invoice_types', []),
|
||||
})
|
||||
invoice_types = fields.Function(
|
||||
fields.MultiSelection('get_invoice_types', "Invoice Types"),
|
||||
'on_change_with_invoice_types')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._allow_modify_closed_period.add('invoice_lines')
|
||||
|
||||
@classmethod
|
||||
def get_invoice_types(cls):
|
||||
pool = Pool()
|
||||
Invoice = pool.get('account.invoice')
|
||||
return Invoice.fields_get(['type'])['type']['selection']
|
||||
|
||||
@fields.depends('from_location', 'to_location')
|
||||
def on_change_with_invoice_types(self, name=None):
|
||||
types = set()
|
||||
for location in [self.from_location, self.to_location]:
|
||||
if location:
|
||||
if location.type == 'customer':
|
||||
types.add('out')
|
||||
elif location.type == 'supplier':
|
||||
types.add('in')
|
||||
return list(types)
|
||||
|
||||
@property
|
||||
def invoiced_quantity(self):
|
||||
'The quantity from linked invoice lines in move unit'
|
||||
pool = Pool()
|
||||
Uom = pool.get('product.uom')
|
||||
quantity = 0
|
||||
for invoice_line in self.invoice_lines:
|
||||
if invoice_line.invoice_state != 'cancelled':
|
||||
quantity += Uom.compute_qty(
|
||||
invoice_line.unit, invoice_line.quantity, self.unit)
|
||||
return quantity
|
||||
|
||||
@classmethod
|
||||
def copy(cls, moves, default=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
else:
|
||||
default = default.copy()
|
||||
if not Transaction().context.get('_stock_move_split'):
|
||||
default.setdefault('invoice_lines', None)
|
||||
return super().copy(moves, default=default)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
@Workflow.transition('done')
|
||||
def do(cls, moves):
|
||||
super().do(moves)
|
||||
cls.update_unit_price(moves)
|
||||
|
||||
@classmethod
|
||||
def write(cls, *args):
|
||||
super().write(*args)
|
||||
moves = sum(args[0:None:2], [])
|
||||
cls.update_unit_price(moves)
|
||||
|
||||
@classmethod
|
||||
def update_unit_price(cls, moves):
|
||||
for move in moves:
|
||||
if move.state == 'done' and move.unit_price_required:
|
||||
unit_price = move._compute_unit_price(
|
||||
unit_price=move.unit_price)
|
||||
if unit_price != move.unit_price:
|
||||
move.unit_price = unit_price
|
||||
cls.save(moves)
|
||||
|
||||
def _compute_unit_price(self, unit_price):
|
||||
pool = Pool()
|
||||
UoM = pool.get('product.uom')
|
||||
Currency = pool.get('currency.currency')
|
||||
amount, quantity = 0, 0
|
||||
for line in self.invoice_lines:
|
||||
if line.invoice and line.invoice.state in {'posted', 'paid'}:
|
||||
with Transaction().set_context(date=self.effective_date):
|
||||
amount += Currency.compute(
|
||||
line.invoice.currency, line.amount, self.currency)
|
||||
if line.invoice.type == 'out' or not line.correction:
|
||||
quantity += UoM.compute_qty(
|
||||
line.unit, line.quantity, self.unit)
|
||||
if quantity:
|
||||
unit_price = amount / Decimal(str(quantity))
|
||||
if unit_price is not None:
|
||||
unit_price = round_price(unit_price)
|
||||
return unit_price
|
||||
|
||||
|
||||
class ShipmentOut(metaclass=PoolMeta):
|
||||
__name__ = 'stock.shipment.out'
|
||||
|
||||
def _sync_outgoing_move(self, template=None):
|
||||
move = super()._sync_outgoing_move(template=template)
|
||||
if template and template.invoice_lines:
|
||||
move.invoice_lines = list(template.invoice_lines)
|
||||
return move
|
||||
12
modules/account_invoice_stock/stock.xml
Normal file
12
modules/account_invoice_stock/stock.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?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>
|
||||
<record model="ir.ui.view" id="move_view_form">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit" ref="stock.move_view_form"/>
|
||||
<field name="name">move_form</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
2
modules/account_invoice_stock/tests/__init__.py
Normal file
2
modules/account_invoice_stock/tests/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,138 @@
|
||||
========================
|
||||
Invoice - Stock Scenario
|
||||
========================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> from decimal import Decimal
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(
|
||||
... 'account_invoice_stock', create_company, create_chart)
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear())
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Get accounts::
|
||||
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create a party::
|
||||
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> party = Party(name="Party")
|
||||
>>> party.save()
|
||||
|
||||
Create an account category::
|
||||
|
||||
>>> ProductCategory = Model.get('product.category')
|
||||
>>> account_category = ProductCategory(name="Account Category")
|
||||
>>> account_category.accounting = True
|
||||
>>> account_category.account_expense = accounts['expense']
|
||||
>>> account_category.account_revenue = accounts['revenue']
|
||||
>>> account_category.save()
|
||||
|
||||
Create a product::
|
||||
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('40')
|
||||
>>> template.account_category = account_category
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> output_loc, = Location.find([('code', '=', 'OUT')])
|
||||
>>> customer_loc, = Location.find([('code', '=', 'CUS')])
|
||||
|
||||
Create a shipment::
|
||||
|
||||
>>> Shipment = Model.get('stock.shipment.out')
|
||||
>>> Move = Model.get('stock.move')
|
||||
>>> shipment = Shipment()
|
||||
>>> shipment.customer = party
|
||||
>>> move = shipment.outgoing_moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.quantity = 10
|
||||
>>> move.from_location = output_loc
|
||||
>>> move.to_location = customer_loc
|
||||
>>> move.unit_price = Decimal('40.0000')
|
||||
>>> move.currency = get_currency()
|
||||
>>> shipment.click('wait')
|
||||
>>> shipment.state
|
||||
'waiting'
|
||||
>>> move, = shipment.outgoing_moves
|
||||
|
||||
Create an invoice for half the quantity with higher price::
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> invoice = Invoice(type='out')
|
||||
>>> invoice.party = party
|
||||
>>> line = invoice.lines.new()
|
||||
>>> line.product = product
|
||||
>>> line.quantity = 5
|
||||
>>> line.unit_price = Decimal('50.0000')
|
||||
>>> line.stock_moves.append(Move(move.id))
|
||||
>>> invoice.click('post')
|
||||
>>> invoice.state
|
||||
'posted'
|
||||
|
||||
Check move unit price is not changed::
|
||||
|
||||
>>> move.reload()
|
||||
>>> move.unit_price
|
||||
Decimal('40.0000')
|
||||
|
||||
Ship the products::
|
||||
|
||||
>>> shipment.click('assign_force')
|
||||
>>> shipment.click('pick')
|
||||
>>> shipment.click('pack')
|
||||
>>> shipment.click('do')
|
||||
>>> shipment.state
|
||||
'done'
|
||||
|
||||
Check move unit price has been updated::
|
||||
|
||||
>>> move.reload()
|
||||
>>> move.unit_price
|
||||
Decimal('50.0000')
|
||||
|
||||
Create a second invoice for the remaining quantity cheaper::
|
||||
|
||||
>>> invoice = Invoice(type='out')
|
||||
>>> invoice.party = party
|
||||
>>> line = invoice.lines.new()
|
||||
>>> line.product = product
|
||||
>>> line.quantity = 5
|
||||
>>> line.unit_price = Decimal('40.0000')
|
||||
>>> line.stock_moves.append(Move(move.id))
|
||||
>>> invoice.click('post')
|
||||
>>> invoice.state
|
||||
'posted'
|
||||
|
||||
Check move unit price has been updated again::
|
||||
|
||||
>>> move.reload()
|
||||
>>> move.unit_price
|
||||
Decimal('45.0000')
|
||||
@@ -0,0 +1,130 @@
|
||||
===================================
|
||||
Invoice - Stock Correction Scenario
|
||||
===================================
|
||||
|
||||
Imports::
|
||||
|
||||
>>> import datetime as dt
|
||||
>>> from decimal import Decimal
|
||||
|
||||
>>> from proteus import Model
|
||||
>>> from trytond.modules.account.tests.tools import (
|
||||
... create_chart, create_fiscalyear, get_accounts)
|
||||
>>> from trytond.modules.account_invoice.tests.tools import (
|
||||
... set_fiscalyear_invoice_sequences)
|
||||
>>> from trytond.modules.company.tests.tools import create_company
|
||||
>>> from trytond.modules.currency.tests.tools import get_currency
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
|
||||
>>> today = dt.date.today()
|
||||
|
||||
Activate modules::
|
||||
|
||||
>>> config = activate_modules(
|
||||
... 'account_invoice_stock', create_company, create_chart)
|
||||
|
||||
>>> Invoice = Model.get('account.invoice')
|
||||
>>> Location = Model.get('stock.location')
|
||||
>>> Move = Model.get('stock.move')
|
||||
>>> Party = Model.get('party.party')
|
||||
>>> ProductCategory = Model.get('product.category')
|
||||
>>> ProductTemplate = Model.get('product.template')
|
||||
>>> ProductUom = Model.get('product.uom')
|
||||
>>> Shipment = Model.get('stock.shipment.in')
|
||||
|
||||
Create fiscal year::
|
||||
|
||||
>>> fiscalyear = set_fiscalyear_invoice_sequences(
|
||||
... create_fiscalyear(today=today))
|
||||
>>> fiscalyear.click('create_period')
|
||||
|
||||
Get accounts::
|
||||
|
||||
>>> accounts = get_accounts()
|
||||
|
||||
Create a party::
|
||||
|
||||
>>> party = Party(name="Party")
|
||||
>>> party.save()
|
||||
|
||||
Create an account category::
|
||||
|
||||
>>> account_category = ProductCategory(name="Account Category")
|
||||
>>> account_category.accounting = True
|
||||
>>> account_category.account_expense = accounts['expense']
|
||||
>>> account_category.account_revenue = accounts['revenue']
|
||||
>>> account_category.save()
|
||||
|
||||
Create a product::
|
||||
|
||||
>>> unit, = ProductUom.find([('name', '=', 'Unit')])
|
||||
>>> template = ProductTemplate()
|
||||
>>> template.name = 'product'
|
||||
>>> template.default_uom = unit
|
||||
>>> template.type = 'goods'
|
||||
>>> template.list_price = Decimal('40')
|
||||
>>> template.account_category = account_category
|
||||
>>> template.save()
|
||||
>>> product, = template.products
|
||||
|
||||
Get stock locations::
|
||||
|
||||
>>> input_loc, = Location.find([('code', '=', 'IN')])
|
||||
>>> supplier_loc, = Location.find([('code', '=', 'SUP')])
|
||||
|
||||
Create a shipment::
|
||||
|
||||
>>> shipment = Shipment()
|
||||
>>> shipment.supplier = party
|
||||
>>> move = shipment.incoming_moves.new()
|
||||
>>> move.product = product
|
||||
>>> move.quantity = 10
|
||||
>>> move.from_location = supplier_loc
|
||||
>>> move.to_location = input_loc
|
||||
>>> move.unit_price = Decimal('40.0000')
|
||||
>>> move.currency = get_currency()
|
||||
>>> shipment.click('receive')
|
||||
>>> shipment.state
|
||||
'received'
|
||||
>>> move, = shipment.incoming_moves
|
||||
|
||||
Create an invoice::
|
||||
|
||||
>>> invoice = Invoice(type='in')
|
||||
>>> invoice.party = party
|
||||
>>> invoice.invoice_date = today
|
||||
>>> line = invoice.lines.new()
|
||||
>>> line.product = product
|
||||
>>> line.quantity = 10
|
||||
>>> line.unit_price = Decimal('40.0000')
|
||||
>>> line.stock_moves.append(Move(move.id))
|
||||
>>> invoice.click('post')
|
||||
>>> invoice.state
|
||||
'posted'
|
||||
|
||||
Check move unit price::
|
||||
|
||||
>>> move.reload()
|
||||
>>> move.unit_price
|
||||
Decimal('40.0000')
|
||||
|
||||
Post a price correction::
|
||||
|
||||
>>> invoice = Invoice(type='in')
|
||||
>>> invoice.party = party
|
||||
>>> invoice.invoice_date = today
|
||||
>>> line = invoice.lines.new()
|
||||
>>> line.product = product
|
||||
>>> line.quantity = 1
|
||||
>>> line.unit_price = Decimal('-10.0000')
|
||||
>>> line.correction = True
|
||||
>>> line.stock_moves.append(Move(move.id))
|
||||
>>> invoice.click('post')
|
||||
>>> invoice.state
|
||||
'posted'
|
||||
|
||||
Check move unit price::
|
||||
|
||||
>>> move.reload()
|
||||
>>> move.unit_price
|
||||
Decimal('39.0000')
|
||||
12
modules/account_invoice_stock/tests/test_module.py
Normal file
12
modules/account_invoice_stock/tests/test_module.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
|
||||
|
||||
class AccountInvoiceStockTestCase(ModuleTestCase):
|
||||
'Test AccountInvoiceStock module'
|
||||
module = 'account_invoice_stock'
|
||||
|
||||
|
||||
del ModuleTestCase
|
||||
8
modules/account_invoice_stock/tests/test_scenario.py
Normal file
8
modules/account_invoice_stock/tests/test_scenario.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.tests.test_tryton import load_doc_tests
|
||||
|
||||
|
||||
def load_tests(*args, **kwargs):
|
||||
return load_doc_tests(__name__, __file__, *args, **kwargs)
|
||||
18
modules/account_invoice_stock/tryton.cfg
Normal file
18
modules/account_invoice_stock/tryton.cfg
Normal file
@@ -0,0 +1,18 @@
|
||||
[tryton]
|
||||
version=7.8.0
|
||||
depends:
|
||||
account_invoice
|
||||
stock
|
||||
ir
|
||||
product
|
||||
xml:
|
||||
account.xml
|
||||
stock.xml
|
||||
|
||||
[register]
|
||||
model:
|
||||
account.Invoice
|
||||
account.InvoiceLineStockMove
|
||||
account.InvoiceLine
|
||||
stock.Move
|
||||
stock.ShipmentOut
|
||||
14
modules/account_invoice_stock/view/invoice_line_form.xml
Normal file
14
modules/account_invoice_stock/view/invoice_line_form.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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="//field[@name='amount']" position="after">
|
||||
<label name="correction"/>
|
||||
<field name="correction"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@id='general']" position="after">
|
||||
<page string="Stock" name="stock_moves">
|
||||
<field name="stock_moves" colspan="4"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
10
modules/account_invoice_stock/view/move_form.xml
Normal file
10
modules/account_invoice_stock/view/move_form.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?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="//notebook" position="inside">
|
||||
<page name="invoice_lines">
|
||||
<field name="invoice_lines" colspan="4"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
Reference in New Issue
Block a user