1 parent
78d659b48d
commit
f350adcee3
5 files changed
+2
-57
No files matched your search
@@ -1,3 +1,4 @@
|
||||
* Remove "Parties associated to Purchases" menu entry
|
||||
* Permit only purchase line of type line as stock move origin
|
||||
|
||||
Version 7.2.0 - 2024-04-29
|
||||
|
||||
@@ -49,7 +49,6 @@ def register():
|
||||
purchase.PurchaseReport,
|
||||
module='purchase', type_='report')
|
||||
Pool.register(
|
||||
purchase.OpenSupplier,
|
||||
purchase.HandleShipmentException,
|
||||
purchase.HandleInvoiceException,
|
||||
party.PartyReplace,
|
||||
|
||||
@@ -1,22 +1,3 @@
|
||||
.. _Listing Suppliers:
|
||||
|
||||
Listing Suppliers
|
||||
=================
|
||||
|
||||
In Tryton, by definition, the `Parties <party:model-party.party>` that your
|
||||
`Company <company:model-company.company>` has bought from are its suppliers.
|
||||
The *Purchase Module* lets you list these when you open the
|
||||
[:menuselection:`Parties --> Parties --> Associated to Purchases`]
|
||||
main menu item.
|
||||
|
||||
.. tip::
|
||||
|
||||
For some companies it is important to know which parties are, or may
|
||||
eventually be, suppliers before you have bought anything from them.
|
||||
One way of doing this is to create a ``Supplier``
|
||||
`Category <party:model-party.category>`, and add all the appropriate
|
||||
parties to it.
|
||||
|
||||
.. _Making products purchasable:
|
||||
|
||||
Making products purchasable
|
||||
|
||||
@@ -26,7 +26,7 @@ from trytond.modules.company.model import (
|
||||
from trytond.modules.currency.fields import Monetary
|
||||
from trytond.modules.product import price_digits
|
||||
from trytond.pool import Pool
|
||||
from trytond.pyson import Bool, Eval, If, PYSONEncoder
|
||||
from trytond.pyson import Bool, Eval, If
|
||||
from trytond.tools import cached_property, firstline
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.wizard import (
|
||||
@@ -2206,30 +2206,6 @@ class PurchaseReport(CompanyReport):
|
||||
return context
|
||||
|
||||
|
||||
class OpenSupplier(Wizard):
|
||||
'Open Suppliers'
|
||||
__name__ = 'purchase.open_supplier'
|
||||
start_state = 'open_'
|
||||
open_ = StateAction('party.act_party_form')
|
||||
|
||||
def do_open_(self, action):
|
||||
pool = Pool()
|
||||
ModelData = pool.get('ir.model.data')
|
||||
Wizard = pool.get('ir.action.wizard')
|
||||
Purchase = pool.get('purchase.purchase')
|
||||
cursor = Transaction().connection.cursor()
|
||||
purchase = Purchase.__table__()
|
||||
|
||||
cursor.execute(*purchase.select(purchase.party,
|
||||
group_by=purchase.party))
|
||||
supplier_ids = [line[0] for line in cursor]
|
||||
action['pyson_domain'] = PYSONEncoder().encode(
|
||||
[('id', 'in', supplier_ids)])
|
||||
wizard = Wizard(ModelData.get_id('purchase', 'act_open_supplier'))
|
||||
action['name'] = wizard.name
|
||||
return action, {}
|
||||
|
||||
|
||||
class HandleShipmentExceptionAsk(ModelView):
|
||||
'Handle Shipment Exception'
|
||||
__name__ = 'purchase.handle.shipment.exception.ask'
|
||||
|
||||
@@ -624,18 +624,6 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="action" ref="wizard_return_purchase"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.wizard" id="act_open_supplier">
|
||||
<field name="name">Parties associated to Purchases</field>
|
||||
<field name="wiz_name">purchase.open_supplier</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Associated to Purchases"
|
||||
parent="party.menu_party_form"
|
||||
action="act_open_supplier"
|
||||
sequence="50"
|
||||
icon="tryton-list"
|
||||
id="menu_supplier"/>
|
||||
|
||||
<record model="ir.action.wizard" id="wizard_modify_header">
|
||||
<field name="name">Modify Header</field>
|
||||
<field name="wiz_name">purchase.modify_header</field>
|
||||
|
||||
Reference in new issue
Block a user