~unifield-team/unifield-wm/us-808-sync

« back to all changes in this revision

Viewing changes to sync_remote_warehouse/orm.py

  • Committer: jf
  • Date: 2015-11-23 16:39:39 UTC
  • mfrom: (601.1.14 unifield-sync)
  • Revision ID: jfb@tempo-consulting.fr-20151123163939-yf7d3zfy48vzpyzv
Tags: uf2.0rc1
US-703 [IMP] Sync server: remove puller
US-703 [IMP] Split data pulled ids
SP-190 [IMP] Data push: do not browse all records
SP-199 [IMP] Do not send multi delete updates for the same record
US-684 [IMP] Close and remove cursor used by sync process
Us-684 [IMP] Don't load db dump file in memory

lp:~unifield-team/unifield-wm/us-703-sync-qt

Changes in sync_server.sync_rule.csv:
remove duplicated rule to generate delete updates on:
    - account.target.costcenter #107, done @rule #113
    - res.currency.rate #128, done @rule #106
    - cost.center.distribution.line #202 and #203, done @rule #201
    - funding.pool.distribution.line #211, done @rule #210
    - account.cashbox.line #404, done @rule #402
    - account.move.line #417, done @rule #412
    - account.analytic.line #421 and #422, done @rule #420
    - financing.contract.format #450, done @rule @451
    - financing.contract.format.line #457, done @rule #452
    - supplier.catalogue #655, done @rule #650
    - supplier.catalogue.line #656, done @rule #655

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    
14
14
orm.orm.get_unique_xml_name = get_unique_xml_name
15
15
 
16
 
def usb_need_to_push(self, cr, uid, ids, context=None):
 
16
def usb_need_to_push(self, cr, uid, context=None):
17
17
        """
18
18
        
19
19
        Check if records need to be pushed to the next USB synchronization process
33
33
            - watched fields are present in modified fields
34
34
 
35
35
        Return type:
36
 
            - If a list of ids is given, it returns a list of filtered ids.
37
 
            - If an id is given, it returns the id itself or False it the
38
 
              record doesn't need to be pushed.
 
36
            - it returns a list of ids to push.
39
37
 
40
38
        :param cr: database cursor
41
39
        :param uid: current user id
42
 
        :param ids: id or list of the ids of the records to read
43
40
        :param context: optional context arguments, like lang, time zone
44
41
        :type context: dictionary
45
42
        :return: list of ids that need to be pushed (or False for per record call)